1 | %define _noVersionedDependencies 1 |
---|
2 | %define prereq_ge() %(LC_ALL="C" rpm -q --queryformat 'Requires(pre):%%{NAME} >= %%{VERSION}' %1| grep -v "is not") |
---|
3 | %define emacsen_pkgdir /usr/lib/emacsen-common/packages |
---|
4 | %define origname auto-install |
---|
5 | %define origver 0.1.24 |
---|
6 | |
---|
7 | Summary: Auto install elisp file |
---|
8 | Name: %{origname} |
---|
9 | Version: %{origver} |
---|
10 | Release: 3%{?_dist_release} |
---|
11 | |
---|
12 | Source0: http://www.emacswiki.org/emacs/download/auto-install.el |
---|
13 | Source1: %{origname}-install.sh |
---|
14 | Source2: %{origname}-remove.sh |
---|
15 | Source3: vine-default-%{origname}.el |
---|
16 | Source4: %{origname}-init.el |
---|
17 | Source5: http://www.gnu.org/licenses/gpl-3.0.txt |
---|
18 | |
---|
19 | License: GPLv3+ |
---|
20 | Group: Applications/Editors/Emacs |
---|
21 | URL: http://www.emacswiki.org/emacs/auto-install.el |
---|
22 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
23 | BuildArch: noarch |
---|
24 | |
---|
25 | Requires: emacsen |
---|
26 | Requires(pre): emacsen |
---|
27 | Conflicts: flim < 1.14.9-2 |
---|
28 | %prereq_ge emacsen-common |
---|
29 | |
---|
30 | Distribution: Vine Linux |
---|
31 | Vendor: Project Vine |
---|
32 | Packager: iwaim |
---|
33 | |
---|
34 | %description |
---|
35 | Auto install elisp file |
---|
36 | |
---|
37 | %prep |
---|
38 | |
---|
39 | %setup -q -T -c %{origname}-%{origver} |
---|
40 | %{__cp} -a %{SOURCE5} . |
---|
41 | |
---|
42 | %build |
---|
43 | |
---|
44 | %install |
---|
45 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
46 | [ "%{buildroot}" != "/" ] && mkdir -p %{buildroot} |
---|
47 | |
---|
48 | mkdir -p %{buildroot}%{_datadir}/emacs/site-lisp/%{origname}/packages |
---|
49 | mkdir -p %{buildroot}%{emacsen_pkgdir}/install |
---|
50 | mkdir -p %{buildroot}%{emacsen_pkgdir}/remove |
---|
51 | |
---|
52 | # |
---|
53 | # install el files |
---|
54 | # |
---|
55 | |
---|
56 | cp -p %{SOURCE0} %{SOURCE3} %{SOURCE4} %{buildroot}%{_datadir}/emacs/site-lisp/%{origname} |
---|
57 | |
---|
58 | |
---|
59 | # |
---|
60 | # install script (bytecompile el and install elc , remove) |
---|
61 | # |
---|
62 | |
---|
63 | %_installemacsenscript %{origname} %{SOURCE1} |
---|
64 | |
---|
65 | %_removeemacsenscript %{origname} %{SOURCE2} |
---|
66 | |
---|
67 | |
---|
68 | %clean |
---|
69 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
70 | |
---|
71 | %post |
---|
72 | # |
---|
73 | # bytecompile and install |
---|
74 | # |
---|
75 | if [ "$1" = 2 ]; then |
---|
76 | |
---|
77 | %_emacsenPackageRemove %{origname} |
---|
78 | |
---|
79 | fi |
---|
80 | |
---|
81 | %_addemacsenlist %{origname} |
---|
82 | |
---|
83 | %_emacsenPackageInstall %{origname} |
---|
84 | |
---|
85 | |
---|
86 | %preun |
---|
87 | if [ "$1" = 0 ]; then |
---|
88 | |
---|
89 | %_emacsenPackageRemove %{origname} |
---|
90 | |
---|
91 | %_removeemacsenlist %{origname} |
---|
92 | |
---|
93 | fi |
---|
94 | |
---|
95 | |
---|
96 | %files |
---|
97 | %defattr(-,root,root) |
---|
98 | %doc gpl-3.0.txt |
---|
99 | %{_datadir}/emacs/site-lisp/%{origname} |
---|
100 | %{emacsen_pkgdir}/install/%{origname} |
---|
101 | %{emacsen_pkgdir}/remove/%{origname} |
---|
102 | |
---|
103 | |
---|
104 | %changelog |
---|
105 | * Tue Feb 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.1.24-3 |
---|
106 | - rebuild with Vine6 environment |
---|
107 | |
---|
108 | * Sun Mar 7 2010 IWAI, Masaharu <iwai@alib.jp> 0.1.24-2 |
---|
109 | - update Conflicts flim version |
---|
110 | |
---|
111 | * Tue Feb 23 2010 IWAI, Masaharu <iwai@alib.jp> 0.1.24-1 |
---|
112 | - first release for Vine Linux |
---|