wicd-vl.spec 7.4 KB

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