#
# spec file for package libnfnetlink
#
# 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:           libnfnetlink
%define libsoname	%{name}0
Version:        1.0.1
Release:        10.3
Summary:        Low-level library for Netfilter-related kernel/userspace communication
License:        GPL-2.0
Group:          Productivity/Networking/Security
Url:            http://netfilter.org/projects/libnfnetlink/

#Git-Clone:	git://git.netfilter.org/libnfnetlink
#DL-URL:	ftp://ftp.netfilter.org/pub/libnfnetlink/
Source:         http://netfilter.org/projects/libnfnetlink/files/%name-%version.tar.bz2
Source2:        http://netfilter.org/projects/libnfnetlink/files/%name-%version.tar.bz2.sig
Source3:        baselibs.conf
Source4:        %name.keyring
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
#BuildRequires:  autoconf
#BuildRequires:  automake >= 1.6
#BuildRequires:  libtool
BuildRequires:  pkgconfig >= 0.21

%description
libnfnetlink is the low-level library for netfilter related
kernel/userspace communication. It provides a generic messaging
infrastructure for in-kernel netfilter subsystems (such as
nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their
respective users and/or management tools in userspace.

This library is not meant as a public API for application developers.
It is only used by other netfilter.org projects, such as
libnetfilter_log, libnetfilter_queue or libnetfilter_conntrack.

%package -n %libsoname
Summary:        Low-level library for Netfilter-related kernel/userspace communication
Group:          System/Libraries

%description -n %libsoname
libnfnetlink is the low-level library for netfilter related
kernel/userspace communication. It provides a generic messaging
infrastructure for in-kernel netfilter subsystems (such as
nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their
respective users and/or management tools in userspace.

This library is not meant as a public API for application developers.
It is only used by other netfilter.org projects, such as
libnetfilter_log, libnetfilter_queue or libnetfilter_conntrack.

%package devel
Requires:       %libsoname = %version
Summary:        Low-level library for Netfilter-related kernel/userspace communication
Group:          Development/Libraries/C and C++

%description devel
libnfnetlink is the low-level library for netfilter related
kernel/userspace communication. It provides a generic messaging
infrastructure for in-kernel netfilter subsystems (such as
nfnetlink_log, nfnetlink_queue, nfnetlink_conntrack) and their
respective users and/or management tools in userspace.

This library is not meant as a public API for application developers.
It is only used by other netfilter.org projects, such as
libnetfilter_log, libnetfilter_queue or libnetfilter_conntrack.

%prep
%setup -q

%build
if [ ! -e configure ]; then
	autoreconf -fi;
fi
%configure --disable-static 
#--includedir="%_includedir/%name"
make %{?_smp_mflags}

%install
make install DESTDIR="%buildroot"
rm -f "%buildroot/%_libdir"/*.la;

%post -n %libsoname -p /sbin/ldconfig

%postun -n %libsoname -p /sbin/ldconfig

%files -n %libsoname
%defattr(-,root,root)
%doc COPYING README
%_libdir/libnfnetlink.so.0*

%files devel
%defattr(-,root,root)
%_includedir/%name/
%_libdir/libnfnetlink.so
%_libdir/pkgconfig/libnfnetlink.pc

%changelog
* Mon Sep 29 2014 jengelh@inai.de
- Drop %%version from subincludedir, it tends to break recompiles of
  already-built trees on library updates.
* Thu Apr 24 2014 dmueller@suse.com
- remove dependency on gpg-offline (blocks rebuilds and
  tarball integrity is checked by source-validator anyway)
* Wed Nov 28 2012 sbrabec@suse.cz
- Verify GPG signature
* Mon Oct  8 2012 jengelh@inai.de
- Update to new upstream release 1.0.1
  (no changes over 1.0.0+git35, this is just the official release)
* Fri Aug 31 2012 jengelh@inai.de
- Update to new git snapshot 1.0.0+git35
  * Fix incomplete retrieval of the interface list,
  which causes conntrackd to not operate as desired
  (http://marc.info/?l=netfilter&m=134458290414850&w=2 )
* Fri Feb 10 2012 cfarrell@suse.com
- license update: GPL-2.0
  Look at e.g. src/iftable.c - please check if GPL-3.0 applications require
  this library
* Sat Dec 31 2011 jengelh@medozas.de
- Update to new git snapshot 1.0.0+git28
  * build updates, license update
* Thu Dec 29 2011 jengelh@medozas.de
- Use separate include dir to detect compile errors
* Tue Nov 22 2011 jengelh@medozas.de
- Make License field SPDX compliant (bnc#731935)
* Sat Nov 19 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Sat Apr 24 2010 coolo@novell.com
- buildrequire pkg-config to fix provides
* Fri Feb 26 2010 jengelh@medozas.de
- update to 1.0.0+git1 to have license file available
* Tue Feb 23 2010 jengelh@medozas.de
- add baselibs.conf
- use %%_smp_mflags
- secure *.la delete call
- wrap description at col 70
* Tue Jun 30 2009 bitshuffler #suse@irc.freenode.org
- Updated to 1.0.0