source: projects/emacsen-common/branches/0.4.x/emacsen-common.spec @ 7238

Revision 7238, 4.9 KB checked in by daisuke, 10 years ago (diff)

import emacsen-common

Line 
1%define name emacsen-common
2%define origname emacsen-common
3%define version 0.4
4%define _ruby_libdir %{_libdir}/ruby/1.6
5%define prereq_ge()  %(LC_ALL="C" rpm -q --queryformat 'PreReq:%%{NAME} >= %%{VERSION}' %1| grep -v "is not")
6
7
8
9Summary: Common facilities for all emacsen.
10Name: %{name}
11Version: %{version}
12Release: 0vl17
13License: GPL
14Vendor: %{_vendor}
15Group: Development/Languages
16Source: http://www.ad-hoc.org/~xtakei/%{origname}/%{origname}-%{version}.tar.gz
17Packager: Kazuhisa TAKEI <takei@vinelinux.org>
18URL: http://vinelinux.org/
19BuildRoot: %{_tmppath}/%{name}-root
20BuildArch: noarch
21PreReq: rpm >= 3.0.6-0vl16
22Requires: ruby
23%prereq_ge alternatives
24BuildPreReq: alternatives
25
26%description
27This package contains code that is needed by all the (x)emacs packages.
28
29
30%changelog
31* Sat Mar 23 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl7
32- add /usr/bin/xemacs to alternatives.
33
34* Thu Mar  7 2002 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl16
35- %triggerin -> %triggerpostun
36
37* Wed Mar  6 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4-0vl15
38- add prereq rpm >= 3.0.6-0vl16 for emacsen macros
39
40* Thu Dec  6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl14
41- fixed %triggerin 
42
43* Thu Nov  8 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl13
44- move /tmp -> /var/lib/emacsen-common (IP(package)C file)
45- add %triggerin xemacs
46
47* Sat Oct  6 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.4-0vl1
48- fixed emacs-install.rb ( lacking run update-alternatives when emacsen install) 
49* Sun Aug 12 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.2-0vl1
50- add routine when install and remove .
51
52* Wed Jul 18 2001 Kazuhisa TAKEI <takei@vinelinux.org> 0.1-0vl1
53- initial package
54
55
56
57%prep
58
59%setup -q -n %{origname}
60%build
61
62
63
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
68mkdir -p $RPM_BUILD_ROOT/%_localstatedir/%{origname}
69mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/remove
70mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{origname}/packages/install
71mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{origname}/site-list
72mkdir -p  $RPM_BUILD_ROOT/var/lib/emacs
73
74echo "/usr/bin/etags
75/usr/bin/rcs-checkin
76/usr/bin/emacsclient
77/usr/bin/gctags" > $RPM_BUILD_ROOT/var/lib/emacs/alternative-filelist
78
79
80
81cp scripts/emacs-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
82cp scripts/emacs-package-install.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
83cp scripts/generate-package-list.rb $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
84cp scripts/installed-flavors $RPM_BUILD_ROOT/%_localstatedir/emacsen-common/installed-flavors
85cp scripts/installed-elisp $RPM_BUILD_ROOT/%_localstatedir/emacsen-common/installed-elisp
86
87cp scripts/change-default-flavors.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/.
88
89ln -sf emacs-package-install.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-install
90
91ln -sf emacs-package-install.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-package-remove
92
93ln -sf emacs-install.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-install
94
95ln -sf emacs-install.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/emacs-remove
96
97
98ln -sf generate-package-list.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-package-list
99
100ln -sf generate-package-list.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-package-list
101
102ln -sf generate-package-list.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/generate-flavors-list
103
104ln -sf generate-package-list.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/remove-flavors-list
105
106#ln -sf change-default-flavors.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-default-flavor
107
108#ln -sf change-default-flavors.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/reverse-default-flavor
109
110#ln -sf change-default-flavors.rb  $RPM_BUILD_ROOT/%{_libdir}/%{origname}/change-temporary-flavor 
111
112
113
114#make install prefix=$RPM_BUILD_ROOT/%{_prefix}
115
116
117
118 
119
120
121%clean
122rm -rf ${RPM_BUILD_ROOT}
123
124%triggerpostun -- emacs < 20.7-0vl7.3
125
126if [ -f /var/lib/emacsen-common/doinstaflavor-emacs ]; then
127
128NEWFLAVOR=$(cat /var/lib/emacsen-common/doinstaflavor-emacs)
129
130%_addflavorslist $NEWFLAVOR
131
132export PRIORITY=10
133
134%_installemacs $NEWFLAVOR
135
136unset PRIORITY
137
138rm -rf /var/lib/emacsen-common/doinstaflavor-emacs
139
140fi
141
142%triggerpostun -- xemacs < 21.1.14-0vl6
143
144if [ -f /var/lib/emacsen-common/doinstaflavor-xemacs ]; then
145
146NEWFLAVOR=$(cat /var/lib/emacsen-common/doinstaflavor-xemacs)
147
148%_addflavorslist $NEWFLAVOR
149
150export PRIORITY=15
151
152%_installemacs $NEWFLAVOR
153
154unset PRIORITY
155
156rm -rf /var/lib/emacsen-common/doinstaflavor-xemacs
157
158fi
159
160
161 
162
163%files
164%defattr(-, root, root)
165%attr(755,root,root) %{_libdir}/emacsen-common/emacs-*
166%attr(755,root,root) %{_libdir}/emacsen-common/generate-*
167%attr(755,root,root) %{_libdir}/emacsen-common/remove-*
168/var/lib/emacs/alternative-filelist
169# %attr(755,root,root) %{_libdir}/emacsen-common/*-flavor
170# %attr(755,root,root) %{_libdir}/emacsen-common/*-flavors.rb
171%dir %{_libdir}/emacsen-common/packages/remove
172%dir %{_libdir}/emacsen-common/packages/install
173%config(noreplace) %_localstatedir/emacsen-common/installed-flavors
174%config(noreplace) %_localstatedir/emacsen-common/installed-elisp
175
176
177
178
179
Note: See TracBrowser for help on using the repository browser.