- still more review fixes (rhbz#225906)

- consistent macro usage
- use sed instead of perl for rpath removal
- use standard RPM CFLAGS, but also -fno-strict-aliasing (needed for
    libiptc*)
This commit is contained in:
Thomas Woerner 2009-03-05 14:06:37 +00:00
parent 986f923585
commit 50c011a4ab

View File

@ -1,7 +1,7 @@
Name: iptables
Summary: Tools for managing Linux kernel packet filtering capabilities
Version: 1.4.2
Release: 2%{?dist}
Release: 3%{?dist}
Source: http://www.netfilter.org/projects/iptables/files/%{name}-%{version}.tar.bz2
Source1: iptables.init
Source2: iptables-config
@ -56,11 +56,12 @@ stable and may change with every new version. It is therefore unsupported.
%patch5 -p1 -b .cloexec
%build
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
./configure --enable-devel --enable-libipq --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --libdir=/%{_libdir} --libexecdir=/%{_lib} --mandir=%{_mandir} --includedir=%{_includedir} --with-kernel=/usr --with-kbuild=/usr --with-ksource=/usr
# do not use rpath
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$li
bdir\"|g;' libtool
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
@ -84,17 +85,17 @@ install -d -m 755 %{buildroot}%{_includedir}/libipulog/
install -m 644 include/libipulog/*.h %{buildroot}%{_includedir}/libipulog/
# install init scripts and configuration files
install -d -m 755 $RPM_BUILD_ROOT/etc/rc.d/init.d
install -c -m 755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/iptables
install -d -m 755 %{buildroot}/etc/rc.d/init.d
install -c -m 755 %{SOURCE1} %{buildroot}/etc/rc.d/init.d/iptables
sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE1} > ip6tables.init
install -c -m 755 ip6tables.init $RPM_BUILD_ROOT/etc/rc.d/init.d/ip6tables
install -d -m 755 $RPM_BUILD_ROOT/etc/sysconfig
install -c -m 755 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/iptables-config
install -c -m 755 ip6tables.init %{buildroot}/etc/rc.d/init.d/ip6tables
install -d -m 755 %{buildroot}/etc/sysconfig
install -c -m 755 %{SOURCE2} %{buildroot}/etc/sysconfig/iptables-config
sed -e 's;iptables;ip6tables;g' -e 's;IPTABLES;IP6TABLES;g' < %{SOURCE2} > ip6tables-config
install -c -m 755 ip6tables-config $RPM_BUILD_ROOT/etc/sysconfig/ip6tables-config
install -c -m 755 ip6tables-config %{buildroot}/etc/sysconfig/ip6tables-config
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%post
/sbin/ldconfig
@ -150,6 +151,12 @@ fi
%{_libdir}/pkgconfig/xtables.pc
%changelog
* Thu Mar 5 2009 Thomas Woerner <twoerner@redhat.com> 1.4.2-3
- still more review fixes (rhbz#225906)
- consistent macro usage
- use sed instead of perl for rpath removal
- use standard RPM CFLAGS, but also -fno-strict-aliasing (needed for libiptc*)
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild