diff --git a/README.md b/README.md index 827e283..d574979 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # libntrack +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. + diff --git a/libntrack-014-deadloop.patch b/libntrack-014-deadloop.patch new file mode 100644 index 0000000..173d628 --- /dev/null +++ b/libntrack-014-deadloop.patch @@ -0,0 +1,21 @@ +--- modules/ntrack-libnl.c~ 2011-03-27 07:37:02.000000000 +0800 ++++ modules/ntrack-libnl.c 2011-04-09 23:11:33.919862769 +0800 +@@ -375,6 +375,7 @@ + get_nl_link_by_index (ntrack_monitor_t *self, ntrack_list_t *linklist, int iindex) + { + ntrack_list_t *i = linklist; ++ ntrack_list_t *head = NULL; + struct rtnl_link *result = NULL; + while (i) { + struct rtnl_link *link = i->data; +@@ -384,6 +385,10 @@ + } + if (rtnl_link_get_ifindex(link) > iindex) + break; ++ if (head == i) ++ break; ++ if (head == NULL) ++ head = i; + i = i->next; + } + return result; diff --git a/libntrack.spec b/libntrack.spec new file mode 100644 index 0000000..e97d4ef --- /dev/null +++ b/libntrack.spec @@ -0,0 +1,175 @@ +Name: libntrack +Version: 011 +Release: 2mamba +Summary: A library for application developers that want to get events on network online status changes +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://launchpad.net/ntrack +Source: http://launchpad.net/ntrack/main/%{version}/+download/ntrack-%{version}.tar.gz +Patch0: %{name}-014-deadloop.patch +License: GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libglib-devel +BuildRequires: libnl-devel +BuildRequires: libpython-devel +BuildRequires: libqt4-devel +BuildRequires: libstdc++6-devel +## AUTOBUILDREQ-END +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%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 devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%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. + +This package contains static libraries and header files need for development. + +%package qt4 +Group: System/Libraries +Summary: %{name} binding for Qt4 +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description qt4 +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. + +This package contains the Qt4 ntrack library. + +%package qt4-devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name}-qt4 +Requires: %{name}-qt4 = %{?epoch:%epoch:}%{version}-%{release} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description 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. + +This package contains static libraries and header files need for development. + +%package glib +Group: System/Libraries +Summary: %{name} binding for Glib +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description glib +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. + +This package contains the Glib ntrack library. + +%package glib-devel +Group: Development/Libraries +Summary: Static libraries and headers for %{name}-glib +Requires: %{name}-glib = %{?epoch:%epoch:}%{version}-%{release} +Requires: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} + +%description 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. + +This package contains static libraries and header files need for development. + +%package -n pyntrack +Group: System/Libraries +Summary: Python binding for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} + +%description -n pyntrack +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. + +This package contains the Python binding to the ntrack library. + +# FIXME: +#checking for LIBNL2... no + +%prep +%setup -q -n ntrack-%{version} +%patch0 -p0 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +rm -rf %{buildroot}%{_docdir}/ntrack + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%post qt4 -p /sbin/ldconfig +%postun qt4 -p /sbin/ldconfig + +%post glib -p /sbin/ldconfig +%postun glib -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/libntrack.so.* +%{_libdir}/ntrack/modules/ntrack-libnl1.a +%{_libdir}/ntrack/modules/ntrack-libnl1.la +%{_libdir}/ntrack/modules/ntrack-libnl1.so + +%files devel +%defattr(-,root,root) +%{_includedir}/ntrack/common/* +%{_libdir}/libntrack.a +%{_libdir}/libntrack.la +%{_libdir}/libntrack.so +%{_libdir}/pkgconfig/libntrack.pc +%doc AUTHORS COPYING COPYING.LESSER ChangeLog NEWS README + +%files qt4 +%defattr(-,root,root) +%{_libdir}/libntrack-qt4.so.* + +%files qt4-devel +%defattr(-,root,root) +%{_includedir}/ntrack/qt4/* +%{_libdir}/libntrack-qt4.a +%{_libdir}/libntrack-qt4.la +%{_libdir}/libntrack-qt4.so +%{_libdir}/pkgconfig/libntrack-qt4.pc + +%files glib +%defattr(-,root,root) +%{_libdir}/libntrack-glib.so.* +%{_libdir}/libntrack-gobject.so.* + +%files glib-devel +%defattr(-,root,root) +%{_includedir}/ntrack/glib/* +%{_includedir}/ntrack/gobject/* +%{_libdir}/libntrack-glib.a +%{_libdir}/libntrack-glib.la +%{_libdir}/libntrack-glib.so +%{_libdir}/libntrack-gobject.a +%{_libdir}/libntrack-gobject.la +%{_libdir}/libntrack-gobject.so +%{_libdir}/pkgconfig/libntrack-glib.pc +%{_libdir}/pkgconfig/libntrack-gobject.pc + +%files -n pyntrack +%defattr(-,root,root) +%{python_sitearch}/pyntrack.a +%{python_sitearch}/pyntrack.la +%{python_sitearch}/pyntrack.so + +%changelog +* Fri May 06 2011 Silvan Calarco 011-2mamba +- added deadloop fix patch affecting kded4 from https://bugs.launchpad.net/ntrack/+bug/755608 + +* Sun Mar 06 2011 Silvan Calarco 011-1mamba +- package created by autospec