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