[1212] | 1 | %define _noVersionedDependencies 1 |
---|
| 2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
| 3 | %define emacsen_pkgdir /usr/lib/emacsen-common/packages |
---|
| 4 | %define origname text-translator |
---|
| 5 | %define origver 0.7.1 |
---|
| 6 | |
---|
| 7 | Summary: translates the character string on Emacs |
---|
| 8 | Name: %{origname} |
---|
| 9 | Version: %{origver} |
---|
| 10 | Release: 1%{?_dist_release} |
---|
| 11 | |
---|
| 12 | Source0: text-translator.el |
---|
| 13 | Source1: text-translator-vars.el |
---|
| 14 | Source2: text-translator-load.el |
---|
| 15 | Source3: http://www.gnu.org/licenses/gpl-2.0.txt |
---|
| 16 | |
---|
| 17 | Source11: %{origname}-install.sh |
---|
| 18 | Source12: %{origname}-remove.sh |
---|
| 19 | Source13: vine-default-%{origname}.el |
---|
| 20 | Source14: %{origname}-init.el |
---|
| 21 | |
---|
| 22 | License: GPLv2+ |
---|
| 23 | Group: Applications/Editors/Emacs |
---|
| 24 | URL: http://www.emacswiki.org/emacs/TextTranslator |
---|
| 25 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 26 | BuildArch: noarch |
---|
| 27 | |
---|
| 28 | Requires: emacsen |
---|
| 29 | PreReq: emacsen |
---|
| 30 | %prereq_ge emacsen-common |
---|
| 31 | |
---|
| 32 | Distribution: Vine Linux |
---|
| 33 | Vendor: Project Vine |
---|
| 34 | Packager: iwaim |
---|
| 35 | |
---|
| 36 | %description |
---|
| 37 | translates the character string on Emacs. this packages use the text |
---|
| 38 | translation service that exists on the Internet. |
---|
| 39 | |
---|
| 40 | %prep |
---|
| 41 | |
---|
| 42 | %setup -T -c %{origname}-%{origver} |
---|
| 43 | %{__cp} %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} . |
---|
| 44 | |
---|
| 45 | %build |
---|
| 46 | |
---|
| 47 | %install |
---|
| 48 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
| 49 | [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot} |
---|
| 50 | |
---|
| 51 | mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages |
---|
| 52 | mkdir -p %{buildroot}%{emacsen_pkgdir}/install |
---|
| 53 | mkdir -p %{buildroot}%{emacsen_pkgdir}/remove |
---|
| 54 | |
---|
| 55 | # |
---|
| 56 | # install el files |
---|
| 57 | # |
---|
| 58 | |
---|
| 59 | cp -p *.el %{SOURCE13} %{SOURCE14} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname} |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | # |
---|
| 63 | # install script (bytecompile el and install elc , remove) |
---|
| 64 | # |
---|
| 65 | |
---|
| 66 | %_installemacsenscript %{origname} %{SOURCE11} |
---|
| 67 | |
---|
| 68 | %_removeemacsenscript %{origname} %{SOURCE12} |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | %clean |
---|
| 72 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
| 73 | |
---|
| 74 | %post |
---|
| 75 | # |
---|
| 76 | # bytecompile and install |
---|
| 77 | # |
---|
| 78 | if [ "$1" = 2 ]; then |
---|
| 79 | |
---|
| 80 | %_emacsenPackageRemove %{origname} |
---|
| 81 | |
---|
| 82 | fi |
---|
| 83 | |
---|
| 84 | %_addemacsenlist %{origname} |
---|
| 85 | |
---|
| 86 | %_emacsenPackageInstall %{origname} |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | %preun |
---|
| 90 | if [ "$1" = 0 ]; then |
---|
| 91 | |
---|
| 92 | %_emacsenPackageRemove %{origname} |
---|
| 93 | |
---|
| 94 | %_removeemacsenlist %{origname} |
---|
| 95 | |
---|
| 96 | fi |
---|
| 97 | |
---|
| 98 | |
---|
| 99 | %files |
---|
| 100 | %defattr(-,root,root) |
---|
| 101 | %doc gpl-2.0.txt |
---|
| 102 | %{_datadir}/emacs/site-lisp/%{origname} |
---|
| 103 | %{emacsen_pkgdir}/install/%{origname} |
---|
| 104 | %{emacsen_pkgdir}/remove/%{origname} |
---|
| 105 | |
---|
| 106 | %changelog |
---|
| 107 | * Sun Mar 07 2010 IWAI, Masaharu <iwai@alib.jp> 0.7.1-1 |
---|
| 108 | - first release for Vine Linux |
---|