diff options
Diffstat (limited to 'packaging/iptables.spec')
-rw-r--r-- | packaging/iptables.spec | 145 |
1 files changed, 75 insertions, 70 deletions
diff --git a/packaging/iptables.spec b/packaging/iptables.spec index 30df5e3..4acafa2 100644 --- a/packaging/iptables.spec +++ b/packaging/iptables.spec @@ -1,91 +1,96 @@ -Name: iptables -Summary: administration tools for packet filtering and NAT -Version: 1.4.9.1 -Release: 1 -Source: %{name}-%{version}.tar.gz -Group: System/Base -URL: http://www.netfilter.org/ -License: GPLv2 -BuildRequires: kernel-headers -Conflicts: kernel < 2.4.20 +Name: iptables +Summary: Tools for managing Linux kernel packet filtering capabilities +Version: 1.4.22 +Release: 1 +Group: System/Network +Source: %{name}-%{version}.tar.gz +URL: http://www.netfilter.org +License: GPL-2.0+ +BuildRequires: kernel-headers %description -These are the user-space administration tools for the Linux -kernel's netfilter and iptables. netfilter and iptables provide -a framework for stateful and stateless packet filtering, network -and port address translation, and other IP packet manipulation. -The framework is the successor to ipchains. -netfilter and iptables are used in applications such as Internet -connection sharing, firewalls, IP accounting, transparent proxying, -advanced routing and traffic control. - -%package ipv6 -Summary: IPv6 support for iptables -Group: System/Base -Requires: %{name} = %{version}-%{release} - -%description ipv6 -The iptables package contains IPv6 (the next version of the IP -protocol) support for iptables. Iptables controls the Linux kernel -network packet filtering code, allowing you to set up firewalls and IP -masquerading. - -Install iptables-ipv6 if you need to set up firewalling for your -network and you are using ipv6. +The iptables utility controls the network packet filtering code in the +Linux kernel. If you need to set up firewalls and/or IP masquerading, +you should install this package. %package devel -Summary: development files for iptable's libipq -Group: System/Base -Requires: %{name} = %{version}-%{release} +Summary: Development package for iptables +Group: System/Network +License: GPL-2.0+ +Requires: %{name} = %{version} +Requires: pkgconfig %description devel -Header files, static libs and documentation for libipq, iptables' -user-space packet queuing library. +iptables development headers and libraries. + +The iptc interface is upstream marked as not public. The interface is not +stable and may change with every new version. It is therefore unsupported. %prep %setup -q + %build -%autogen -%configure --prefix=%{_prefix} -make %{?jobs:-j%jobs} +export CFLAGS+=" $RPM_OPT_FLAGS -Wall -Werror -O2 -D_FORTIFY_SOURCE=2 -fno-strict-aliasing" +export LDFLAGS+=" -Wl,--as-needed" + +%configure --enable-devel --with-kernel=/usr --with-kbuild=/usr --with-ksource=/usr + +# do not use rpath +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + +make %{?_smp_mflags} + %install -rm -rf %{buildroot} make install DESTDIR=%{buildroot} -%clean -rm -rf $RPM_BUILD_ROOT +# remove la file(s) +rm -f %{buildroot}/%{_libdir}/*.la + +# install ip*tables.h header files +install -m 644 include/ip*tables.h %{buildroot}%{_includedir}/ +install -d -m 755 %{buildroot}%{_includedir}/iptables +install -m 644 include/iptables/internal.h %{buildroot}%{_includedir}/iptables/ + +# install ipulog header file +install -d -m 755 %{buildroot}%{_includedir}/libipulog/ +install -m 644 include/libipulog/*.h %{buildroot}%{_includedir}/libipulog/ + +# remove man pages +rm -rf %{buildroot}%{_mandir} -%post -/sbin/ldconfig +# License +mkdir -p %{buildroot}%{_datadir}/license +cp COPYING %{buildroot}%{_datadir}/license/iptables -%postun -p /sbin/ldconfig %files -%defattr(-,root,root) -/usr/bin/iptables-xml -/usr/lib/libip4tc.so -/usr/lib/libip4tc.so.* -/usr/lib/libiptc.so -/usr/lib/libiptc.so.* -/usr/lib/libxtables.so -/usr/lib/libxtables.so.* -/usr/libexec/xtables/libipt* -/usr/libexec/xtables/libxt* -/usr/sbin/iptables* - -%files ipv6 -%defattr(-,root,root) -/usr/sbin/ip6tables* -/usr/lib/libip6tc.so -/usr/lib/libip6tc.so.* -/usr/libexec/xtables/libip6t* +%manifest iptables.manifest +%{_sbindir}/iptables* +%{_sbindir}/ip6tables* +%{_sbindir}/xtables-multi +%{_bindir}/iptables-xml +%dir %{_libdir}/xtables +%{_libdir}/xtables/libipt* +%{_libdir}/xtables/libip6t* +%{_libdir}/xtables/libxt* +%{_libdir}/libip*tc.so.* +%{_libdir}/libxtables.so.* +%{_datadir}/license/iptables %files devel -%defattr(-,root,root) -/usr/include/* -/usr/lib/*.la -/usr/lib/pkgconfig/* -%{_mandir}/man8/iptables* -%{_mandir}/man8/ip6tables* +%dir %{_includedir}/iptables +%{_includedir}/iptables/*.h +%{_includedir}/*.h +%dir %{_includedir}/libiptc +%{_includedir}/libiptc/*.h +%dir %{_includedir}/libipulog +%{_includedir}/libipulog/*.h +%{_libdir}/libip*tc.so +%{_libdir}/libxtables.so +%{_libdir}/pkgconfig/libiptc.pc +%{_libdir}/pkgconfig/libip4tc.pc +%{_libdir}/pkgconfig/libip6tc.pc +%{_libdir}/pkgconfig/xtables.pc |