Fedora Build xtables-addons1-1.24 RPM Package With Build Options

Continuing previous article about Building xtables-addons1-1.24 RPM Package, Now added feature which allow us to build the package with options
for example:

$ rpmbuild -ta xtables-addons-1.24.tar.bz2 --with ACCOUNT --with ipset --with geoip

With this command, only ACCOUNT,ipset,geoip modules would be built, other xtables-addons modules are not built(discarded)

Availble options:

--with ACCOUNT
--with CHAOS
--with DELUDE
--with DHCPMAC
--with ECHO
--with IPMARK
--with LOGMARK
--with RAWNAT
--with STEAL
--with SYSRQ
--with TARPIT
--with TEE
--with condition
--with fuzzy
--with geoip
--with iface
--with ipp2p
--with ipset
--with ipv4options
--with length2
--with lscan
--with pknock
--with psd
--with quota2

Fedora Build xtables-addons1-1.24 RPM Package

This tutorial was tested on fedora 12 system, it might be worked on onthers redhat base system, I’ve modified rpm spec file as generic as possible. it was shamelessly stolen 😀 from Jan Engelhardt xtables rpm source file.i slightly modified it a bit

Download xtables-addons 1.24 source

$ wget http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons/1.24/xtables-addons-1.24.tar.bz2?use_mirror=nchc

prepare your .rpmmacros environment, rpmbuild directories, if not exist yet

$ mkdir rpmbuild
$ mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp}

Create .rpmmacros file

$ vi  .rpmmacros
%_topdir                %(echo $HOME)/rpmbuild
%_tmppath               %(echo $HOME)/rpmbuild/tmp

[p>Extract xtables-addons-1.24.tar.bz2, cd to xtables-addons-1.24 directory

$ tar xjf xtables-addons-1.24.tar.bz2
$ cd xtables-addons-1.24