Roll your own package, RPM repo, part 1
(This is more a note to myself than anything else. Surely, there are lots of references out there on the net... ;))
Part I. Build the package
Part I. Build the package
- Prepare the build environment.
mkdir -p builds/{BUILD,RPMS,SOURCES,SPECS,SRPMS} - Add the sources to be built.
mkdir builds/BUILD/this-package-1.0 && cd builds/BUILD tar czvf ../SOURCES/this-package-1.0.tgz this-package-1.0 cd ..
- Write the
specfile using the skeleton below.
vi SPECS/this-package.spec
- Build and sign the package.
gpg --export -a key-id > KEYS/RPM-GPG-KEY-username vi ~/.rpmmacros %_signature gpg %_gpg_path /home/username/.gnupg %_gpg_name User Name (key-id)
%_gpgbin /usr/bin/gpg rpmbuild -ba --clean --sign SPECS/this-package.spec - Test and verify.
sudo rpm -ivh ~username/builds/RPMS/noarch/this-package-1.0-0.1.noarch.rpm rpm -Vp ~username/builds/RPMS/noarch/this-package-1.0-0.1.noarch.rpm
Comments
Post a Comment