File libnatpmp1.spec of Package libnatpmp
#
# spec file for package libnatpmp1
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2016 Ákos Szőts <szotsaki@gmail.com>
#
# 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/
#
%define _name libnatpmp
Name: %{_name}1
Version: 20150609
Release: 0
Summary: Provides a way to do NAT traversal as part of the Bonjour specification
License: BSD-3-Clause
Group: Productivity/Networking/Routing
Url: http://miniupnp.free.fr/libnatpmp.html
Source0: http://miniupnp.free.fr/files/download.php?file=%{_name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: make
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
NAT-PMP is the direct concurrent to the UPnP IGD specification. It is providing a way to do NAT traversal. It is part of the Bonjour protocol specifications.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}-%{release}
%description devel
Development files for %{name}
%prep
%setup -q -n %{_name}-%{version}
%build
make %{?_smp_mflags}
%install
%make_install PREFIX=%{buildroot} INSTALLDIRLIB=%{buildroot}/%{_libdir}
find %{buildroot} -type f \( -name "*.a" -or -name "*.la" \) -delete -print
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/natpmpc
%{_libdir}/%{_name}.so.*
%doc LICENSE README Changelog.txt
%files devel
%defattr(-,root,root)
%{_includedir}/natpmp.h
%{_libdir}/%{_name}.so
%changelog