qpsmtpd/packaging/rpm
Kjetil Kjernsmo 4b1dc39dd6
Release 1.00 (#307)
* Update changelog
* Bump version
2023-02-16 22:33:46 -08:00
..
files It would help if I deleted the unused file too... 2014-02-13 19:59:14 -05:00
Makefile Rpm build fixes (#277) 2016-12-29 16:41:29 -08:00
PACKAGE initial import - based on my qpsmtpd fork 2012-06-22 05:38:01 -04:00
README.md Add documentation for rpm packaging (#278) 2016-12-29 16:40:55 -08:00
RELEASE Rpm build fixes (#277) 2016-12-29 16:41:29 -08:00
VERSION Release 1.00 (#307) 2023-02-16 22:33:46 -08:00
qpsmtpd.spec.in Fix rpm packaging (#276) 2016-12-27 10:17:18 -08:00

README.md

Building RPMs

The Makefile contains steps that will build RPMs using the locally-configured rpmbuild environment.

However, a better approach is to use mock which ensures all packages are built in a standard, reproducible environment, and also allows building for targets other than that of the local machine.

The steps to build RPMs with mock are:

  • Create tarball + generate spec file from template

    cd packaging/rpm
    make clean && make buildtargz
    
  • Create SRPM from tarball and spec file

    mock -r epel-7-x86_64 --buildsrpm --spec qpsmtpd.spec --sources build
    mv /var/lib/mock/epel-7-x86_64/result/*.src.rpm build
    
  1. Build RPMs from SRPM

    mock -r epel-7-x86_64 build/*.src.rpm
    mv /var/lib/mock/epel-7-x86_64/result/*.rpm build
    

This builds packages named using the content of the PACKAGE, VERSION, and RELEASE files in the packaging/rpm directory.

These can be overridden on the command-line when building the tarball.

For example, to append the local git commit hash to the RELEASE:

make clean && make buildtargz RELEASE="$(<"RELEASE").$(git rev-parse --short HEAD)"

This will produce a tarball named something like qpsmtpd-0.96-1.83b6aaf.tar.gz