File ntrack.spec of Package ntrack
#
# spec file for package ntrack
#
# 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/
#
%define soname 0
%define glib_soname 2
%define gobject_soname 1
%define qt4_soname 1
%define libnl_soname 1
Name: ntrack
Version: 014
Release: 3
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Url: https://launchpad.net/ntrack
Group: System/Libraries
Source: ntrack-014.tar.gz
Patch1: dead-loop-fix.patch
Patch2: ntrack-link.patch
BuildRequires: pkgconfig(QtCore)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(libnl-1)
BuildRequires: pkgconfig(pygobject-2.0)
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
%package -n lib%{name}%{soname}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
Requires: %{name}-libnl%{libnl_soname}
%description -n lib%{name}%{soname}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
%package devel
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: Development/Libraries/C and C++
Requires: lib%{name}%{soname} = %{version}
%description devel
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Development files for lib%{name}%{soname}.
%package -n lib%{name}-qt4-%{qt4_soname}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
%description -n lib%{name}-qt4-%{qt4_soname}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Qt4 monitor API to get network connectivity change updates.
%package -n lib%{name}-qt4-devel
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: Development/Libraries/C and C++
Requires: lib%{name}-qt4-%{qt4_soname} = %{version}
Requires: %{name}-devel = %{version}
%description -n lib%{name}-qt4-devel
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Developments files for lib%{name}-qt4-%{qt4_soname}.
%package -n lib%{name}-glib%{glib_soname}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
%description -n lib%{name}-glib%{glib_soname}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Glib monitor API to get network connectivity change updates.
%package -n lib%{name}-glib-devel
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: Development/Libraries/C and C++
Requires: lib%{name}-glib%{glib_soname} = %{version}
Requires: %{name}-devel = %{version}
%description -n lib%{name}-glib-devel
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Developments files for lib%{name}-glib%{glib_soname}.
%package -n lib%{name}-gobject%{gobject_soname}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
%description -n lib%{name}-gobject%{gobject_soname}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
GObject monitor API to get network connectivity change updates.
%package -n lib%{name}-gobject-devel
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: Development/Libraries/C and C++
Requires: lib%{name}-gobject%{gobject_soname} = %{version}
Requires: %{name}-devel = %{version}
%description -n lib%{name}-gobject-devel
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Developments files for lib%{name}-gobject%{gobject_soname}.
%package -n python-lib%{name}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
Requires: python >= %{py_ver}
%description -n python-lib%{name}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
Python monitor API to get network connectivity change updates.
%package -n %{name}-libnl%{libnl_soname}
License: LGPLv3+
Summary: Network connectivity tracking library for desktop applications
Group: System/Libraries
%description -n %{name}-libnl%{libnl_soname}
ntrack aims to be a lightweight and easy to use library for application developers
that want to get events on network online status changes such as online, offline or route changes.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
mkdir m4
autoreconf -fi
%build
%configure --disable-static \
--with-glib2 \
--with-gobject \
--with-pygobject \
--with-qt4
make
%install
%make_install
rm -v %{buildroot}%{_datadir}/doc/ntrack/*
rm -v %{buildroot}%{_libdir}/*.la
rm -v %{buildroot}%{_libdir}/ntrack/modules/*.la
rm -v %{buildroot}%{py_sitedir}/*.la
%clean
%{?buildroot:rm -rf %{buildroot}}
%post -n lib%{name}%{soname} -p /sbin/ldconfig
%post -n lib%{name}-qt4-%{qt4_soname} -p /sbin/ldconfig
%post -n lib%{name}-glib%{glib_soname} -p /sbin/ldconfig
%post -n lib%{name}-gobject%{gobject_soname} -p /sbin/ldconfig
%postun -n lib%{name}%{soname} -p /sbin/ldconfig
%postun -n lib%{name}-qt4-%{qt4_soname} -p /sbin/ldconfig
%postun -n lib%{name}-glib%{glib_soname} -p /sbin/ldconfig
%postun -n lib%{name}-gobject%{gobject_soname} -p /sbin/ldconfig
%files -n lib%{name}%{soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%_libdir/libntrack.so.%{soname}*
%files devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %_includedir/ntrack
%dir %_includedir/ntrack/common
%_includedir/ntrack/common/ntrack.h
%_includedir/ntrack/common/ntrackbase.h
%_includedir/ntrack/common/ntrackcompare.h
%_includedir/ntrack/common/ntrackidpool.h
%_includedir/ntrack/common/ntracklist.h
%_includedir/ntrack/common/ntrackmacros.h
%_includedir/ntrack/common/ntrackmonitor.h
%_includedir/ntrack/common/ntrackutil.h
%_libdir/libntrack.so
%_libdir/pkgconfig/libntrack.pc
%files -n lib%{name}-qt4-%{qt4_soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%_libdir/libntrack-qt4.so.%{qt4_soname}*
%files -n lib%{name}-qt4-devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %_includedir/ntrack
%dir %_includedir/ntrack/qt4
%_includedir/ntrack/qt4/QNtrack.h
%_libdir/libntrack-qt4.so
%_libdir/pkgconfig/libntrack-qt4.pc
%files -n lib%{name}-glib%{glib_soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%_libdir/libntrack-glib.so.%{glib_soname}*
%files -n lib%{name}-glib-devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %_includedir/ntrack
%dir %_includedir/ntrack/glib
%_includedir/ntrack/glib/ntrack-enums.h
%_includedir/ntrack/glib/ntrack-glib.h
%_includedir/ntrack/glib/ntrack-gsource.h
%_libdir/libntrack-glib.so
%_libdir/pkgconfig/libntrack-glib.pc
%files -n lib%{name}-gobject%{gobject_soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%_libdir/libntrack-gobject.so.%{gobject_soname}*
%files -n lib%{name}-gobject-devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %_includedir/ntrack
%dir %_includedir/ntrack/gobject
%_includedir/ntrack/gobject/ntrack-enumtypes.h
%_includedir/ntrack/gobject/ntrack-gmarshal.h
%_includedir/ntrack/gobject/ntrack-gmonitor.h
%_includedir/ntrack/gobject/ntrack-gobject.h
%_libdir/libntrack-gobject.so
%_libdir/pkgconfig/libntrack-gobject.pc
%files -n python-lib%{name}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%py_sitedir/pyntrack.so
%files -n %{name}-libnl1
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %_libdir/ntrack
%dir %_libdir/ntrack/modules
%_libdir/ntrack/modules/ntrack-libnl1.so
%changelog