[1740] | 1 | %define _noVersionedDependencies 1 |
---|
| 2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
| 3 | %define origname rpm-spec-mode |
---|
| 4 | %define origver 0.12 |
---|
| 5 | |
---|
| 6 | Summary: RPM spec file editing commands for Emacs/XEmacs |
---|
| 7 | Name: %{origname} |
---|
| 8 | Version: %{origver} |
---|
[5602] | 9 | Release: 2%{?_dist_release} |
---|
[1740] | 10 | |
---|
| 11 | Source0: http://www.tihlde.org/~stigb/rpm-spec-mode.el |
---|
| 12 | Source1: %{origname}-install.sh |
---|
| 13 | Source2: %{origname}-remove.sh |
---|
| 14 | Source3: vine-default-%{origname}.el |
---|
| 15 | Source4: %{origname}-init.el |
---|
| 16 | |
---|
| 17 | License: GPLv2+ |
---|
| 18 | Group: Applications/Editors/Emacs |
---|
| 19 | URL: http://www.emacswiki.org/emacs/RpmSpecMode |
---|
| 20 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 21 | BuildArch: noarch |
---|
| 22 | |
---|
| 23 | Requires: emacsen |
---|
| 24 | %prereq_ge emacsen-common |
---|
| 25 | |
---|
| 26 | Distribution: Vine Linux |
---|
| 27 | Vendor: Project Vine |
---|
| 28 | Packager: iwaim |
---|
| 29 | |
---|
| 30 | %description |
---|
| 31 | RPM spec file editing commands for Emacs/XEmacs |
---|
| 32 | |
---|
| 33 | %prep |
---|
| 34 | |
---|
| 35 | %setup -T -c %{origname}-%{origver} |
---|
| 36 | |
---|
| 37 | %build |
---|
| 38 | |
---|
| 39 | %install |
---|
| 40 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
| 41 | [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot} |
---|
| 42 | |
---|
| 43 | mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages |
---|
| 44 | mkdir -p %{buildroot}%{emacsen_pkgdir}/install |
---|
| 45 | mkdir -p %{buildroot}%{emacsen_pkgdir}/remove |
---|
| 46 | |
---|
| 47 | # |
---|
| 48 | # install el files |
---|
| 49 | # |
---|
| 50 | |
---|
| 51 | %__cp -p %{SOURCE0} %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname} |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | # |
---|
| 55 | # install script (bytecompile el and install elc , remove) |
---|
| 56 | # |
---|
| 57 | |
---|
| 58 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
| 59 | |
---|
| 60 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | %clean |
---|
| 64 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
| 65 | |
---|
| 66 | %post |
---|
| 67 | # |
---|
| 68 | # bytecompile and install |
---|
| 69 | # |
---|
| 70 | if [ "$1" = 2 ]; then |
---|
| 71 | |
---|
| 72 | %_emacsenPackageRemove %{origname} |
---|
| 73 | |
---|
| 74 | fi |
---|
| 75 | |
---|
| 76 | %_addemacsenlist %{origname} |
---|
| 77 | |
---|
| 78 | %_emacsenPackageInstall %{origname} |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | %preun |
---|
| 82 | if [ "$1" = 0 ]; then |
---|
| 83 | |
---|
| 84 | %_emacsenPackageRemove %{origname} |
---|
| 85 | |
---|
| 86 | %_removeemacsenlist %{origname} |
---|
| 87 | |
---|
| 88 | fi |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | %files |
---|
| 92 | %defattr(-,root,root) |
---|
| 93 | %{_datadir}/emacs/site-lisp/%{origname} |
---|
| 94 | %{emacsen_pkgdir}/install/%{origname} |
---|
| 95 | %{emacsen_pkgdir}/remove/%{origname} |
---|
| 96 | |
---|
| 97 | |
---|
| 98 | %changelog |
---|
[5602] | 99 | * Thu Feb 9 2012 Munehiro Yamamoto <munepi@vinelinux.org> 0.12-2 |
---|
| 100 | - updated rpm-spec-mode-init.el |
---|
| 101 | |
---|
[1740] | 102 | * Thu Sep 02 2010 IWAI, Masaharu <iwai@alib.jp> 0.12-1 |
---|
| 103 | - first release for Vine Linux |
---|