[521] | 1 | %define build_vine4 0 |
---|
| 2 | %if "%{?_dist_release}" == "vl4" |
---|
| 3 | %define build_vine4 1 |
---|
| 4 | %endif |
---|
| 5 | |
---|
| 6 | Summary: A GUI interface to write image files to USB Keys |
---|
| 7 | Summary(ja): USBメモリにイメージファイルを書き込むためのGUIツール |
---|
| 8 | Name: usb-imagewriter |
---|
| 9 | Version: 0.1.3 |
---|
| 10 | Release: 2%{?_dist_release} |
---|
| 11 | License: GPLv2 |
---|
| 12 | Group: Applications/System |
---|
| 13 | URL: http://launchpad.net/usb-imagewriter |
---|
| 14 | |
---|
| 15 | Source0: usb-imagewriter_0.1.3.orig.tar.gz |
---|
| 16 | Source10: header-vine.png |
---|
| 17 | Source11: usb-imagewriter-0.1.3-ja.po |
---|
| 18 | Patch0: usb-imagewriter-0.1.3-support-removable.patch |
---|
| 19 | Patch1: usb-imagewriter-0.1.3-ja.patch |
---|
| 20 | Patch2: usb-imagewriter-0.1.3-gksu.patch |
---|
| 21 | Patch3: usb-imagewriter-0.1.3-vine4.patch |
---|
| 22 | |
---|
| 23 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 24 | BuildArch: noarch |
---|
| 25 | BuildRequires: desktop-file-utils |
---|
| 26 | |
---|
| 27 | %description |
---|
| 28 | A GUI tool to write image(.img) files to USB Keys. |
---|
| 29 | |
---|
| 30 | %description -l ja |
---|
| 31 | USBメモリにイメージファイル(.img)を書き込むためのGUIツールです。 |
---|
| 32 | |
---|
| 33 | %prep |
---|
| 34 | %setup -q |
---|
| 35 | %patch0 -p1 |
---|
| 36 | %patch1 -p1 |
---|
| 37 | %patch2 -p1 |
---|
| 38 | %if %{build_vine4} |
---|
| 39 | %patch3 -p1 |
---|
| 40 | %endif |
---|
| 41 | |
---|
| 42 | cp -f %{SOURCE10} share/usb-imagewriter/header.png |
---|
| 43 | cp -f %{SOURCE11} po/ja.po |
---|
| 44 | |
---|
| 45 | %build |
---|
| 46 | pushd po |
---|
| 47 | ./update_translations.sh |
---|
| 48 | popd |
---|
| 49 | |
---|
| 50 | %install |
---|
| 51 | rm -rf $RPM_BUILD_ROOT |
---|
| 52 | mkdir -p %{buildroot}%{_bindir} |
---|
| 53 | mkdir -p %{buildroot}%{_prefix}/lib/imagewriter |
---|
| 54 | mkdir -p %{buildroot}%{_datadir}/{applications,imagewriter} |
---|
| 55 | install -m755 imagewriter %{buildroot}%{_bindir} |
---|
| 56 | install -m644 share/applications/* %{buildroot}%{_datadir}/applications |
---|
| 57 | install -m644 share/usb-imagewriter/* %{buildroot}%{_datadir}/imagewriter/ |
---|
| 58 | install -m755 lib/* %{buildroot}%{_prefix}/lib/imagewriter/ |
---|
| 59 | |
---|
| 60 | for l in ja de |
---|
| 61 | do |
---|
| 62 | mkdir -p %{buildroot}%{_datadir}/locale/${l}/LC_MESSAGES/ |
---|
| 63 | install -m644 po/${l}/LC_MESSAGES/usb-imagewriter.mo \ |
---|
| 64 | %{buildroot}%{_datadir}/locale/${l}/LC_MESSAGES/ |
---|
| 65 | done |
---|
| 66 | |
---|
| 67 | desktop-file-install \ |
---|
| 68 | --vendor="" --delete-original \ |
---|
| 69 | --dir=%{buildroot}%{_datadir}/applications \ |
---|
| 70 | --remove-category="Utility" \ |
---|
| 71 | --add-category="System" \ |
---|
| 72 | %{buildroot}%{_datadir}/applications/imagewriter.desktop |
---|
| 73 | |
---|
| 74 | %find_lang %{name} |
---|
| 75 | |
---|
| 76 | %clean |
---|
| 77 | rm -rf $RPM_BUILD_ROOT |
---|
| 78 | |
---|
| 79 | %files -f %{name}.lang |
---|
| 80 | %defattr(-, root, root) |
---|
| 81 | %doc COPYING |
---|
| 82 | %{_bindir}/* |
---|
| 83 | %{_datadir}/imagewriter |
---|
| 84 | %{_datadir}/applications/*.desktop |
---|
| 85 | %{_prefix}/lib/imagewriter |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | %changelog |
---|
| 89 | * Sun Aug 16 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.1.3-2 |
---|
| 90 | - add Patch3 for Vine Linux 4.x |
---|
| 91 | - change BuildArch to noarch |
---|
| 92 | - remove unneeded BR: |
---|
| 93 | |
---|
| 94 | * Fri May 08 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 0.1.3-1 |
---|
| 95 | - initial build for Vine Linux |
---|
| 96 | |
---|