File gupnp-igd.spec of Package gupnp-igd

#
# spec file for package gupnp-igd
#
# Copyright (c) 2014 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:           gupnp-igd
Version:        0.2.3
Release:        0
Summary:        Library to handle UPnP IGD port mapping
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://www.gupnp.org/
Source:         http://download.gnome.org/sources/gupnp-igd/0.2/%{name}-%{version}.tar.xz
BuildRequires:  gobject-introspection-devel
BuildRequires:  gtk-doc
BuildRequires:  libgupnp-devel >= 0.18
BuildRequires:  python-devel
BuildRequires:  python-gobject2-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed
to have a very simple API.

%package -n libgupnp-igd-1_0-4
Summary:        Library to handle UPnP IGD port mapping
Group:          Development/Libraries/C and C++

%description -n libgupnp-igd-1_0-4
GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed
to have a very simple API.

%package -n typelib-1_0-GUPnPIgd-1_0
Summary:        Library to handle UPnP IGD port mapping -- Introspection bindings
Group:          Development/Libraries/C and C++

%description -n typelib-1_0-GUPnPIgd-1_0
GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed
to have a very simple API.

This package provides the GObject Introspection bindings for GUPnP-IGD.

%package -n python-gupnp-igd
Summary:        Library to handle UPnP IGD port mapping - Python Bindings
Group:          Development/Libraries/Python
Requires:       libgupnp-igd-1_0-4 = %{version}
# Doh, we made a typo in the package name until 12.2 :/
Provides:       python-gupnp-id = %{version}
Obsoletes:      python-gupnp-id < %{version}

%description -n python-gupnp-igd
GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed
to have a very simple API.

%package -n libgupnp-igd-devel
Summary:        Library to handle UPnP IGD port mapping - Development Files
Group:          Development/Libraries/C and C++
Requires:       libgupnp-igd-1_0-4 = %{version}
Requires:       typelib-1_0-GUPnPIgd-1_0 = %{version}

%description -n libgupnp-igd-devel
GUPnP-IGD is a library to handle UPnP IGD port mapping. It is supposed
to have a very simple API.

%prep
%setup -q

%build
%configure --disable-static \
    --enable-python
%__make %{?_smp_mflags}

%install
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print

%clean
rm -rf %{buildroot}

%post -n libgupnp-igd-1_0-4 -p /sbin/ldconfig

%postun -n libgupnp-igd-1_0-4 -p /sbin/ldconfig

%files -n libgupnp-igd-1_0-4
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/*.so.*

%files -n typelib-1_0-GUPnPIgd-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GUPnPIgd-1.0.typelib

%files -n python-gupnp-igd
%defattr(-,root,root)
%{python_sitearch}/gupnp/

%files -n libgupnp-igd-devel
%defattr(-,root,root)
%{_includedir}/%{name}-1.0
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_datadir}/gir-1.0/GUPnPIgd-1.0.gir
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%{_datadir}/gtk-doc/html/%{name}

%changelog