wicd-vl.spec 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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.3
  6. Release: 1%{?_dist_release}
  7. License: GPLv2
  8. Group: System Environment/Base
  9. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  10. URL: https://launchpad.net/wicd
  11. Source0: %{name}-%{version}.tar.gz
  12. Patch0: wicd-desktop.patch
  13. Patch1: wicd-1.7.3-workaround_dhclient_bug.patch
  14. # Vine Patch
  15. Patch100: add_fix_ja.patch
  16. Patch101: wicd-1.7.3-setup.patch
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. BuildArch: noarch
  19. BuildRequires: gettext
  20. BuildRequires: desktop-file-utils
  21. BuildRequires: python >= 2.4
  22. BuildRequires: python-devel >= 2.4
  23. BuildRequires: python-babel
  24. BuildRequires: python-setuptools
  25. BuildRequires: pm-utils
  26. Requires: pm-utils >= 1.2.4
  27. Requires: %{name}-common
  28. Requires: %{name}-curses
  29. Requires: %{name}-gtk
  30. #Requires(post): chkconfig
  31. #Requires(preun): chkconfig
  32. #Requires(preun): /sbin/service
  33. #Requires(postun): /sbin/service
  34. Conflicts: NetworkManager
  35. %description
  36. A complete network connection manager
  37. Wicd supports wired and wireless networks, and capable of
  38. creating and tracking profiles for both. It has a
  39. template-based wireless encryption system, which allows the user
  40. to easily add encryption methods used. It ships with some common
  41. encryption types, such as WPA and WEP. Wicd will automatically
  42. connect at startup to any preferred network within range.
  43. %package common
  44. Summary: Wicd common files
  45. Summary(ja): Wicd の共通ファイル
  46. Group: System Environment/Base
  47. BuildArch: noarch
  48. Requires: dbus
  49. Requires: dbus-python
  50. Requires: dhclient
  51. Requires: ethtool
  52. Requires: iproute
  53. Requires: logrotate
  54. Requires: net-tools
  55. Requires: pm-utils-devel
  56. Requires: wireless-tools
  57. Requires: wpa_supplicant
  58. Requires(post): chkconfig
  59. Requires(preun): chkconfig
  60. Requires(preun): /sbin/service
  61. Requires(postun): /sbin/service
  62. #Requires(preun): initscripts
  63. #Requires(postun): initscripts
  64. %description common
  65. This package provides the main wicd daemon and the wicd-cli front-end.
  66. %package curses
  67. Summary: Curses client for Wicd
  68. Summary(ja): Wicd の Curse クライアント
  69. Group: Applications/System
  70. BuildArch: noarch
  71. Requires: %{name}-common = %{version}-%{release}
  72. Requires: python-urwid >= 0.9.8.3
  73. %description curses
  74. Client program for wicd that uses a curses interface.
  75. %package gtk
  76. Summary: GTK+ client for Wicd
  77. Summary(ja): Wicd の GTK+ クライアント
  78. Group: Applications/System
  79. BuildArch: noarch
  80. Requires: %{name}-common = %{version}-%{release}
  81. Requires: pygtk2 >= 2.10
  82. Requires: pygtk2-libglade >= 2.10
  83. Requires: gksu
  84. %description gtk
  85. Client program for wicd that uses a GTK+ interface.
  86. %prep
  87. %setup -q
  88. %patch0 -p1
  89. %patch1 -p1
  90. %patch101 -p1
  91. %{__sed} -i 's/\r//' wicd/logfile.py
  92. %build
  93. python setup.py compile_translations
  94. %{__python} setup.py configure \
  95. --share=%{_datadir}/%{name} \
  96. --etc=%{_sysconfdir}/%{name} \
  97. --bin=%{_bindir} \
  98. --sbin=%{_sbindir} \
  99. --mandir=%{_mandir} \
  100. --varlib=%{_sharedstatedir}/wicd \
  101. --pmutils=%{_libdir}/pm-utils/sleep.d \
  102. --resume=%{_sysconfdir}/acpi/resume.d \
  103. --suspend=%{_sysconfdir}/acpi/suspend.d \
  104. --docdir=%{_docdir}/%{name}-%{version} \
  105. --log=%{_localstatedir}/log \
  106. --no-install-gnome-shell-extensions \
  107. --no-install-kde \
  108. --no-install-docs
  109. python setup.py build
  110. # python-babel currently doesn't support Asturian, using gettext
  111. # msgfmt po/ast.po -o translations/ast/LC_MESSAGES/wicd.mo
  112. %install
  113. [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
  114. python setup.py install -O1 --skip-build --root=$RPM_BUILD_ROOT
  115. install -D init/redhat/%{name} $RPM_BUILD_ROOT%{_initddir}/%{name}
  116. find $RPM_BUILD_ROOT -type f -name ".empty_on_purpose" | xargs rm
  117. desktop-file-install \
  118. --remove-category="Application" \
  119. --delete-original \
  120. --dir=$RPM_BUILD_ROOT%{_datadir}/applications \
  121. $RPM_BUILD_ROOT%{_datadir}/applications/wicd.desktop
  122. desktop-file-install \
  123. --dir=$RPM_BUILD_ROOT%{_sysconfdir}/xdg/autostart \
  124. $RPM_BUILD_ROOT%{_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/55wicd
  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}/dbus-1/system-services/
  166. %{_datadir}/man/man1/wicd-client.1*
  167. %{_datadir}/man/man5/wicd-manager-settings.conf.5*
  168. %{_datadir}/man/man5/wicd-wired-settings.conf.5*
  169. %{_datadir}/man/man5/wicd-wireless-settings.conf.5*
  170. %{_datadir}/man/man8/wicd-cli.8*
  171. %{_datadir}/man/man8/wicd.8*
  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. %{_mandir}/nl/man?/%{name}*
  181. %{_sysconfdir}/%{name}
  182. %{_sysconfdir}/acpi/resume.d/80-wicd-connect.sh
  183. %{_sysconfdir}/acpi/suspend.d/50-wicd-suspend.sh
  184. %{_sysconfdir}/dbus-1/system.d/wicd.conf
  185. %{_sysconfdir}/logrotate.d/
  186. %{_sysconfdir}/rc.d/init.d/wicd
  187. %{_sysconfdir}/xdg/autostart/wicd-tray.desktop
  188. %{_sbindir}/wicd
  189. %{_localstatedir}/lib/wicd
  190. %exclude /lib/systemd/system/wicd.service
  191. %files curses
  192. %defattr(-,root,root,-)
  193. %dir %{_datadir}/wicd/curses
  194. %{_datadir}/wicd/curses/*
  195. %{_bindir}/wicd-curses
  196. %{_datadir}/man/man8/wicd-curses.8*
  197. %lang(nl) %{_datadir}/man/nl/man8/wicd-curses.8*
  198. %files gtk
  199. %defattr(-,root,root,-)
  200. %dir %{_datadir}/wicd/gtk
  201. %dir %{_datadir}/wicd/icons
  202. %{_sysconfdir}/xdg/autostart/wicd-tray.desktop
  203. %{_datadir}/wicd/gtk/*
  204. %{_datadir}/wicd/icons/*
  205. %{_datadir}/pixmaps/wicd-gtk.xpm
  206. %{_bindir}/wicd-gtk
  207. %{_datadir}/icons/hicolor/*/*/*
  208. %changelog
  209. * Thu Feb 5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.7.3-1
  210. - new upstream release
  211. - updated Patch0 and 1
  212. - dropt Patch3 and 100
  213. - added Patch101
  214. * Sat Aug 30 2014 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.2.4-2
  215. - rebuilt with current environment
  216. * Sat May 05 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.2.4-1
  217. - new upstream release
  218. - dropt patch2
  219. - added Patch3 from upstream
  220. - fixed patch100
  221. - added Requires: %%{name}-common, %%{name}-curses %%{name}-gtk in wicd
  222. - changed URL: https://launchpad.net/wicd
  223. * Sat Feb 18 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.1-1
  224. - dropt almost pathces
  225. - enabled patch is wicd-desktop.patch (Patch0)
  226. - added patch1 and patch2 from Debian sid
  227. - added patch100 to fix Japanese translation
  228. - added BuildRequires: python-babel
  229. * Sun May 22 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-6
  230. - changed BuildArch to noarch
  231. - updated spec
  232. - splitted -common, -curses, -gtk packages
  233. - Added Patch4,5,6,7,8 from Debian
  234. * Wed Jun 9 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-5
  235. - improved service start process in %%post section
  236. - changed daemon start runlevel
  237. * Mon Jun 07 2010 Shu KONNO <owa@bg.wakwak.com> - 1.7.0-4
  238. - fixed %%python_sitelib
  239. * Sat Jun 5 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-3
  240. - added Rerquires: gksu
  241. - added Patch2,3 from Debian
  242. - to stop running unexpected files in scripts
  243. - to fix resolv.conf permission
  244. * Fri Jun 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-2
  245. - added chkconfig in %post
  246. - added Patch1 to add Japanese description for desktop file
  247. * Fri May 28 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.7.0-1
  248. - initial build for VineSeed