File libnl.spec of Package libnl

#
# spec file for package libnl (Version 1.1)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           libnl
Summary:        Convenience library for kernel netlink sockets
Group:          Development/Libraries/Other
License:        LGPLv2.1+
Version:        1.1
Release:        54
# bug437293
%ifarch ppc64
Obsoletes:      libnl-64bit
%endif
#
Url:            http://people.suug.ch/~tgr/libnl/
Source:         http://people.suug.ch/~tgr/libnl/files/libnl-%{version}.tar.bz2
Source99:       baselibs.conf
Patch0:         libnl-1.1.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkg-config

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

%package devel
License:        LGPLv2.1+
Summary:        Convenience library for kernel netlink sockets
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}-%{release}
# bug437293
%ifarch ppc64
Obsoletes:      libnl-devel-64bit
%endif
#

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

%prep
%setup -q -n libnl-%{version}
%patch0 -p1

%build
#%configure
CFLAGS="$RPM_OPT_FLAGS" \
    ./configure \
    --prefix=%{_prefix} \
    --libdir=/%_lib \
    --includedir=%{_includedir}
make %{?jobs:-j%jobs}

%install
%makeinstall
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
mv $RPM_BUILD_ROOT/%_lib/pkgconfig/* $RPM_BUILD_ROOT/%{_libdir}/pkgconfig

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
/%_lib/%{name}.so.*
%doc COPYING ChangeLog

%files devel
%defattr(-,root,root,0755)
%{_includedir}/netlink/
/%_lib/%{name}.so
%{_libdir}/pkgconfig/%{name}-1.pc

%changelog
openSUSE Build Service is sponsored by