RPM包制作方法
一. 打包的步驟
1.材料的準(zhǔn)備:
- 打包工具(yum install rpm-build)
- 一個(gè)打包的配置文件(testpackage.spec)
- 要打包的源代碼(~/rpmbuild/SOURCES/)
- 打包的環(huán)境目錄(~/rpmbuild)
2. 執(zhí)行打包命令
rpmbuild -ba ~/rpmbuild/SPECS/testpackage.spec
二. 材料的準(zhǔn)備說明
1. rpm包制作的環(huán)境
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
2.spec文件編寫
Name: antrol-scanservice
Version: 0.1
Release: 0.1
Summary: antrol-scanservice x86-64
License: GPL
Group: System Enviroment/Daemons
Source: antrol-scanservice-0.1.tar.gz
Packager: songwenbin <songwenbin@antrol.com>
%description
Antrol Scan Service Package
%prep
%setup
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/home/opt/scanserver
%build
cd build
make
%install
cd build
make install
%files
%defattr (-, root, root)
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者