LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File wicd.spec of Package wicd (Project home:agentdero:wicd)

# norootforbuild

Summary:        A wireless and wired network manager
Name:            wicd
Version:        20110501
Release:        1
URL:            http://wicd.sourceforge.net/
License:        GPLv2
Group:            Productivity/Networking/System
## Use generatebzball.sh to pull a new set of code from Launchpad
## and package it up
Source0:        %{name}-%{version}.tar.bz2
Source1:        %{name}.init
Source99:             wicd-rpmlintrc
BuildRequires:        python-devel gettext update-desktop-files fdupes wpa_supplicant
BuildRequires:        dbus-1-python-devel sysconfig iproute2 net-tools
BuildRequires:        python-gobject2-devel acpid pm-utils hicolor-icon-theme wireless-tools

Requires:        python dbus-1 dbus-1-python dhcp-client ethtool net-tools iproute2
Requires:        pm-utils wireless-tools wpa_supplicant python-urwid python-gobject2 python-curses
Requires:        python-gtk
BuildArch:        i586 x86_64
BuildRoot:        %{_tmppath}/%{name}-%{version}-build
%{py_requires}

%description
Wicd is an open source wired and wireless network manager for Linux
which aims to provide a simple interface to connect to networks with a
wide variety of settings.

%prep
%setup -q

%build
%{__python} setup.py configure \
            --distro=suse \
            --no-install-docs
%{__python} setup.py build

%install
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-lib=%py_libdir/site-packages

%__install -Dm 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%__ln_s %{_initrddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}

%{__mkdir} -p %{buildroot}/var/lib/%{name}/configurations

find $RPM_BUILD_ROOT/ -type f  -iname '*.la' -exec rm {} \;
find $RPM_BUILD_ROOT/ -type f  -iname '*.a' -exec rm {} \;
%{__mkdir} -p  $RPM_BUILD_ROOT/var/run/%{name}

%fdupes -s %{buildroot}

%suse_update_desktop_file -r %{name} System Network

%find_lang %name

%post
service network stop
service wicd start


%preun
%{stop_on_removal wicd}

%postun
%{restart_on_update wicd}
%insserv_cleanup

%clean
%__rm -rf "%{buildroot}"

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS CHANGES README

/etc/init.d/%{name}
%{_bindir}/*
%{_sbindir}/*

%{_mandir}/nl
%{_mandir}/man*/*.gz

/var/lib/%{name}
/var/log/%{name}
/usr/lib/pm-utils/sleep.d/91%{name}

%{_datadir}/locale/*
%{_datadir}/%{name}
%{_datadir}/applications/*
%{_datadir}/pixmaps/%{name}*
%{_datadir}/icons/hicolor/*/apps/%{name}*

%{_sysconfdir}/acpi/resume.d
%{_sysconfdir}/acpi/suspend.d
%{_sysconfdir}/xdg/autostart/%{name}-tray.desktop

%dir /etc/%{name}
%attr(644,root,root) %config /etc/%{name}/*

%dir /etc/%{name}/encryption
%attr(755,root,root) %config /etc/%{name}/encryption/*


%config %{_sysconfdir}/%{name}
%config %{_sysconfdir}/dbus-1/system.d/%{name}.conf


%py_libdir/site-packages/*

%changelog