123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- %define _noVersionedDependencies 1
- %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
- %define origname rpm-spec-mode
- %define origver 0.15
- Summary: RPM spec file editing commands for Emacs/XEmacs
- Name: %{origname}
- Version: %{origver}
- Release: 1%{?_dist_release}
- # from https://github.com/bjorlykke/rpm-spec-mode/archive/master.zip
- Source0: %{name}-master.zip
- Source1: %{origname}-install.sh
- Source2: %{origname}-remove.sh
- Source3: vine-default-%{origname}.el
- Source4: %{origname}-init.el
- License: GPLv2+
- Group: Applications/Editors/Emacs
- URL: http://www.emacswiki.org/emacs/RpmSpecMode
- BuildRoot: %{_tmppath}/%{name}-%{version}-root
- BuildArch: noarch
- Requires: emacsen
- %prereq_ge emacsen-common
- Distribution: Vine Linux
- Vendor: Project Vine
- Packager: iwaim
- %description
- RPM spec file editing commands for Emacs/XEmacs
- %prep
- %setup -n %{origname}-master
- %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 %{name}.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 LICENSE README.md
- %{_datadir}/emacs/site-lisp/%{origname}
- %{emacsen_pkgdir}/install/%{origname}
- %{emacsen_pkgdir}/remove/%{origname}
- %changelog
- * Mon Jan 5 2015 IWAI, Masaharu <iwaim.sub@gmail.com> 0.15-1
- - update to 0.15
- * Thu Feb 9 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.12-2
- - updated rpm-spec-mode-init.el
- * Thu Sep 02 2010 IWAI, Masaharu <iwai@alib.jp> 0.12-1
- - first release for Vine Linux
|