Building an RPM

Although the RPM packaging system is not a supported option for xmlsectool, it is possible to build an RPM using a script and patch file contributed by Peter Schober.

This procedure has been tested on CentOS 7 only.

To build the RPM, first install the rpm-build package on your CentOS system.

The rest of the procedure can (and should) be performed as a normal, non-privileged user.

Create a file ~/.rpmmacros along the following lines:

%_topdir /home/iay/rpm %packager Ian Young <ian@iay.org.uk>

Create the build environment inside your user directory as follows:

$ mkdir -p ~/rpm/{BUILD,RPMS/noarch,SOURCES,SPECS}

In the SPECS directory, place a copy of the xmlsectool.spec file found in the doc directory of the distribution.

In the SOURCES directory, place a copy of the distribution .zip file, and a copy of the xmlsectool.patch file found in the doc directory of the distribution.

Now build the RPM:

$ cd ~/rpm/SPECS $ rpmbuild -bb xmlsectool.spec

The RPM file can now be found in the ~/rpm/RPMS/noarch directory.