Name: libnl
Summary: Convenience library for kernel netlink sockets
Summary(ja): Netlink ソケットの利用に便利なライブラリ
Version: 1.1.4
Release: 1%{?_dist_release}

Group: System Environment/Libraries
License: LGPLv2
URL: http://people.suug.ch/~tgr/libnl/

Source: http://people.suug.ch/~tgr/libnl/files/libnl-%{version}.tar.gz
Patch1: libnl-1.0-pre5-static.patch
Patch2: libnl-1.0-pre5-debuginfo.patch
Patch3: libnl-1.0-pre8-use-vasprintf-retval.patch
Patch4: libnl-1.0-pre8-more-build-output.patch
Patch5: libnl-1.1-include-limits-h.patch
Patch6: libnl-1.1-doc-inlinesrc.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: doxygen

Vendor: Project Vine
Distribution: Vine Linux
Packager: daisuke

%description
This package contains a convenience library to simplify
using the Linux kernel's netlink sockets interface for
network manipulation

%package devel
Summary: Libraries and headers for using libnl
Summary(ja): Libnl の開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: kernel-headers

%description devel
This package contains various headers for using libnl

%prep
%setup -q -n %{name}-%{version}
%patch4 -p1 -b .more-build-output
%patch5 -p1 -b .limits
%patch6 -p1 -b .doc-inlinesrc

# a quick hack to make doxygen stripping builddir from html outputs.
sed -i.org -e "s,^STRIP_FROM_PATH.*,STRIP_FROM_PATH = `pwd`," doc/Doxyfile.in

%build
%configure
make
make gendoc

%install
%{__rm} -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

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

%changelog
* Fri Oct  3 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.1.4-1
- updated to 1.1.4
- dropt Patch1, 2 and 3
- moved libnl to System Environment/Libraries Group
- updated Japanese summary

* Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1-4
- rebuild with VineSeed environment

* Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 1.1-3
- rebuilt with rpm-4.8.1 for pkg-config

* Wed May 05 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1-2
- rebuild with new toolchain

* Wed Jul 30 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1-1
- initial build for Vine Linux

* Fri Jun 27 2008 Dan Williams <dcbw@redhat.com> - 1.1-5
- Build documentation in -devel package (rh #452646)

* Thu May 29 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.1-4
- fix license tag

* Fri Feb 22 2008 Dan Williams <dcbw@redhat.com> - 1.1-3
- Include limits.h to fix gcc 4.3 rebuild issues (rh #434055)

* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1-2
- Autorebuild for GCC 4.3

* Wed Jan 23 2008 Dan Williams <dcbw@redhat.com> - 1.1-1
- Update to version 1.1

* Tue Dec 18 2007 Dan Williams <dcbw@redhat.com> - 1.0-0.15.pre8.git20071218
- Handle removal of include/linux/ip_mp_alg.h in 2.6.24

* Tue Dec 18 2007 Dan Williams <dcbw@redhat.com> - 1.0-0.14.pre8.git20071217
- devel package should require kernel-headers

* Mon Dec 17 2007 Dan Williams <dcbw@redhat.com> - 1.0-0.13.pre8.git20071217
- Add dist tag to revision 

* Mon Dec 17 2007 Dan Williams <dcbw@redhat.com> - 1.0-0.12.pre8.git20071217
- Update to -pre8 + fixes (rh #401761)

* Mon Aug 14 2006 Peter Jones <pjones@redhat.com> - 1.0-0.10.pre5.4
- Fix nl_recv() for ppc64

* Mon Jul 31 2006 Jeremy Katz <katzj@redhat.com> - 1.0-0.10.pre5.3
- unbreak the pkgconfig file

* Wed Jul 26 2006 Matthias Clasen <mclasen@redhat.com> - 1.0-0.10.pre5.2
- Fix the pkgconfig file on 64-bit systems (#197176)

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0-0.10.pre5.1
- rebuild

* Thu Jun 15 2006 Peter Jones <pjones@redhat.com> 1.0-0.10.pre5
- Fix debuginfo generation.

* Fri May 26 2006 Jason Vas Dias <jvdias@redhat.com> 1.0-0.9.pre5
- Allow build to succeed with new gcc / glibc-kernheaders
  (compile failed on __u64 redefinition on x86_64).
- Add a static %{_libdir}/libnl.a library to libnl-devel for
  programs that might need to do a static link to libnl.
  Added after consultation with Christopher Aillon.

* Sun Feb 12 2006 Christopher Aillon <caillon@redhat.com> 1.0-0.8.pre5
- Rebuild

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> 1.0-0.7.pre5.1
- rebuilt for new gcc4.1 snapshot and glibc changes

* Mon Jan 16 2006 Christopher Aillon <caillon@redhat.com> 1.0-0.7.pre5
- Add patch to not chown files to root.root during make install; it
  happens normally.

* Mon Jan  9 2006 Christopher Aillon <caillon@redhat.com> 1.0-0.6.pre5
- Correctly install the pkgconfig file

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Wed Nov  2 2005 Christopher Aillon <caillon@redhat.com> 1.0-0.5.pre5
- Fix 64bit LIBDIR issue; use $LIBDIR instead of $PREFIX/lib

* Wed Nov  2 2005 Christopher Aillon <caillon@redhat.com> 1.0-0.4.pre5
- Update to 1.0-pre5

* Tue Nov  1 2005 Christopher Aillon <caillon@redhat.com> 1.0-0.3.pre4
- Update to 1.0-pre4

* Tue Nov  1 2005 Christopher Aillon <caillon@redhat.com> 1.0-0.2.pre3
- Minor specfile cleanup

* Thu Oct 27 2005 Dan Williams <dcbw@redhat.com> 1.0-0.1.pre3
- Split into main and devel packages

* Thu Oct 27 2005 Dan Williams <dcbw@redhat.com> 1.0-0.0.pre3
- initial build