wicd-vl.spec 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. #define python_sitelib %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
  2. Summary: A wireless and wired network manager
  3. Summary(ja): 無線・有線ネットワークマネージャ
  4. Name: wicd
  5. Version: 1.7.1
  6. Release: 1%{?_dist_release}
  7. Source0: %{name}-%{version}.tar.gz
  8. Patch0: wicd-desktop.patch
  9. Patch1: 02-workaround_dhclient_bug.patch
  10. Patch2: 26-support_etc-network_scripts.patch
  11. Patch100: add_fix_ja.patch
  12. License: GPLv2
  13. Group: System Environment/Base
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  15. URL: http://wicd.net
  16. BuildArch: noarch
  17. BuildRequires: gettext
  18. BuildRequires: desktop-file-utils
  19. BuildRequires: python >= 2.4 python-devel >= 2.4
  20. BuildRequires: python-babel
  21. BuildRequires: python-setuptools
  22. Requires: pm-utils >= 1.2.4
  23. #Requires(post): chkconfig
  24. #Requires(preun): chkconfig
  25. #Requires(preun): /sbin/service
  26. #Requires(postun): /sbin/service
  27. Conflicts: NetworkManager
  28. %description
  29. A complete network connection manager
  30. Wicd supports wired and wireless networks, and capable of
  31. creating and tracking profiles for both. It has a
  32. template-based wireless encryption system, which allows the user
  33. to easily add encryption methods used. It ships with some common
  34. encryption types, such as WPA and WEP. Wicd will automatically
  35. connect at startup to any preferred network within range.
  36. %package common
  37. Summary: Wicd common files
  38. Summary(ja): Wicd の共通ファイル
  39. Group: System Environment/Base
  40. BuildArch: noarch
  41. Requires: dbus
  42. Requires: dbus-python
  43. Requires: dhclient
  44. Requires: ethtool
  45. Requires: iproute
  46. Requires: logrotate
  47. Requires: net-tools
  48. Requires: pm-utils
  49. Requires: wireless-tools
  50. Requires: wpa_supplicant
  51. Requires(post): chkconfig
  52. Requires(preun): chkconfig
  53. Requires(preun): /sbin/service
  54. Requires(postun): /sbin/service
  55. #Requires(preun): initscripts
  56. #Requires(postun): initscripts
  57. %description common
  58. This package provides the main wicd daemon and the wicd-cli front-end.
  59. %package curses
  60. Summary: Curses client for Wicd
  61. Summary(ja): Wicd の Curse クライアント
  62. Group: Applications/System
  63. BuildArch: noarch
  64. Requires: %{name}-common = %{version}-%{release}
  65. Requires: python-urwid >= 0.9.8.3
  66. %description curses
  67. Client program for wicd that uses a curses interface.
  68. %package gtk
  69. Summary: GTK+ client for Wicd
  70. Summary(ja): Wicd の GTK+ クライアント
  71. Group: Applications/Internet
  72. BuildArch: noarch
  73. Requires: %{name}-common = %{version}-%{release}
  74. Requires: pygtk2 >= 2.10
  75. Requires: pygtk2-libglade >= 2.10
  76. Requires: gksu
  77. %description gtk
  78. Client program for wicd that uses a GTK+ interface.
  79. %prep
  80. %setup -q
  81. %patch0 -p1
  82. %patch1 -p1
  83. %patch2 -p1
  84. %patch100 -p1
  85. %{__sed} -i 's/\r//' wicd/logfile.py
  86. %build
  87. python setup.py compile_translations
  88. # python-babel currently doesn't support Asturian, using gettext
  89. msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
  90. %{__python} setup.py configure --share=%{_datadir}/%{name} \
  91. --etc=%{_sysconfdir}/%{name} \
  92. --bin=%{_bindir} \
  93. --sbin=%{_sbindir} \
  94. --mandir=%{_mandir} \
  95. --varlib=%{_sharedstatedir}/wicd \
  96. --pmutils=%{_libdir}/pm-utils/sleep.d \
  97. --resume=%{_sysconfdir}/acpi/resume.d \
  98. --suspend=%{_sysconfdir}/acpi/suspend.d \
  99. --docdir=%{_docdir}/%{name}-%{version} \
  100. --log %{_localstatedir}/log \
  101. --no-install-kde \
  102. --no-install-docs
  103. python setup.py build
  104. %install
  105. rm -rf %{buildroot}
  106. python setup.py install -O1 --skip-build --root=%{buildroot}
  107. install -D init/redhat/%{name} %{buildroot}%{_initddir}/%{name}
  108. find %{buildroot} -type f -name ".empty_on_purpose" | xargs rm
  109. desktop-file-install \
  110. --remove-category="Application" \
  111. --delete-original \
  112. --dir=%{buildroot}%{_datadir}/applications \
  113. %{buildroot}%{_datadir}/applications/wicd.desktop
  114. desktop-file-install \
  115. --dir=%{buildroot}%{_sysconfdir}/xdg/autostart \
  116. %{buildroot}%{_sysconfdir}/xdg/autostart/wicd-tray.desktop
  117. %find_lang %{name}
  118. %post common
  119. touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
  120. /sbin/service %{name} restart >/dev/null 2>&1
  121. /sbin/chkconfig --add %{name}
  122. /sbin/chkconfig --level 345 %{name} on
  123. %preun common
  124. if [ $1 = 0 ] ; then
  125. /sbin/service %{name} stop >/dev/null 2>&1
  126. /sbin/chkconfig --del %{name}
  127. fi
  128. %postun common
  129. if [ "$1" -ge "1" ] ; then
  130. /sbin/service %{name} condrestart >/dev/null 2>&1 || :
  131. fi
  132. if [ $1 -eq 0 ] ; then
  133. touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  134. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  135. fi
  136. %post gtk
  137. touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
  138. %postun gtk
  139. if [ $1 -eq 0 ]; then
  140. touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  141. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  142. fi
  143. %posttrans gtk
  144. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  145. %clean
  146. [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  147. %files
  148. %defattr(-,root,root)
  149. %doc AUTHORS CHANGES INSTALL LICENSE NEWS README other/WHEREAREMYFILES
  150. %{_libdir}/pm-utils/sleep.d/55wicd
  151. %files common -f %{name}.lang
  152. %{_bindir}/wicd-cli
  153. %{_bindir}/wicd-client
  154. %{python_sitelib}/wicd
  155. %{python_sitelib}/*.egg-info
  156. %{_datadir}/applications/wicd.desktop
  157. %{_datadir}/dbus-1/system-services/
  158. %{_datadir}/man/man1/wicd-client.1*
  159. %{_datadir}/man/man5/wicd-manager-settings.conf.5*
  160. %{_datadir}/man/man5/wicd-wired-settings.conf.5*
  161. %{_datadir}/man/man5/wicd-wireless-settings.conf.5*
  162. %{_datadir}/man/man8/wicd-cli.8*
  163. %{_datadir}/man/man8/wicd.8*
  164. %{_datadir}/pixmaps/wicd*
  165. %dir %{_datadir}/wicd
  166. %dir %{_datadir}/wicd/backends
  167. %dir %{_datadir}/wicd/cli
  168. %dir %{_datadir}/wicd/daemon
  169. %{_datadir}/wicd/backends/*
  170. %{_datadir}/wicd/cli/*
  171. %{_datadir}/wicd/daemon/*
  172. %{_mandir}/nl/man?/%{name}*
  173. %{_sysconfdir}/%{name}
  174. %{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh
  175. %{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh
  176. %{_sysconfdir}/dbus-1/system.d/wicd.conf
  177. %{_sysconfdir}/logrotate.d/
  178. %{_sysconfdir}/rc.d/init.d/wicd
  179. %{_sysconfdir}/xdg/autostart/wicd-tray.desktop
  180. %{_sbindir}/wicd
  181. %{_localstatedir}/lib/wicd
  182. %exclude /lib/systemd/system/wicd.service
  183. %files curses
  184. %defattr(-,root,root,-)
  185. %dir %{_datadir}/wicd/curses
  186. %{_datadir}/wicd/curses/*
  187. %{_bindir}/wicd-curses
  188. %{_datadir}/man/man8/wicd-curses.8*
  189. %lang(nl) %{_datadir}/man/nl/man8/wicd-curses.8*
  190. %files gtk
  191. %defattr(-,root,root,-)
  192. %dir %{_datadir}/wicd/gtk
  193. %dir %{_datadir}/pixmaps/wicd
  194. %{_sysconfdir}/xdg/autostart/wicd-tray.desktop
  195. %{_datadir}/wicd/gtk/*
  196. %{_datadir}/pixmaps/wicd/*
  197. %{_datadir}/pixmaps/wicd-gtk.xpm
  198. %{_bindir}/wicd-gtk
  199. %{_datadir}/icons/hicolor/*/apps/wicd-gtk.png
  200. %{_datadir}/icons/hicolor/scalable/apps/wicd-gtk.svg
  201. %changelog
  202. * Sat Feb 18 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.1-1
  203. - dropt almost pathces
  204. - enabled patch is wicd-desktop.patch (Patch0)
  205. - added patch1 and patch2 from Debian sid
  206. - added patch100 to fix Japanese translation
  207. - added BuildRequires: python-babel
  208. * Sun May 22 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-6
  209. - changed BuildArch to noarch
  210. - updated spec
  211. - splitted -common, -curses, -gtk packages
  212. - Added Patch4,5,6,7,8 from Debian
  213. * Wed Jun 9 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-5
  214. - improved service start process in %%post section
  215. - changed daemon start runlevel
  216. * Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4
  217. - fixed %%python_sitelib
  218. * Sat Jun 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-3
  219. - added Rerquires: gksu
  220. - added Patch2,3 from Debian
  221. - to stop running unexpected files in scripts
  222. - to fix resolv.conf permission
  223. * Fri Jun 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-2
  224. - added chkconfig in %post
  225. - added Patch1 to add Japanese description for desktop file
  226. * Fri May 28 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1
  227. - initial build for VineSeed