2011-12-23 20:16:24 +01:00
|
|
|
#
|
|
|
|
# spec file for package miniupnpc
|
|
|
|
#
|
2021-01-11 13:24:21 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2011-12-23 20:16:24 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-01-11 13:24:21 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-12-23 20:16:24 +01:00
|
|
|
#
|
|
|
|
|
2012-12-29 14:00:59 +01:00
|
|
|
|
2018-05-27 11:51:39 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define soname 17
|
2018-07-02 11:02:40 +02:00
|
|
|
%bcond_without python2
|
2011-12-23 20:16:24 +01:00
|
|
|
Name: miniupnpc
|
2021-01-11 13:24:21 +01:00
|
|
|
Version: 2.2.1
|
2012-12-26 10:40:46 +01:00
|
|
|
Release: 0
|
2011-12-23 20:16:24 +01:00
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client
|
2012-01-07 23:08:53 +01:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Networking/Other
|
2018-07-02 11:02:40 +02:00
|
|
|
URL: http://miniupnp.free.fr/
|
2011-12-23 20:16:24 +01:00
|
|
|
Source: http://miniupnp.free.fr/files/miniupnpc-%{version}.tar.gz
|
2015-07-29 14:00:33 +02:00
|
|
|
Source99: baselibs.conf
|
2018-07-02 11:02:40 +02:00
|
|
|
# PATCH-FIX-SUSE: do not hardcode kernel version in headers
|
|
|
|
Patch0: miniupnpc-kernelversion.patch
|
2018-05-27 11:51:39 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2011-12-23 20:16:24 +01:00
|
|
|
Requires: libminiupnpc%{soname} = %{version}-%{release}
|
|
|
|
|
2021-03-25 19:49:47 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# TW: generate subpackages for every python3 flavor
|
2020-12-12 01:47:57 +01:00
|
|
|
%define python_subpackage_only 1
|
|
|
|
%python_subpackages
|
|
|
|
%else
|
|
|
|
# same "defaults" for all distributions, used in %files below
|
|
|
|
%define python_files() -n python3-%{**}
|
|
|
|
%define python_sitearch %{python3_sitearch}
|
|
|
|
%endif
|
|
|
|
|
2011-12-23 20:16:24 +01:00
|
|
|
%description
|
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
|
|
|
|
|
|
|
%package -n libminiupnpc%{soname}
|
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client Library
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libminiupnpc%{soname}
|
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
|
|
|
|
|
|
|
%package -n libminiupnpc-devel
|
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client Library
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libminiupnpc%{soname} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n libminiupnpc-devel
|
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
|
|
|
|
2020-12-12 01:47:57 +01:00
|
|
|
%if 0%{?python_subpackage_only}
|
|
|
|
%package -n python-miniupnpc
|
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client Module for Python
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: libminiupnpc%{soname} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python-miniupnpc
|
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
|
|
|
|
|
|
|
%else
|
2018-05-27 11:51:39 +02:00
|
|
|
%package -n python2-miniupnpc
|
2011-12-23 20:16:24 +01:00
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client Module for Python
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: libminiupnpc%{soname} = %{version}-%{release}
|
|
|
|
|
2018-05-27 11:51:39 +02:00
|
|
|
%description -n python2-miniupnpc
|
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
|
|
|
|
|
|
|
%package -n python3-miniupnpc
|
|
|
|
Summary: Universal Plug'n'Play (UPnP) Client Module for Python
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Requires: libminiupnpc%{soname} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python3-miniupnpc
|
2011-12-23 20:16:24 +01:00
|
|
|
The MiniUPnP project offers software which supports the UPnP Internet Gateway
|
|
|
|
Device (IGD) specifications.
|
2020-12-12 01:47:57 +01:00
|
|
|
%endif
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2018-07-02 11:02:40 +02:00
|
|
|
%patch0 -p1
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%build
|
2015-11-18 12:20:33 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
2011-12-23 22:37:15 +01:00
|
|
|
make %{?_smp_mflags} \
|
2015-11-18 12:20:33 +01:00
|
|
|
CC="gcc" \
|
2011-12-23 20:16:24 +01:00
|
|
|
OPTFLAGS="%{optflags}" \
|
2015-11-18 12:20:33 +01:00
|
|
|
PYTHON="python"
|
2011-12-23 20:16:24 +01:00
|
|
|
|
2018-05-27 11:51:39 +02:00
|
|
|
%python_build
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%install
|
2018-05-27 11:51:39 +02:00
|
|
|
%make_install INSTALLDIRLIB=%{_libdir}
|
|
|
|
|
|
|
|
%python_install
|
2020-12-12 01:47:57 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
2012-12-26 10:40:46 +01:00
|
|
|
# Remove static libs
|
|
|
|
rm -f %{buildroot}%{_libdir}/*.a
|
2014-06-13 13:13:35 +02:00
|
|
|
# The man page should be non executable
|
|
|
|
chmod -x %{buildroot}%{_mandir}/man3/miniupnpc.3.gz
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%post -n libminiupnpc%{soname} -p /sbin/ldconfig
|
|
|
|
%postun -n libminiupnpc%{soname} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/upnpc
|
|
|
|
%{_bindir}/external-ip
|
2018-07-02 11:02:40 +02:00
|
|
|
%{_mandir}/man3/miniupnpc.3%{?ext_man}
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%files -n libminiupnpc%{soname}
|
2018-05-27 11:51:39 +02:00
|
|
|
%doc Changelog.txt README
|
|
|
|
%license LICENSE
|
2011-12-23 20:16:24 +01:00
|
|
|
%{_libdir}/libminiupnpc.so.%{soname}
|
|
|
|
|
|
|
|
%files -n libminiupnpc-devel
|
2012-02-17 20:22:36 +01:00
|
|
|
%{_includedir}/miniupnpc/
|
2011-12-23 20:16:24 +01:00
|
|
|
%{_libdir}/libminiupnpc.so
|
2018-05-27 11:51:39 +02:00
|
|
|
%{_libdir}/pkgconfig/miniupnpc.pc
|
|
|
|
|
2020-12-12 01:47:57 +01:00
|
|
|
%if %{with python2} && ! 0%{?python_subpackage_only}
|
2018-05-27 11:51:39 +02:00
|
|
|
%files -n python2-miniupnpc
|
|
|
|
%doc Changelog.txt README
|
|
|
|
%license LICENSE
|
2020-12-12 01:47:57 +01:00
|
|
|
%{python2_sitearch}/miniupnpc*
|
2018-07-02 11:02:40 +02:00
|
|
|
%endif
|
2018-05-27 11:51:39 +02:00
|
|
|
|
2020-12-12 01:47:57 +01:00
|
|
|
%files %{python_files miniupnpc}
|
2018-05-27 11:51:39 +02:00
|
|
|
%doc Changelog.txt README
|
|
|
|
%license LICENSE
|
2020-12-12 01:47:57 +01:00
|
|
|
%{python_sitearch}/miniupnpc*
|
2011-12-23 20:16:24 +01:00
|
|
|
|
|
|
|
%changelog
|