File libnl-1_1.spec of Package libnl-1_1

#
# spec file for package libnl-1_1
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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:           libnl-1_1
%define lname	libnl1
Summary:        Convenience library for kernel netlink sockets
License:        LGPL-2.1
Group:          Development/Libraries/Other
Version:        1.1.4
Release:        0
Url:            http://www.carisma.slowglass.com/~tgr/libnl/

#DL-URL:	http://www.carisma.slowglass.com/~tgr/libnl/files/
Source:         libnl-%version.tar.xz
Source2:        baselibs.conf
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1140
BuildRequires:  linux-glibc-devel >= 2.6.23
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  linux-kernel-headers >= 2.6.23
%endif
%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version}
BuildRequires:  kernel-headers >= 2.6.23
%endif
BuildRequires:  pkgconfig >= 0.21
BuildRequires:  xz

%description
This package contains a convenience library to simplify using the Linux
kernels netlink sockets interface for network manipulation.

%package -n %lname
Summary:        Convenience library for working with Netlink sockets
License:        LGPL-2.1
Group:          System/Libraries
%ifarch ppc64
# bug437293
Obsoletes:      libnl-64bit
%endif
# Added for 12.1
Obsoletes:      libnl < %version-%release
Provides:       libnl = %version-%release
# Added for 13.1
Obsoletes:      libnl-1_1 < %version-%release
Provides:       libnl-1_1 = %version-%release

%description -n %lname
The libnl suite is a collection of libraries providing APIs to
netlink protocol based Linux kernel interfaces.

%package devel
Summary:        Convenience library for kernel netlink sockets
License:        LGPL-2.1+
Group:          Development/Libraries/Other
Requires:       %lname = %version-%release
%ifarch ppc64
# bug437293
Obsoletes:      libnl-devel-64bit
%endif
# Added for 12.1
Provides:       libnl-devel = %release-%version

%description devel
This package contains a convenience library to simplify using the Linux
kernels netlink sockets interface for network manipulation.

%prep
%setup -qn libnl-%version

%build
%configure --disable-static
find . -type f -name "Makefile*" -exec perl -i -pe 's{\@echo}{echo}' "{}" "+"
make %{?_smp_mflags}

%install
b="%buildroot"
make install DESTDIR="$b"
# --disable-static seems to have no effect
rm -f "$b/%_libdir"/*.a

%post   -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig

%files -n %lname
%defattr(-,root,root)
%_libdir/libnl.so.1*
%doc COPYING ChangeLog

%files devel
%defattr(-,root,root)
%_includedir/netlink/
%_libdir/libnl.so
%_libdir/pkgconfig/libnl-1.pc

%changelog
openSUSE Build Service is sponsored by