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