Created
November 28, 2016 18:02
-
-
Save soardex/a1282872a7b3f3b49cf45f95cdd79739 to your computer and use it in GitHub Desktop.
Create RPMS CentOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install rpm-build | |
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,TMP} | |
touch ~/.rpmmacros | |
~~~ | |
%packager ffimusic | |
%_topdir /home/ffimusic/rpmbuild | |
%_tmppath /home/ffimusic/rpmbuild/TMP | |
~~~ | |
note: download source in `SOURCES` directory and put specs in `SPECS` directory. | |
~~~ | |
Name: sample | |
Version: 1.0.0 | |
Release: 0 | |
Summary: Sample summary. | |
Group: Applications/Personal | |
Source: sample-1.0.tar.gz | |
License: GPL | |
BuildArch: noarch | |
BuildRoot: %{_tmppath}/%{name}-buildroot | |
%description | |
Sample description. | |
%prep | |
%setup -q | |
%build | |
%install | |
%clean | |
rm -rf $RPM_BUILD_ROOT | |
%post | |
echo . . | |
%files | |
%dir /etc/sample | |
/etc/sample/backup.sh | |
~~~ | |
rpm -b or rpmbuild -ba |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment