123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- %define _noVersionedDependencies 1
- %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(post):%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
- %define origname lua-mode
- %define origver 20110324
- Summary: Emacs major mode for editing Lua code
- Summary(ja): Lua コード編集用 Emacs メジャーモード
- Name: %{origname}
- Version: %{origver}
- Release: 1%{?_dist_release}
- Source0: lua-mode-%{version}.zip
- Source1: %{origname}-install.sh
- Source2: %{origname}-remove.sh
- Source3: vine-default-%{origname}.el
- Source4: %{origname}-init.el
- License: GPL
- Group: Applications/Editors/Emacs
- URL: http://luaforge.net/projects/lua-mode/
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildArch: noarch
- BuildRequires: unzip
- Requires: emacsen
- Requires(post): emacsen
- %prereq_ge emacsen-common
- Distribution: Vine Linux
- Vendor: Project Vine
- Packager: munepi
- %description
- lua-mode is an Emacs major mode for editing Lua files.
- %description -l ja
- lua-mode は Lua ファイルを編集するための Emacs メジャーモードです。
- %prep
- %setup -q -c %{origname}-%{origver}
- %build
- %install
- [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
- [ "%{buildroot}" != "/" ] && %__mkdir_p %{buildroot}
- %__mkdir_p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages
- %__mkdir_p %{buildroot}%{emacsen_pkgdir}/install
- %__mkdir_p %{buildroot}%{emacsen_pkgdir}/remove
- #
- # install el files
- #
- %__cp -p *.el %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}
- #
- # install script (bytecompile el and install elc , remove)
- #
- %_installemacsenscript %{origname} %{SOURCE1}
- %_removeemacsenscript %{origname} %{SOURCE2}
- %clean
- [ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot}
- %post
- #
- # bytecompile and install
- #
- if [ "$1" = 2 ]; then
- %_emacsenPackageRemove %{origname}
- fi
- %_addemacsenlist %{origname}
- %_emacsenPackageInstall %{origname}
- %preun
- if [ "$1" = 0 ]; then
- %_emacsenPackageRemove %{origname}
- %_removeemacsenlist %{origname}
- fi
- %files
- %defattr(-,root,root)
- %doc README README.md TODO
- %{_datadir}/emacs/site-lisp/%{origname}
- %{emacsen_pkgdir}/install/%{origname}
- %{emacsen_pkgdir}/remove/%{origname}
- %changelog
- * Thu Apr 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 20110324-1
- - first release for Vine Linux
|