网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Centos下rpm包怎么制作

这篇文章主要介绍Centos下rpm包怎么制作,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

10年积累的做网站、成都网站设计经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站制作后付款的网站建设流程,更有华亭免费网站建设让你可以放心的选择与我们合作。

下面简单介绍下rpm的制作:

以cronolog为例:

首先下载cronolog的源码包。

解开源码包,tar xzvf cronolog-1.6.2.tar.gz

找到 cronolog.spec 该文件是定制如何生成RPM包的配置文件

vim cronolog.spec
%define name cronolog
%define version 1.6.2
%define release 1
%define group System Networking/Daemons
Summary:        a flexible log file rotation program for Apache
Name:           %{name}
Version:        %{version}
Release:        %{release}
Copyright:      Apache license
Group:          %{group}
Packager:       Andrew Ford 
URL:            http://www.ford-mason.co.uk/resources/cronolog/
Source:         http://www.ford-mason.co.uk/resources/cronolog/cronolog-%version.tar.gz
BuildRoot:      /tmp/%{name}-root
%description
"cronolog" is a simple program that reads log messages from its input
and writes them to a set of output files, the names of which are
constructed using template and the current date and time.  The
template uses the same format specifiers as the Unix date command
(which are the same as the standard C strftime library function).
%changelog
%prep
%setup -n %{name}-%{version}
%build
./configure
make 
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/%{name}-${RPM_PACKAGE_VERSION} -m 755
make prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT/usr/share/man install
install -m 644 README $RPM_BUILD_ROOT/usr/share/doc/%name-${RPM_PACKAGE_VERSION}
#install -m 644 $RPM_SOURCE_DIR/doc/cronolog.1m $RPM_BUILD_ROOT/usr/man/man1/cronolog.1
#install -m 755 $RPM_SOURCE_DIR/src/cronolog $RPM_BUILD_ROOT/usr/sbin/cronolog
#strip  $RPM_BUILD_ROOT/usr/sbin/* || echo Ignored strip on a non-binary file
%post
%preun
%postun
%clean
rm -rf $RPM_BUILD_ROOT
%files
#%attr(-,root,root) /usr/share/doc/%{name}-%{version}/README
%attr(-,root,root) /usr/sbin/cronolog
%attr(-,root,root) /usr/sbin/cronosplit
#%files man
%attr(644,root,root) /usr/share/man/man1/*.1*
%doc README

然后,将源码包复制到 /usr/src/redhat/SOURCES/

cp cronolog-1.6.2.tar.gz /usr/src/redhat/SOURCES/

执行,rpmbuild -ba cronolog.spec

这样RPM包就生成了,^_^

ls -l /usr/src/redhat/RPMS/i386/

以上是“Centos下rpm包怎么制作”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!


本文名称:Centos下rpm包怎么制作
本文路径:http://bjjierui.cn/article/gdcjjg.html

其他资讯