miniupnpc/miniupnpc.spec

128 lines
3.6 KiB
RPMSpec

#
# spec file for package miniupnpc
#
# Copyright (c) 2011 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: miniupnpc
Version: 1.6
Release: 0.0
%define soname 8
Summary: Universal Plug'n'Play (UPnP) Client
Source: http://miniupnp.free.fr/files/miniupnpc-%{version}.tar.gz
Patch1: miniupnpc-makefile.patch
Url: http://miniupnp.free.fr/
Group: Productivity/Networking/Other
License: BSD License (revised)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: gcc glibc-devel make
Requires: libminiupnpc%{soname} = %{version}-%{release}
%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.
%package -n python-miniupnpc
Summary: Universal Plug'n'Play (UPnP) Client Module for Python
Group: Development/Libraries/Python
Requires: libminiupnpc%{soname} = %{version}-%{release}
%py_requires
%description -n python-miniupnpc
The MiniUPnP project offers software which supports the UPnP Internet Gateway
Device (IGD) specifications.
%prep
%setup -q
%patch1
%build
%__make %{?jobs:-j%{jobs}} \
CC="%__cc" \
OPTFLAGS="%{optflags}" \
PYTHON="%__python"
%__python ./setup.py build
%install
%__make \
INSTALLPREFIX="%{buildroot}%{_prefix}" \
INSTALLDIRINC="%{buildroot}%{_includedir}" \
INSTALLDIRLIB="%{buildroot}%{_libdir}" \
INSTALLDIRBIN="%{buildroot}%{_bindir}" \
INSTALL="%__install" \
install
%__python ./setup.py install \
--prefix="%{_prefix}" \
--root="%{buildroot}" \
--record-rpm="rpmfiles.lst"
%post -n libminiupnpc%{soname} -p /sbin/ldconfig
%postun -n libminiupnpc%{soname} -p /sbin/ldconfig
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%{_bindir}/upnpc
%{_bindir}/external-ip
%files -n libminiupnpc%{soname}
%defattr(-,root,root)
%doc LICENSE Changelog.txt README
%{_libdir}/libminiupnpc.so.%{soname}
%files -n libminiupnpc-devel
%defattr(-,root,root)
%{_includedir}/declspec.h
%{_includedir}/igd_desc_parse.h
%{_includedir}/miniupnpc.h
%{_includedir}/miniupnpctypes.h
%{_includedir}/miniwget.h
%{_includedir}/portlistingparse.h
%{_includedir}/upnpcommands.h
%{_includedir}/upnperrors.h
%{_includedir}/upnpreplyparse.h
%{_libdir}/libminiupnpc.a
%{_libdir}/libminiupnpc.so
%files -n python-miniupnpc -f rpmfiles.lst
%defattr(-,root,root)
%changelog