赞
踩
创建目录
制作spec文件。
Name: smallwolf Version: 1.0.0 Release: 1%{?dist} Summary: this is small gray wolf Buildroot: %{_tmppath}/%{name}-%{version}-root License: GPL URL: http://www.csdn.net Source0: %{name}-%{version}.tar.gz %description This package is small gray wolf %prep %setup -q %install rm -rf %{buildroot} mkdir -p %{buildroot}/opt/smallwolfres cp -r %{_builddir}/smallwolf-1.0.0/opt/smallwolfres/* %{buildroot}/opt/smallwolfres %post mkdir -p /opt/smallwolfres chmod 0755 /opt/smallwolfres %files /opt/smallwolfres %postun rm -rf /opt/smallwolf echo "clean /opt/smallwolf" %changelog * Wed Jul 4 2018 VBird Tsai <vbird@mail.vbird.idv.tw> 0.1 - Build the program
制作打包文件
tar -zcvf smallwolf-1.0.0.tar.gz smallwolf-1.0.0/
rpmbuild --define "_topdir ${PWD}" -bb "${PWD}/SPECS/smallwolf.spec"
- rpm -ivh smallwolf-1.0.0-1.el8.x86_64.rpm
- rpm -e --nodeps smallwolf
- rpm2cpio smallwolf-1.0.0-1.el8.x86_64.rpm | cpio -ivdm
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。