#global snapdate 20140903

Name:           libnftnl
Version:        1.1.9
Release:        1%{?_dist_release}
Summary:        Library for low-level interaction with nftables Netlink's API over libmnl
Group:          system
Vendor:         Project Vine
Distribution:   Vine Linux

License:        GPLv2+
URL:            http://netfilter.org/projects/libnftnl/
Source0:        http://ftp.netfilter.org/pub/libnftnl/libnftnl-%{version}.tar.bz2

BuildRequires:  libmnl-devel
BuildRequires:  mxml-devel
BuildRequires:  jansson-devel

# replace old libnftables package
Provides:       libnftables = %{version}-%{release}
Obsoletes:      libnftables < 0-0.6

%description
A library for low-level interaction with nftables Netlink's API over libmnl.


%package        devel
Summary:        Development files for %{name}
Summary(ja):    %{name} の開発用ファイル
Group:          programming
Requires:       %{name}%{_isa} = %{version}-%{release}
# replace old libnftables-devel package
Provides:       libnftables-devel = %{version}-%{release}
Obsoletes:      libnftables-devel < 0-0.6

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%debug_package


%prep
#setup -q -n libnftnl-%{snapdate}
%setup -q


%build
%configure --disable-static --disable-silent-rules --with-json-parsing --with-xml-parsing
make %{?_smp_mflags}


%install
%make_install
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'


%check
make %{?_smp_mflags} check
# tests are broken in 1.0.1 re-enable on next update
#cd tests
#sh ./test-script.sh


%files
%license COPYING
%{_libdir}/*.so.*

%files devel
%{_libdir}/libnft*.so
%{_libdir}/pkgconfig/libnftnl.pc
%{_includedir}/libnftnl


%changelog
* Fri Mar 12 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.9-1
- new upstream release.
- dropped scriptlets.

* Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.6-1
- new upstream release.

* Mon Sep 02 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.1.4-1
- new upstream release.

* Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.9-1
- new upstream release.

* Mon Aug 24 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.0.3-3
- added Group tag

* Tue Jul  7 2015 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.0.3-2
- initial build for Vine Linux.

* Fri Dec 26 2014 Kevin Fenzi <kevin@scrye.com> 1.0.3-1
- Update to final 1.0.3

* Wed Sep 03 2014 Kevin Fenzi <kevin@scrye.com> 1.0.3-0.1.20140903git
- Update to 20140903 git snapshot

* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Wed Jun 25 2014 Kevin Fenzi <kevin@scrye.com> 1.0.2-1
- Update to 1.0.2

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Apr 24 2014 Kevin Fenzi <kevin@scrye.com> 1.0.1-1.
- Update to 1.0.1

* Sun Mar 30 2014 Kevin Fenzi <kevin@scrye.com> 1.0.0-1.20140330git
- Update to 20140330 snapshot
- Sync version to be a post 1.0.0 snapshot

* Wed Mar 26 2014 Kevin Fenzi <kevin@scrye.com> 0-0.10.20140326git
- Update to 20140326 snapshot

* Fri Mar 07 2014 Kevin Fenzi <kevin@scrye.com> 0-0.9.20140307git
- Update to 20140307 snapshot

* Sat Jan 25 2014 Kevin Fenzi <kevin@scrye.com> 0-0.8.20140125git
- Update to 20140125

* Thu Jan 23 2014 Kevin Fenzi <kevin@scrye.com> 0-0.7.20140122git
- Add obsoletes/provides to devel subpackage as well. 

* Wed Jan 22 2014 Kevin Fenzi <kevin@scrye.com> 0-0.6.20140122git
- Renamed libnftnl
- Update to 20140122 snapshot.

* Sat Jan 18 2014 Kevin Fenzi <kevin@scrye.com> 0-0.5.20140118git
- Update to 20140118 snapshot.

* Sat Jan 11 2014 Kevin Fenzi <kevin@scrye.com> 0-0.4.20140111git
- Update to 20140111 snapshot. 
- Enable xml (some tests stll fail, but it otherwise builds ok)

* Mon Dec 02 2013 Kevin Fenzi <kevin@scrye.com> 0-0.3.20131202git
- Update to 20131202 snapshot, switch to upstream snapshot repo instead of git checkouts. 

* Mon Dec 02 2013 Kevin Fenzi <kevin@scrye.com> 0-0.2
- Fixes from review. 

* Sat Nov 30 2013 Kevin Fenzi <kevin@scrye.com> 0-0.1
- initial version for Fedora review