Name: libnl3 %define lname libnl3-200 %define with_tools 1 Version: 3.2 Release: 0 Summary: Convenience library for working with Netlink sockets License: LGPL-2.1, GPL-2.0 Group: Development/Libraries/C and C++ URL: http://people.suug.ch/~tgr/libnl/ #Git-Clone: git://git.kernel.org/pub/scm/libs/netlink/libnl #Git-Clone: git://git.infradead.org/users/tgr/libnl Source: libnl-%version.tar.xz Source2: baselibs.conf Patch1: libdir.diff BuildRoot: %_tmppath/%name-%version-build BuildRequires: bison, fdupes, flex, pkgconfig, python-devel, xz %description The libnl suite is a collection of libraries providing APIs to Netlink protocol based Linux kernel interfaces. %package -n %lname Summary: Convenience library for working with Netlink sockets Group: System/Libraries License: LGPL-2.1 Requires: libnl-config >= %version %description -n %lname The libnl suite is a collection of libraries providing APIs to netlink protocol based Linux kernel interfaces. %package devel Summary: Libraries and headers for libnl Group: Development/Libraries/C and C++ Requires: %lname = %version-%release Provides: libnl-devel = %version-%release # Starting with libnl3(-3.2), no more conflicts %description devel The libnl suite is a collection of libraries providing APIs to Netlink protocol based Linux kernel interfaces. %if %with_tools # # Only one of the libnl packages should create the config and tools. # %package -n libnl-config Summary: Name maps for libnl Group: Productivity/Networking/Security %if 0%{?suse_version} >= 1130 BuildArch: noarch %endif %description -n libnl-config This package contains configuration files for libnl and programs using the same; in particular - name maps for class-ids -- class-names (like /etc/services) - aliases for locations within a packet (ip6.dst => byte offset) %package -n libnl-tools Summary: Command line utilities to directly work with Netlink Group: Productivity/Networking/Security %description -n libnl-tools Various test program with which the functionality of libnl is demonstrated. %endif %prep %if 0%{?__xz:1} %setup -qn libnl %else tar -xf "%{S:0}" --use=xz; %setup -DTqn libnl %endif %patch -P 1 -p1 %build # we do have patches autoreconf -fi; if [ ! -e configure ]; then autoreconf -fi; fi; %configure --disable-static make %{?_smp_mflags}; %install b="%buildroot"; %makeinstall find "$b" -iname "*.la" -delete; %if !%with_tools rm -Rf "$b/%_sysconfdir/libnl"; rm -Rf "$b/%_sbindir" "$b/%_mandir/man8"; %endif %fdupes %buildroot %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig %files -n %lname %defattr(-,root,root) %_libdir/libnl*.so.* %_libdir/%lname %files devel %defattr(-,root,root) %_includedir/%name %_libdir/libnl*.so %_libdir/pkgconfig/* %if %with_tools # %files -n libnl-config %defattr(-,root,root) %dir %_sysconfdir/libnl %config %_sysconfdir/libnl/* %files -n libnl-tools %defattr(-,root,root) %_mandir/man*/* %_sbindir/* %endif %changelog