%{!?python_sitelib: %global python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')} %bcond_with rhel %if %{with rhel} %define _sharedstatedir /var/lib %define _initddir %{_sysconfdir}/rc.d/init.d %endif Summary: A wireless and wired network manager Name: wicd Version: 1.7.0 Release: 3%{?dist} URL: http://wicd.net Source0: http://downloads.sourceforge.net/wicd/%{name}-%{version}.tar.bz2 Patch0: wicd-1.7.0-init-script.patch License: GPLv2 Group: System Environment/Base BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gettext BuildRequires: desktop-file-utils BuildRequires: python-devel >= 2.4 BuildRequires: python-setuptools Requires: python >= 2.4 Requires: python-urwid Requires: dbus, dbus-python Requires: dhclient Requires: ethtool Requires: iproute Requires: net-tools Requires: pm-utils Requires: pygtk2-libglade >= 2.10 Requires: wireless-tools Requires: wpa_supplicant Requires(post): chkconfig Requires(preun): chkconfig Requires(preun): /sbin/service Requires(postun): /sbin/service # {_libdir}/pm-utils/sleep.d/91wicd # is arch. #BuildArch: noarch %description A complete network connection manager Wicd supports wired and wireless networks, and capable of creating and tracking profiles for both. It has a template-based wireless encryption system, which allows the user to easily add encryption methods used. It ships with some common encryption types, such as WPA and WEP. Wicd will automatically connect at startup to any preferred network within range. %prep %setup -q %patch0 -p1 -b .init %{__sed} -i 's/\r//' wicd/logfile.py %build python setup.py configure --distro=redhat \ --share=%{_datadir}/%{name} \ --etc=%{_sysconfdir}/%{name} \ --bin=%{_bindir} \ --sbin=%{_sbindir} \ --mandir=%{_mandir} \ --varlib=%{_sharedstatedir}/wicd \ --pmutils=%{_libdir}/pm-utils/sleep.d \ --resume=%{_sysconfdir}/acpi/resume.d \ --suspend=%{_sysconfdir}/acpi/suspend.d \ --docdir=%{_docdir}/%{name}-%{version} \ --no-install-kde \ --no-install-docs python setup.py build %install rm -rf %{buildroot} python setup.py install -O1 --skip-build --root=%{buildroot} desktop-file-install --vendor "" --dir %{buildroot}%{_datadir}/autostart/ other/wicd-tray.desktop %find_lang %{name} %post /sbin/chkconfig --add %{name} touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %preun if [ $1 = 0 ] ; then /sbin/service %{name} stop >/dev/null 2>&1 /sbin/chkconfig --del %{name} fi %postun if [ "$1" -ge "1" ] ; then /sbin/service %{name} condrestart >/dev/null 2>&1 || : fi if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %clean rm -rf %{buildroot} %files -f %{name}.lang %defattr(-,root,root) %doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES %{_bindir}/wicd-* %{python_sitelib}/wicd %{_mandir}/man1/%{name}* %{_datadir}/wicd %{_datadir}/pixmaps/wicd* %{_datadir}/icons/hicolor/*/apps/wicd-*.png %{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg %{_datadir}/applications/wicd.desktop %{_datadir}/autostart/wicd-tray.desktop %{_mandir}/nl/man1/%{name}* %{_mandir}/nl/man5/%{name}* %{_mandir}/nl/man8/%{name}* %{_mandir}/man5/%{name}* %{_mandir}/man8/%{name}* %{_sysconfdir}/%{name} %{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh %{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh %{_sysconfdir}/dbus-1/system.d/wicd.conf %{_sysconfdir}/xdg/autostart/wicd-tray.desktop %{_sbindir}/wicd %{_libdir}/pm-utils/sleep.d/91wicd %{_sharedstatedir}/wicd %{_initddir}/wicd %{_localstatedir}/log/wicd/.empty_on_purpose %{!?with_rhel:%{python_sitelib}/*.egg-info} %changelog * Wed Feb 17 2010 Paulo Roma 1.7.0-3 - Updated to 1.7.0 - adapted init-script.patch * Fri Dec 18 2009 Paulo Roma 1.6.2.2-2 - Fixed init script. * Thu Sep 10 2009 Paulo Roma 1.6.2.2-1 - Updated to 1.6.2.2 * Tue Sep 01 2009 Paulo Roma 1.6.2.1-1 - Updated to 1.6.2.1 * Wed Jul 29 2009 Paulo Roma 1.6.2-1 - Initial spec file.