[1161] | 1 | #define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)') |
---|
[1156] | 2 | |
---|
| 3 | Summary: A wireless and wired network manager |
---|
| 4 | Summary(ja): 無線・有線ネットワークマネージャ |
---|
| 5 | Name: wicd |
---|
| 6 | Version: 1.7.0 |
---|
[1178] | 7 | Release: 5%{?_dist_release} |
---|
[1156] | 8 | Source0: %{name}-%{version}.tar.bz2 |
---|
| 9 | # from ATrpms package |
---|
| 10 | Patch0: wicd-1.7.0-init-script.patch |
---|
| 11 | |
---|
| 12 | Patch1: wicd-desktop.patch |
---|
| 13 | Patch2: 18-dont_run_unexpected_files_in_scripts.patch |
---|
| 14 | Patch3: 27-fix_resolv.conf_perms.patch |
---|
| 15 | |
---|
| 16 | License: GPLv2 |
---|
| 17 | Group: System Environment/Base |
---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 19 | URL: http://wicd.net |
---|
| 20 | |
---|
| 21 | BuildRequires: gettext |
---|
| 22 | BuildRequires: desktop-file-utils |
---|
| 23 | BuildRequires: python >= 2.4 python-devel >= 2.4 |
---|
| 24 | BuildRequires: python-setuptools |
---|
| 25 | |
---|
| 26 | Requires: python >= 2.4 ethtool net-tools wpa_supplicant pm-utils wireless-tools |
---|
| 27 | Requires: dhclient iproute dbus-python |
---|
| 28 | Requires: pygtk2 >= 2.10 |
---|
| 29 | Requires: python-urwid >= 0.9.8.3 |
---|
| 30 | Requires: gksu |
---|
| 31 | |
---|
| 32 | Requires(post): chkconfig |
---|
| 33 | Requires(preun): chkconfig |
---|
| 34 | Requires(preun): /sbin/service |
---|
| 35 | Requires(postun): /sbin/service |
---|
| 36 | |
---|
| 37 | Conflicts: NetworkManager |
---|
| 38 | |
---|
| 39 | %description |
---|
| 40 | A complete network connection manager |
---|
| 41 | Wicd supports wired and wireless networks, and capable of |
---|
| 42 | creating and tracking profiles for both. It has a |
---|
| 43 | template-based wireless encryption system, which allows the user |
---|
| 44 | to easily add encryption methods used. It ships with some common |
---|
| 45 | encryption types, such as WPA and WEP. Wicd will automatically |
---|
| 46 | connect at startup to any preferred network within range. |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | %prep |
---|
| 50 | %setup -q |
---|
| 51 | %patch0 -p1 -b .init |
---|
| 52 | %patch1 -p1 |
---|
| 53 | %patch2 -p1 |
---|
| 54 | %patch3 -p1 |
---|
| 55 | |
---|
| 56 | %{__sed} -i 's/\r//' wicd/logfile.py |
---|
| 57 | |
---|
| 58 | %build |
---|
| 59 | %{__python} setup.py configure --share=%{_datadir}/%{name} \ |
---|
| 60 | --etc=%{_sysconfdir}/%{name} \ |
---|
| 61 | --bin=%{_bindir} \ |
---|
| 62 | --sbin=%{_sbindir} \ |
---|
| 63 | --mandir=%{_mandir} \ |
---|
| 64 | --varlib=%{_sharedstatedir}/wicd \ |
---|
| 65 | --pmutils=%{_libdir}/pm-utils/sleep.d \ |
---|
| 66 | --resume=%{_sysconfdir}/acpi/resume.d \ |
---|
| 67 | --suspend=%{_sysconfdir}/acpi/suspend.d \ |
---|
| 68 | --docdir=%{_docdir}/%{name}-%{version} \ |
---|
| 69 | --no-install-kde \ |
---|
| 70 | --no-install-docs |
---|
| 71 | |
---|
| 72 | python setup.py build |
---|
| 73 | |
---|
| 74 | %install |
---|
| 75 | rm -rf %{buildroot} |
---|
| 76 | python setup.py install -O1 --skip-build --root=%{buildroot} |
---|
| 77 | install -D init/redhat/%{name} %{buildroot}%{_initddir}/%{name} |
---|
| 78 | |
---|
| 79 | desktop-file-install --vendor "" --dir %{buildroot}%{_datadir}/autostart/ other/wicd-tray.desktop |
---|
| 80 | |
---|
| 81 | %find_lang %{name} |
---|
| 82 | |
---|
| 83 | %post |
---|
| 84 | touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
---|
[1178] | 85 | /sbin/service %{name} restart >/dev/null 2>&1 |
---|
[1156] | 86 | /sbin/chkconfig --add %{name} |
---|
[1178] | 87 | /sbin/chkconfig --level 345 %{name} on |
---|
[1156] | 88 | |
---|
| 89 | %preun |
---|
| 90 | if [ $1 = 0 ] ; then |
---|
| 91 | /sbin/service %{name} stop >/dev/null 2>&1 |
---|
| 92 | /sbin/chkconfig --del %{name} |
---|
| 93 | fi |
---|
| 94 | |
---|
| 95 | %postun |
---|
| 96 | if [ "$1" -ge "1" ] ; then |
---|
| 97 | /sbin/service %{name} condrestart >/dev/null 2>&1 || : |
---|
| 98 | fi |
---|
| 99 | |
---|
| 100 | if [ $1 -eq 0 ] ; then |
---|
| 101 | touch --no-create %{_datadir}/icons/hicolor &>/dev/null |
---|
| 102 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
| 103 | fi |
---|
| 104 | |
---|
| 105 | %posttrans |
---|
| 106 | gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
---|
| 107 | |
---|
| 108 | %clean |
---|
| 109 | [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
---|
| 110 | |
---|
| 111 | %files -f %{name}.lang |
---|
| 112 | %defattr(-,root,root) |
---|
| 113 | %doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES |
---|
| 114 | %{_bindir}/wicd-* |
---|
| 115 | %{python_sitelib}/wicd |
---|
| 116 | %{python_sitelib}/*.egg-info |
---|
| 117 | %{_datadir}/wicd |
---|
| 118 | %{_datadir}/pixmaps/wicd* |
---|
| 119 | %{_datadir}/icons/hicolor/*/apps/wicd-*.png |
---|
| 120 | %{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg |
---|
| 121 | %{_datadir}/applications/wicd.desktop |
---|
| 122 | %{_datadir}/autostart/wicd-tray.desktop |
---|
| 123 | %docdir %{_datadir}/doc/%{name}/ |
---|
| 124 | %{_mandir}/nl/man?/%{name}* |
---|
| 125 | %{_mandir}/man?/%{name}* |
---|
| 126 | %{_sysconfdir}/%{name} |
---|
| 127 | %{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh |
---|
| 128 | %{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh |
---|
| 129 | %{_sysconfdir}/dbus-1/system.d/wicd.conf |
---|
| 130 | %{_sysconfdir}/rc.d/init.d/wicd |
---|
| 131 | %{_sysconfdir}/xdg/autostart/wicd-tray.desktop |
---|
| 132 | %{_sbindir}/wicd |
---|
| 133 | %{_libdir}/pm-utils/sleep.d/91wicd |
---|
| 134 | %{_localstatedir}/log/wicd/.empty_on_purpose |
---|
| 135 | %{_localstatedir}/lib/wicd |
---|
| 136 | |
---|
| 137 | %changelog |
---|
[1178] | 138 | * Wed Jun 9 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-5 |
---|
| 139 | - improved service start process in %%post section |
---|
| 140 | - changed daemon start runlevel |
---|
| 141 | |
---|
[1161] | 142 | * Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4 |
---|
| 143 | - fixed %%python_sitelib |
---|
| 144 | |
---|
[1156] | 145 | * Sat Jun 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-3 |
---|
| 146 | - added Rerquires: gksu |
---|
| 147 | - added Patch2,3 from Debian |
---|
| 148 | - to stop running unexpected files in scripts |
---|
| 149 | - to fix resolv.conf permission |
---|
| 150 | |
---|
| 151 | * Fri Jun 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-2 |
---|
| 152 | - added chkconfig in %post |
---|
| 153 | - added Patch1 to add Japanese description for desktop file |
---|
| 154 | |
---|
| 155 | * Fri May 28 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1 |
---|
| 156 | - initial build for VineSeed |
---|