[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 |
---|
[9515] | 4 | %define origver 20140514 |
---|
[3458] | 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 | |
---|
[9515] | 12 | Source0: https://github.com/immerrr/lua-mode/archive/v%{version}.tar.gz |
---|
[3458] | 13 | Source1: %{origname}-install.sh |
---|
| 14 | Source2: %{origname}-remove.sh |
---|
| 15 | Source3: vine-default-%{origname}.el |
---|
| 16 | Source4: %{origname}-init.el |
---|
| 17 | |
---|
[9515] | 18 | License: GPLv2+ |
---|
[3458] | 19 | Group: Applications/Editors/Emacs |
---|
[9515] | 20 | URL: http://immerrr.github.io/lua-mode/ |
---|
[3458] | 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 22 | BuildArch: noarch |
---|
| 23 | |
---|
[9515] | 24 | BuildRequires: unzip |
---|
[3458] | 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 | |
---|
[9515] | 42 | %setup -q |
---|
| 43 | #-c %{origname}-%{origver} |
---|
[3458] | 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 %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname} |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | # |
---|
| 63 | # install script (bytecompile el and install elc , remove) |
---|
| 64 | # |
---|
| 65 | |
---|
| 66 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
| 67 | |
---|
| 68 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
| 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) |
---|
[9515] | 101 | %doc NEWS README README.md TODO |
---|
[3458] | 102 | %{_datadir}/emacs/site-lisp/%{origname} |
---|
| 103 | %{emacsen_pkgdir}/install/%{origname} |
---|
| 104 | %{emacsen_pkgdir}/remove/%{origname} |
---|
| 105 | |
---|
| 106 | |
---|
| 107 | %changelog |
---|
[9515] | 108 | * Fri Apr 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 20140514-1 |
---|
| 109 | - new upstream release |
---|
| 110 | |
---|
[3458] | 111 | * Thu Apr 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 20110324-1 |
---|
| 112 | - first release for Vine Linux |
---|