wicd-vl.spec 4.5 KB

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