[3458] | 1 | %define _noVersionedDependencies 1 |
---|
| 2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
| 3 | %define origname lua-mode |
---|
| 4 | %define origver 20110324 |
---|
| 5 | |
---|
| 6 | Summary: Emacs major mode for editing Lua code |
---|
| 7 | Summary(ja): Lua コード編集用 Emacs メジャーモード |
---|
| 8 | Name: %{origname} |
---|
| 9 | Version: %{origver} |
---|
| 10 | Release: 1%{?_dist_release} |
---|
| 11 | |
---|
| 12 | Source0: lua-mode-%{version}.zip |
---|
| 13 | Source1: %{origname}-install.sh |
---|
| 14 | Source2: %{origname}-remove.sh |
---|
| 15 | Source3: vine-default-%{origname}.el |
---|
| 16 | Source4: %{origname}-init.el |
---|
| 17 | |
---|
| 18 | License: GPL |
---|
| 19 | Group: Applications/Editors/Emacs |
---|
| 20 | URL: http://luaforge.net/projects/lua-mode/ |
---|
| 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 22 | BuildArch: noarch |
---|
| 23 | |
---|
| 24 | BuildRequires: unzip |
---|
| 25 | |
---|
| 26 | Requires: emacsen |
---|
| 27 | Requires(post): emacsen |
---|
| 28 | %prereq_ge emacsen-common |
---|
| 29 | |
---|
| 30 | Distribution: Vine Linux |
---|
| 31 | Vendor: Project Vine |
---|
| 32 | Packager: munepi |
---|
| 33 | |
---|
| 34 | %description |
---|
| 35 | lua-mode is an Emacs major mode for editing Lua files. |
---|
| 36 | |
---|
| 37 | %description -l ja |
---|
| 38 | lua-mode は Lua ファイルを編集するための Emacs メジャーモードです。 |
---|
| 39 | |
---|
| 40 | %prep |
---|
| 41 | |
---|
| 42 | %setup -q -c %{origname}-%{origver} |
---|
| 43 | |
---|
| 44 | %build |
---|
| 45 | |
---|
| 46 | %install |
---|
| 47 | [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} |
---|
| 48 | [ "%{buildroot}" != "/" ] && %__mkdir_p %{buildroot} |
---|
| 49 | |
---|
| 50 | %__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages |
---|
| 51 | %__mkdir_p %{buildroot}%{emacsen_pkgdir}/install |
---|
| 52 | %__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove |
---|
| 53 | |
---|
| 54 | # |
---|
| 55 | # install el files |
---|
| 56 | # |
---|
| 57 | |
---|
| 58 | %__cp -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname} |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | # |
---|
| 62 | # install script (bytecompile el and install elc , remove) |
---|
| 63 | # |
---|
| 64 | |
---|
| 65 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
| 66 | |
---|
| 67 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | %clean |
---|
| 71 | [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} |
---|
| 72 | |
---|
| 73 | %post |
---|
| 74 | # |
---|
| 75 | # bytecompile and install |
---|
| 76 | # |
---|
| 77 | if [ "$1" = 2 ]; then |
---|
| 78 | |
---|
| 79 | %_emacsenPackageRemove %{origname} |
---|
| 80 | |
---|
| 81 | fi |
---|
| 82 | |
---|
| 83 | %_addemacsenlist %{origname} |
---|
| 84 | |
---|
| 85 | %_emacsenPackageInstall %{origname} |
---|
| 86 | |
---|
| 87 | |
---|
| 88 | %preun |
---|
| 89 | if [ "$1" = 0 ]; then |
---|
| 90 | |
---|
| 91 | %_emacsenPackageRemove %{origname} |
---|
| 92 | |
---|
| 93 | %_removeemacsenlist %{origname} |
---|
| 94 | |
---|
| 95 | fi |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | %files |
---|
| 99 | %defattr(-,root,root) |
---|
| 100 | %doc README README.md TODO |
---|
| 101 | %{_datadir}/emacs/site-lisp/%{origname} |
---|
| 102 | %{emacsen_pkgdir}/install/%{origname} |
---|
| 103 | %{emacsen_pkgdir}/remove/%{origname} |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | %changelog |
---|
| 107 | * Thu Apr 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 20110324-1 |
---|
| 108 | - first release for Vine Linux |
---|