RPM building is a little complicated, but here's a variety of resources and snippets for making things easier.
- Overall RPM guide: <https://rpm-guide.readthedocs.io/en/latest/rpm-guide.html>
- Macros and shorthand in spec files: <http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html>
- SUSE Introduction to RPM packaging: <https://www.suse.com/documentation/suse-best-practices/singlehtml/sbp-rpm-packaging/sbp-rpm-packaging.html>
Packages to install to get your development environment happy:
yum install -y rpm-build rpmdevtools yum-utils
Set up the RPM development tree in a VM or machine:
rpmdev-setuptree
Start a new specfile and follow the prompts:
rpmdev-newspec
Download all sources within a specfile:
spectool -g -R name.spec
Install the build dependencies within a specfile:
yum-builddep -y name.spec
Build an RPM using a specfile:
rpmbuild -ba name.spec
Check a specfile for problems (requires rpmlint
installation):
rpmlint name.spec
- https://github.com/jcu-eresearch/sregex-build
- https://github.com/jcu-eresearch/nginx-custom-build (deprecated, but still useful ideas)