diff --git a/ipset.changes b/ipset.changes index 271e0c9..fbf4f13 100644 --- a/ipset.changes +++ b/ipset.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 15 16:44:31 UTC 2017 - kstreitova@suse.com + +- fix build for Factory +- run spec-cleaner + ------------------------------------------------------------------- Fri Mar 17 11:45:35 UTC 2017 - jengelh@inai.de diff --git a/ipset.spec b/ipset.spec index d8d2c79..71fc042 100644 --- a/ipset.spec +++ b/ipset.spec @@ -16,8 +16,15 @@ # -Name: ipset %define lname libipset3 +%if 0%{?suse_version} && 0%{?suse_version} < 1330 +# Factory gets new kernels, old releases don't. +# Always build KMPs for all versions older than Factory. +%define ipset_build_kmp 1 +%else +%define ipset_build_kmp 0 +%endif +Name: ipset Version: 6.32 Release: 0 Summary: Netfilter ipset administration utility @@ -26,28 +33,22 @@ Group: Productivity/Networking/Security Url: http://ipset.netfilter.org/ #Git-Clone: git://git.netfilter.org/ipset #Git-Web: http://git.netfilter.org/ -Source: http://ipset.netfilter.org/%name-%version.tar.bz2 -Source3: %name-preamble +Source: http://ipset.netfilter.org/%{name}-%{version}.tar.bz2 +Source3: %{name}-preamble Patch1: ipset-destdir.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: linux-glibc-devel >= 2.6.24 -BuildRequires: pkg-config >= 0.21 +BuildRequires: pkgconfig >= 0.21 BuildRequires: pkgconfig(libmnl) >= 1 -%if 0%{?suse_version} && 0%{?suse_version} < 1330 -# Factory gets new kernels, old releases don't. -# Always build KMPs for all versions older than Factory. -%define ipset_build_kmp 1 -%endif %if 0%{?ipset_build_kmp} -BuildRequires: %kernel_module_package_buildreqs +BuildRequires: %{kernel_module_package_buildreqs} +BuildRequires: kernel-syms >= 2.6.39 +%kernel_module_package -p %{name}-preamble %if 0%{?suse_version} >= 1320 BuildRequires: kmod-compat %endif -BuildRequires: kernel-syms >= 2.6.39 -%kernel_module_package -p %name-preamble %endif %description @@ -78,11 +79,11 @@ when matching an entry against a set. This package contains a version update to the in-kernel ipset modules. -%package -n %lname +%package -n %{lname} Summary: Userspace library for the in-kernel Netfilter ipset interface Group: System/Libraries -%description -n %lname +%description -n %{lname} IP sets are a framework inside the Linux kernel, which can be administered by the ipset utility. Depending on the type, currently an IP set may store IP addresses, (TCP/UDP) port numbers or IP @@ -92,7 +93,7 @@ when matching an entry against a set. %package devel Summary: Development files for ipset extensions Group: Development/Libraries/C and C++ -Requires: %lname = %version +Requires: %{lname} = %{version} %description devel IP sets are a framework inside the Linux kernel, which can be @@ -103,59 +104,56 @@ when matching an entry against a set. %prep %setup -q -%patch -P 1 -p1 +%patch1 -p1 %build # build wants to call modinfo at some point -export PATH="$PATH:/usr/sbin" +export PATH="$PATH:%{_prefix}/sbin" autoreconf -fi %if 0%{?ipset_build_kmp} -for flavor in %flavors_to_build; do - cp -a . "../%name-$flavor-%version" - pushd "../%name-$flavor-%version/" +for flavor in %{flavors_to_build}; do + cp -a . "../%{name}-$flavor-%{version}" + pushd "../%{name}-$flavor-%{version}/" # ksource: it just checks for a header %configure --disable-static \ - --with-kbuild="/usr/src/linux-obj/%_target_cpu/$flavor" \ - --with-ksource="/usr/src/linux" \ - --includedir="%_includedir/%name" + --with-kbuild="%{_prefix}/src/linux-obj/%{_target_cpu}/$flavor" \ + --with-ksource="%{_prefix}/src/linux" \ + --includedir="%{_includedir}/%{name}" make %{?_smp_mflags} all modules popd done %endif %configure --disable-static --with-kmod=no \ - --includedir="%_includedir/%name" + --includedir="%{_includedir}/%{name}" make %{?_smp_mflags} %install -export PATH="$PATH:/usr/sbin" -b="%buildroot" +export PATH="$PATH:%{_prefix}/sbin" +b=%{buildroot} %if 0%{?ipset_build_kmp} -for flavor in %flavors_to_build; do - pushd "../%name-$flavor-%version/" +for flavor in %{flavors_to_build}; do + pushd "../%{name}-$flavor-%{version}/" make %{?_smp_mflags} install modules_install \ DESTDIR="$b" INSTALL_MOD_PATH="$b" V=1 popd; done; %endif make %{?_smp_mflags} install DESTDIR="$b" -find "$b/%_libdir" -type f -name "*.la" -delete +find %{buildroot} -type f -name "*.la" -delete -print -%post -n %lname -p /sbin/ldconfig -%postun -n %lname -p /sbin/ldconfig +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig %files -%defattr(-,root,root) -%_sbindir/ipset -%_mandir/man*/* +%{_sbindir}/ipset +%{_mandir}/man*/* -%files -n %lname -%defattr(-,root,root) -%_libdir/libipset.so.3* +%files -n %{lname} +%{_libdir}/libipset.so.3* %files devel -%defattr(-,root,root) -%_libdir/libipset.so -%_libdir/pkgconfig/libipset.pc -%_includedir/%name/ +%{_libdir}/libipset.so +%{_libdir}/pkgconfig/libipset.pc +%{_includedir}/%{name}/ %changelog