2011-09-20 10:51:26 +02:00
|
|
|
#
|
|
|
|
# spec file for package libnl3
|
|
|
|
#
|
2012-01-03 17:15:02 +01:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-09-20 10:51:26 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: libnl3
|
2011-09-14 10:45:28 +02:00
|
|
|
%define lname libnl3-200
|
|
|
|
%define with_tools 1
|
2011-11-11 03:14:41 +01:00
|
|
|
Version: 3.2.3
|
2011-09-20 10:51:26 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Convenience library for working with Netlink sockets
|
|
|
|
License: LGPL-2.1, GPL-2.0
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-09-14 10:45:28 +02:00
|
|
|
|
2011-11-21 18:13:08 +01:00
|
|
|
Url: http://people.suug.ch/~tgr/libnl/
|
2011-09-14 10:45:28 +02:00
|
|
|
#Git-Clone: git://git.kernel.org/pub/scm/libs/netlink/libnl
|
|
|
|
#Git-Clone: git://git.infradead.org/users/tgr/libnl
|
2011-09-20 10:51:26 +02:00
|
|
|
Source: libnl-%version.tar.xz
|
|
|
|
Source2: baselibs.conf
|
|
|
|
Patch1: libdir.diff
|
2012-01-03 17:15:02 +01:00
|
|
|
Patch2: avoid-dangling-co_major_cache-reference-to-NL_AUTO_P.diff
|
2011-09-20 10:51:26 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-12-31 23:02:58 +01:00
|
|
|
BuildRequires: autoconf automake bison fdupes flex libtool
|
2011-12-31 22:27:46 +01:00
|
|
|
BuildRequires: pkgconfig >= 0.23 python-devel xz
|
2011-09-14 10:45:28 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
The libnl suite is a collection of libraries providing APIs to
|
|
|
|
Netlink protocol based Linux kernel interfaces.
|
|
|
|
|
|
|
|
%package -n %lname
|
2011-09-20 10:51:26 +02:00
|
|
|
Summary: Convenience library for working with Netlink sockets
|
|
|
|
Group: System/Libraries
|
|
|
|
License: LGPL-2.1
|
|
|
|
Requires: libnl-config >= %version
|
2011-09-14 10:45:28 +02:00
|
|
|
|
|
|
|
%description -n %lname
|
|
|
|
The libnl suite is a collection of libraries providing APIs to
|
|
|
|
netlink protocol based Linux kernel interfaces.
|
|
|
|
|
|
|
|
%package devel
|
2011-09-20 10:51:26 +02:00
|
|
|
Summary: Libraries and headers for libnl
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
License: LGPL-2.1
|
|
|
|
Requires: %lname = %version
|
|
|
|
Provides: libnl-devel = %version-%release
|
2011-09-14 10:45:28 +02:00
|
|
|
# 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.
|
|
|
|
#
|
2011-09-20 10:51:26 +02:00
|
|
|
|
2011-09-14 10:45:28 +02:00
|
|
|
%package -n libnl-config
|
2011-09-20 10:51:26 +02:00
|
|
|
Summary: Name maps for libnl
|
|
|
|
Group: Productivity/Networking/Security
|
2011-09-14 10:45:28 +02:00
|
|
|
%if 0%{?suse_version} >= 1130
|
2011-09-20 10:51:26 +02:00
|
|
|
BuildArch: noarch
|
2011-09-14 10:45:28 +02:00
|
|
|
%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
|
2011-09-20 10:51:26 +02:00
|
|
|
Summary: Command line utilities to directly work with Netlink
|
|
|
|
Group: Productivity/Networking/Security
|
|
|
|
License: GPL-2.0
|
2011-09-14 10:45:28 +02:00
|
|
|
|
|
|
|
%description -n libnl-tools
|
|
|
|
Various test program with which the functionality of libnl is
|
|
|
|
demonstrated.
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%if 0%{?__xz:1}
|
2011-09-21 20:37:09 +02:00
|
|
|
%setup -qn libnl-%version
|
2011-09-14 10:45:28 +02:00
|
|
|
%else
|
|
|
|
tar -xf "%{S:0}" --use=xz;
|
2011-09-21 20:37:09 +02:00
|
|
|
%setup -DTqn libnl-%version
|
2011-09-14 10:45:28 +02:00
|
|
|
%endif
|
2012-01-03 17:15:02 +01:00
|
|
|
%patch -P 1 -P 2 -p1
|
2011-09-14 10:45:28 +02:00
|
|
|
|
|
|
|
%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
|
2011-09-20 10:51:26 +02:00
|
|
|
|
2011-09-14 10:45:28 +02:00
|
|
|
%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
|