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.
This procedure does not work as described with the 2.0.0-beta-1 release due to file naming issues. For the beta 1 release, modify the procedure by unpacking the distribution release into an xmlsectool-2.0.0-beta-1
directory, renaming that directory to xmlsectool-2.0.0
, and using the zip
command to make a new xmlsectool-2.0.0-bin.zip
distribution in the SOURCES
directory. It is also necessary to use the xmlsectool.spec
and xmlsectool.patch
files from the git repository rather than the ones from the beta 1 distribution.
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.