%define major 12 %define libname %mklibname %{name} %{major} %define develname %mklibname -d %{name} Summary: Library and tool to control NAT in UPnP-enabled routers Name: miniupnpc Version: 1.9.20141128 Release: %mkrel 1 License: LGPLv2+ Group: System/Libraries URL: http://miniupnp.free.fr/ Source: http://miniupnp.free.fr/files/%{name}-%{version}.tar.gz Patch0: miniupnpc-1.6-link.patch # taken from Fedora # Do not create libminiupnpc.so.%%{version} and libminiupnpc.so.%%{major} linking to it Patch1: %{name}-version.patch # taken from Fedora Source1: USAGE BuildRequires: cmake %description miniupnpc is an implementation of a UPnP client library, enabling applications to access the services provided by an UPnP "Internet Gateway Device" present on the network. In UPnP terminology, it is a UPnP Control Point. %package -n %{libname} Summary: Library and tool to control NAT in UPnP-enabled routers Group: System/Libraries %description -n %{libname} miniupnpc is an implementation of a UPnP client library, enabling applications to access the services provided by an UPnP "Internet Gateway Device" present on the network. In UPnP terminology, it is a UPnP Control Point. %package -n %{develname} Summary: Header files, libraries and development documentation for miniupnpc Group: Development/C Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package contains the header files and development documentation for miniupnpc. If you like to develop programs using miniupnpc, you will need to install miniupnpc-devel. %prep %setup -q %patch0 -p0 %patch1 -p1 cp %{SOURCE1} . %build %cmake -DUPNPC_BUILD_STATIC=OFF -DUPNPC_BUILD_TESTS=ON # build example client cd .. %make upnpc-shared all %install %makeinstall_std -C build # install manpage and binary for example client using libminiupnpc install -D -m 644 man3/miniupnpc.3 %buildroot/%{_mandir}/man3/miniupnpc.3 install -D -m 0755 upnpc-shared %buildroot%{_bindir}/upnpc %check # testportlistingparse files seem missing, disabled for now # make CFLAGS="-DMINIUPNPC_SET_SOCKET_TIMEOUT" check %files %doc Changelog.txt LICENSE README USAGE %{_bindir}/upnpc %{_mandir}/man3/miniupnpc.3.* %files -n %{libname} %{_libdir}/*.so.%{major} %files -n %{develname} %{_includedir}/miniupnpc %{_libdir}/*.so %changelog * Sun Dec 14 2014 doktor5000 <doktor5000> 1.9.20141128-1.mga5 + Revision: 803179 - new version 1.9.20141128 - major changed to 12 - fix library libminiupnpc.so.%%{version} linking to libminiupnpc.so.%%{major} o patch %%{name}-version.patch taken from Fedora - enabled build of example commandline client binary upnpc o install manpage and USAGE file (latter taken from Fedora) for upnpc client - prepare to build and enable tests, although testportlistingparse missing * Wed Oct 15 2014 umeabot <umeabot> 1.9.20140701-4.mga5 + Revision: 744043 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 1.9.20140701-3.mga5 + Revision: 727301 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 1.9.20140701-2.mga5 + Revision: 682525 - Mageia 5 Mass Rebuild * Thu Aug 07 2014 fwang <fwang> 1.9.20140701-1.mga5 + Revision: 660778 - 1.9.20140701 * Wed May 14 2014 luigiwalser <luigiwalser> 1.9-1.mga5 + Revision: 622807 - 1.9 (fixes DoS issue) - library major is now 10 * Sat Oct 19 2013 umeabot <umeabot> 1.8-2.mga4 + Revision: 533952 - Mageia 4 Mass Rebuild * Sun Sep 08 2013 fwang <fwang> 1.8-1.mga4 + Revision: 475855 - new version 1.8 * Sat Jan 12 2013 umeabot <umeabot> 1.6-3.mga3 + Revision: 360104 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sun Aug 07 2011 fwang <fwang> 1.6-2.mga2 + Revision: 132178 - commit header patch - update header list - imported package miniupnpc