usbmanager-vl.spec 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
  2. Name: usbmanager
  3. Version: 1.0.0
  4. Release: 2%{?_dist_release}
  5. Summary: An USB storage management interface written in Python
  6. Summary(ja): Python で書かれた USB ストレージ管理インターフェイス
  7. Group: Applications/System
  8. License: LGPLv3
  9. URL: https://launchpad.net/usbmanager
  10. Source0: %{name}-%{version}.tar.gz
  11. Source1: %{name}_ja.po
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. BuildArch: noarch
  14. BuildRequires: gettext
  15. BuildRequires: python-devel
  16. BuildRequires: python-setuptools
  17. BuildRequires: desktop-file-utils
  18. Requires: dbus-python
  19. Requires: gksu
  20. Requires: python pygtk2
  21. Requires: mtools
  22. Requires: dbus hal
  23. %description
  24. USBManager is a simple and intuitive tool developed to help people
  25. who have hard times managing theirs USB storage devices.
  26. %description -l ja
  27. USBManager は USB ストレージデバイスの管理に手を焼く人々を
  28. 助けるために開発されたシンプルで直感的なツールです。
  29. %prep
  30. %setup -q -n %{name}
  31. cp -f %{SOURCE1} locale/ja.po
  32. %build
  33. # build Japanese language file before setup,
  34. # if Japanese translation file is merged, this command will delete.
  35. msgfmt -o locale/ja.mo locale/ja.po
  36. python setup.py build
  37. %install
  38. rm -rf %{buildroot}
  39. python setup.py install --skip-build --root %{buildroot}
  40. # maybe disused file?
  41. rm -rf %{buildroot}/root/
  42. %find_lang %{name}
  43. desktop-file-install \
  44. --dir %{buildroot}%{_datadir}/applications data/%{name}.desktop
  45. %clean
  46. rm -rf %{buildroot}
  47. %post
  48. touch --no-create %{_datadir}/icons/hicolor || :
  49. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  50. update-desktop-database %{_datadir}/applications
  51. %postun
  52. touch --no-create %{_datadir}/icons/hicolor || :
  53. %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
  54. update-desktop-database %{_datadir}/applications
  55. %files -f %{name}.lang
  56. %defattr(-,root,root,-)
  57. %doc AUTHORS COPYING ChangeLog NEWS README TODO
  58. %{_bindir}/%{name}
  59. #%{_libdir}/python2.*/site-packages/*
  60. %{python_sitelib}/
  61. %{_datadir}/applications/*.desktop
  62. %{_datadir}/icons/*
  63. %changelog
  64. * Fri Jan 14 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.0-2
  65. - added source1 to translate Japanese
  66. - used python macro
  67. - added BuildRequires: gettext
  68. - added Requires: dbus-python, gksu
  69. * Sat Mar 13 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 1.0.0-1
  70. - initial build for VineSeed