wicd-vl.spec 8.1 KB

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