]>
Commit | Line | Data |
---|---|---|
5f9f4a13 JR |
1 | Summary: The libraries needed to run the GNU Emacs text editor. |
2 | Name: emacs | |
3 | Version: 20.3 | |
4 | Release: 16 | |
5 | Copyright: GPL | |
6 | Group: Applications/Editors | |
7 | Source0: ftp://ftp.gnu.org/pub/gnu/emacs-%{version}.tar.gz | |
8 | Source1: ftp://ftp.gnu.org/pub/gnu/leim-%{version}.tar.gz | |
9 | Source2: emacs.wmconfig | |
10 | Source3: mh-utils.elc | |
11 | Patch0: emacs-20.3-gnu.patch | |
12 | Patch1: emacs-20.2-xaw3d.patch | |
13 | Patch2: emacs-20.2-gctags.patch | |
662c4abb | 14 | # patch4 (signal patch) not needed for emacs > 20.2 |
5f9f4a13 JR |
15 | Patch4: emacs-20.2-signal.patch |
16 | Patch5: emacs-20.3-tmprace.patch | |
17 | Patch6: emacs-20.3-ufix.patch | |
18 | Patch7: emacs-armconfig.patch | |
19 | Patch8: emacs-20.3-linkscr.patch | |
20 | Patch9: emacs-20.3-nmhlocation.patch | |
21 | Patch10: emacs-20.3-dxpc.patch | |
22 | Buildroot: /tmp/%{name}-%{version}-root | |
662c4abb JR |
23 | # |
24 | # more info on multibyte support: http://sourcery.naggum.no/emacs/ | |
25 | # | |
26 | ||
27 | %description | |
28 | Emacs is a powerful, customizable, self-documenting, modeless text | |
29 | editor. Emacs contains special code editing features, a scripting | |
30 | language (elisp), and the capability to read mail, news and more without | |
31 | leaving the editor. | |
32 | ||
33 | This package includes the libraries you need to run the Emacs editor, so | |
34 | you need to install this package if you intend to use Emacs. You also | |
35 | need to install the actual Emacs program package (emacs-nox or emacs-X11). | |
36 | Install emacs-nox if you are not going to use the X Window System; install | |
37 | emacs-X11 if you will be using X. | |
38 | ||
39 | %package el | |
5f9f4a13 JR |
40 | Summary: The sources for elisp programs included with Emacs. |
41 | Group: Applications/Editors | |
42 | Requires: %{name} = %{version} | |
662c4abb JR |
43 | |
44 | %description el | |
45 | Emacs-el contains the emacs-elisp sources for many of the elisp | |
46 | programs included with the main Emacs text editor package. | |
47 | ||
48 | You need to install emacs-el only if you intend to modify any of the | |
49 | Emacs packages or see some elisp examples. | |
50 | ||
51 | %package leim | |
5f9f4a13 JR |
52 | Summary: Emacs Lisp code for input methods for internationalization. |
53 | Group: Applications/Editors | |
54 | Requires: %{name} = %{version} | |
662c4abb JR |
55 | |
56 | %description leim | |
57 | The Emacs Lisp code for input methods for various international | |
58 | character scripts. | |
59 | ||
60 | %package nox | |
5f9f4a13 JR |
61 | Summary: The Emacs text editor without support for the X Window System. |
62 | Group: Applications/Editors | |
63 | Requires: %{name} = %{version} | |
662c4abb JR |
64 | |
65 | %description nox | |
66 | Emacs-nox is the Emacs text editor program without support for | |
67 | the X Window System. | |
68 | ||
69 | You need to install this package only if you plan on exclusively using | |
70 | Emacs without the X Window System (emacs-X11 will work both in X and out | |
71 | of X, but emacs-nox will only work outside of X). You'll also need to | |
72 | install the emacs package in order to run Emacs. | |
73 | ||
74 | %package X11 | |
5f9f4a13 JR |
75 | Summary: The Emacs text editor for the X Window System. |
76 | Group: Applications/Editors | |
77 | Requires: %{name} = %{version} | |
662c4abb JR |
78 | |
79 | %description X11 | |
80 | Emacs-X11 includes the Emacs text editor program for use with the | |
81 | X Window System (it provides support for the mouse and other GUI | |
82 | elements). Emacs-X11 will also run Emacs outside of X, but it has | |
83 | a larger memory footprint than the 'non-X' Emacs package | |
84 | (emacs-nox). | |
85 | ||
86 | Install emacs-X11 if you're going to use Emacs with the X Window System. | |
87 | You should also install emacs-X11 if you're going to run Emacs both | |
88 | with and without X (it will work fine both ways). You'll also need to | |
89 | install the emacs package in order to run Emacs. | |
90 | ||
91 | %prep | |
92 | %setup -q -b 1 | |
93 | cp -f $RPM_SOURCE_DIR/mh-utils.elc lisp/mail | |
662c4abb JR |
94 | %patch0 -p1 |
95 | %patch1 -p1 | |
96 | %patch2 -p1 | |
97 | # patch4 (signal patch) not needed for emacs > 20.2 | |
98 | %patch5 -p1 | |
99 | %patch6 -p1 | |
100 | %patch7 -p1 | |
101 | %patch8 -p1 | |
102 | %patch9 -p1 | |
103 | %patch10 -p2 | |
104 | ||
105 | # clean out remnants of patching | |
106 | find . -name "*.orig" -exec rm -f {} \; | |
107 | ||
108 | %build | |
109 | PUREDEF="" | |
110 | XPUREDEF="" | |
111 | libtoolize --force --copy | |
5f9f4a13 | 112 | CONFOPTS="--prefix=%{_prefix} --libexecdir=%{_libdir} --sharedstatedir=/var --with-gcc --with-pop" |
662c4abb JR |
113 | |
114 | #Build binary without X support | |
115 | [ -d build-nox ] && rm -rf build-nox | |
116 | mkdir build-nox && cd build-nox | |
5f9f4a13 JR |
117 | CFLAGS="$RPM_OPT_FLAGS $PUREDEF" LDFLAGS=-s \ |
118 | ../configure ${CONFOPTS} --with-x=no %{_target_platform} | |
662c4abb JR |
119 | make |
120 | cd .. | |
121 | ||
122 | #Build binary with X support | |
123 | [ -d build-withx ] && rm -rf build-withx | |
124 | mkdir build-withx && cd build-withx | |
5f9f4a13 JR |
125 | CFLAGS="$RPM_OPT_FLAGS $XPUREDEF" LDFLAGS=-s \ |
126 | ../configure ${CONFOPTS} --with-x-toolkit %{_target_platform} | |
662c4abb JR |
127 | make |
128 | cd .. | |
129 | ||
130 | %install | |
131 | rm -rf $RPM_BUILD_ROOT | |
5f9f4a13 | 132 | install -d $RPM_BUILD_ROOT%{_prefix} |
662c4abb | 133 | |
5f9f4a13 | 134 | ARCHDIR=%{_target_platform} |
662c4abb | 135 | make install -C build-withx \ |
5f9f4a13 JR |
136 | prefix=$RPM_BUILD_ROOT%{_prefix} \ |
137 | libexecdir=$RPM_BUILD_ROOT%{_libdir} \ | |
662c4abb JR |
138 | sharedstatedir=$RPM_BUILD_ROOT/var |
139 | ||
140 | rm -f $RPM_BUILD_ROOT/usr/info/dir | |
141 | gzip -9nf $RPM_BUILD_ROOT/usr/info/* | |
142 | install -m755 build-nox/src/emacs $RPM_BUILD_ROOT/usr/bin/emacs-nox | |
143 | ||
144 | # For some reason, when emacs is stripped on the Alpha, it dumps core | |
145 | # Lucky for us it started doing this on the Intel as well. Yeah. | |
146 | #strip $RPM_BUILD_ROOT/usr/bin/* ||: | |
147 | for I in cvtmail digest-doc emacsserver fakemail hexl movemail profile \ | |
148 | sorted-doc timer wakeup yow; do | |
149 | strip $RPM_BUILD_ROOT/usr/lib/emacs/$RPM_PACKAGE_VERSION/$ARCHDIR/$I||: | |
150 | done | |
151 | ||
152 | chown root.mail $RPM_BUILD_ROOT/usr/lib/emacs/$RPM_PACKAGE_VERSION/$ARCHDIR/movemail | |
153 | chmod 2755 $RPM_BUILD_ROOT/usr/lib/emacs/$RPM_PACKAGE_VERSION/$ARCHDIR/movemail | |
154 | ||
155 | mkdir -p $RPM_BUILD_ROOT/usr/lib/emacs/site-lisp | |
156 | ||
157 | mv $RPM_BUILD_ROOT/usr/man/man1/ctags.1 $RPM_BUILD_ROOT/usr/man/man1/gctags.1 | |
158 | mv $RPM_BUILD_ROOT/usr/bin/ctags $RPM_BUILD_ROOT/usr/bin/gctags | |
159 | ||
160 | # wmconfig file | |
161 | mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig | |
162 | install -m 0644 $RPM_SOURCE_DIR/emacs.wmconfig $RPM_BUILD_ROOT/etc/X11/wmconfig/emacs | |
163 | ||
164 | # | |
165 | # create file lists | |
166 | # | |
167 | ||
168 | find $RPM_BUILD_ROOT/usr/share/emacs/%{PACKAGE_VERSION}/lisp \ | |
169 | -name '*.elc' -print | sed "s^$RPM_BUILD_ROOT^^" > elc-filelist | |
170 | find $RPM_BUILD_ROOT/usr/lib/emacs/%{PACKAGE_VERSION} -type f | \ | |
171 | sed "s^$RPM_BUILD_ROOT^^" | grep -v movemail >> elc-filelist | |
172 | ||
173 | find $RPM_BUILD_ROOT/usr/share/emacs/%{PACKAGE_VERSION}/leim \ | |
174 | -name '*.elc' -print | sed "s^$RPM_BUILD_ROOT^^" > leim-filelist | |
175 | ||
176 | # | |
177 | # be sure to exclude some files which are need in core package | |
178 | # | |
179 | find $RPM_BUILD_ROOT/usr/share/emacs/%{PACKAGE_VERSION}/lisp \ | |
180 | -name '*.el' -print | sed "s^$RPM_BUILD_ROOT^^" |\ | |
181 | grep -v "international\/latin-[0-9]*.el" > el-filelist | |
182 | ||
183 | find $RPM_BUILD_ROOT/usr/share/emacs/%{PACKAGE_VERSION}/leim \ | |
184 | -name '*.el' -print | sed "s^$RPM_BUILD_ROOT^^" |\ | |
185 | grep -v "leim\/leim-list.el" >> el-filelist | |
186 | ||
187 | %clean | |
188 | rm -rf $RPM_BUILD_ROOT | |
189 | rm -rf build-nox | |
190 | rm -rf build-withx | |
191 | ||
192 | %post | |
193 | /sbin/install-info /usr/info/ccmode.gz /usr/info/dir --entry="* CC mode: (ccmode). The GNU Emacs mode for editing C, C++, Objective-C and Java code." --section="Emacs" | |
194 | /sbin/install-info /usr/info/ediff.gz /usr/info/dir --entry="* Ediff: (ediff). A comprehensive visual interface to diff & patch." --section="Emacs" | |
195 | /sbin/install-info /usr/info/dired-x.gz /usr/info/dir --entry="* Dired-X: (dired-x). Dired Extra Features." --section="Emacs" | |
196 | /sbin/install-info /usr/info/sc.gz /usr/info/dir --entry="* SC: (sc). Supercite lets you cite parts of messages you're replying to, in flexible ways." --section="Emacs" | |
197 | /sbin/install-info /usr/info/cl.gz /usr/info/dir --entry="* CL: (cl). Partial Common Lisp support for Emacs Lisp." --section="Emacs" | |
198 | /sbin/install-info /usr/info/mh-e.gz /usr/info/dir --entry="* MH-E: (mh-e). Emacs interface to the MH mail system." --section="Emacs" | |
199 | /sbin/install-info /usr/info/message.gz /usr/info/dir --entry="* Message: (message). Mail and news composition mode that goes with Gnus." --section="Emacs" | |
200 | /sbin/install-info /usr/info/gnus.gz /usr/info/dir --entry="* Gnus: (gnus). The news reader Gnus." --section="Emacs" | |
201 | /sbin/install-info /usr/info/forms.gz /usr/info/dir --entry="* Forms: (forms). Emacs package for editing data bases by filling in forms." --section="Emacs" | |
202 | /sbin/install-info /usr/info/viper.gz /usr/info/dir --entry="* VIPER: (viper). The new VI-emulation mode in Emacs-19.29." --section="Emacs" | |
203 | /sbin/install-info /usr/info/vip.gz /usr/info/dir --entry="* VIP: (vip). A VI-emulation for Emacs." --section="Emacs" | |
204 | /sbin/install-info /usr/info/emacs.gz /usr/info/dir --entry="* Emacs: (emacs). The extensible self-documenting text editor." --section="Emacs" | |
205 | /sbin/install-info /usr/info/info.gz /usr/info/dir --entry="* Info: (info). Documentation browsing system." --section="Emacs" | |
206 | /sbin/install-info /usr/info/reftex.gz /usr/info/dir --entry="* RefTeX: (reftex). Manage labels, references, and citations with Emacs." --section="Emacs" | |
207 | /sbin/install-info /usr/info/widget.gz /usr/info/dir --entry="* Widget: (widget). Emacs widget library." --section="Emacs" | |
208 | /sbin/install-info /usr/info/customize.gz /usr/info/dir --entry="* Customize: (customize). Declaring customization items." --section="Emacs" | |
209 | ||
210 | %preun | |
211 | if [ "$1" = 0 ]; then | |
212 | /sbin/install-info --delete /usr/info/ccmode.gz /usr/info/dir --entry="* CC mode: (ccmode). The GNU Emacs mode for editing C, C++, Objective-C and Java code." --section="Emacs" | |
213 | /sbin/install-info --delete /usr/info/ediff.gz /usr/info/dir --entry="* Ediff: (ediff). A comprehensive visual interface to diff & patch." --section="Emacs" | |
214 | /sbin/install-info --delete /usr/info/dired-x.gz /usr/info/dir --entry="* Dired-X: (dired-x). Dired Extra Features." --section="Emacs" | |
215 | /sbin/install-info --delete /usr/info/sc.gz /usr/info/dir --entry="* SC: (sc). Supercite lets you cite parts of messages you're replying to, in flexible ways." --section="Emacs" | |
216 | /sbin/install-info --delete /usr/info/cl.gz /usr/info/dir --entry="* CL: (cl). Partial Common Lisp support for Emacs Lisp." --section="Emacs" | |
217 | /sbin/install-info --delete /usr/info/mh-e.gz /usr/info/dir --entry="* MH-E: (mh-e). Emacs interface to the MH mail system." --section="Emacs" | |
218 | /sbin/install-info --delete /usr/info/message.gz /usr/info/dir --entry="* Message: (message). Mail and news composition mode that goes with Gnus." --section="Emacs" | |
219 | /sbin/install-info --delete /usr/info/gnus.gz /usr/info/dir --entry="* Gnus: (gnus). The news reader Gnus." --section="Emacs" | |
220 | /sbin/install-info --delete /usr/info/forms.gz /usr/info/dir --entry="* Forms: (forms). Emacs package for editing data bases by filling in forms." --section="Emacs" | |
221 | /sbin/install-info --delete /usr/info/viper.gz /usr/info/dir --entry="* VIPER: (viper). The new VI-emulation mode in Emacs-19.29." --section="Emacs" | |
222 | /sbin/install-info --delete /usr/info/vip.gz /usr/info/dir --entry="* VIP: (vip). A VI-emulation for Emacs." --section="Emacs" | |
223 | /sbin/install-info --delete /usr/info/emacs.gz /usr/info/dir --entry="* Emacs: (emacs). The extensible self-documenting text editor." --section="Emacs" | |
224 | /sbin/install-info --delete /usr/info/info.gz /usr/info/dir --entry="* Info: (info). Documentation browsing system." --section="Emacs" | |
225 | /sbin/install-info /usr/info/reftex.gz /usr/info/dir --entry="* RefTeX: (reftex). Manage labels, references, and citations with Emacs." --section="Emacs" | |
226 | /sbin/install-info --delete /usr/info/widget.gz /usr/info/dir --entry="* Widget: (widget). Emacs widget library." --section="Emacs" | |
227 | /sbin/install-info --delete /usr/info/customize.gz /usr/info/dir --entry="* Customize: (customize). Declaring customization items." --section="Emacs" | |
228 | fi | |
229 | ||
230 | %files -f elc-filelist | |
231 | %defattr(-,root,root) | |
232 | %doc etc/NEWS BUGS README etc/FAQ | |
233 | /usr/bin/b2m | |
234 | /usr/bin/emacsclient | |
235 | /usr/bin/etags | |
236 | /usr/bin/gctags | |
237 | /usr/bin/rcs-checkin | |
238 | /usr/man/*/* | |
239 | /usr/info/* | |
240 | #%dir /var/lock/emacs | |
241 | ||
242 | %dir /usr/lib/emacs | |
243 | %attr(2755,root,mail) /usr/lib/emacs/%{PACKAGE_VERSION}/%{_target_cpu}-redhat-linux/movemail | |
244 | %dir /usr/lib/emacs/site-lisp | |
245 | ||
246 | %dir /usr/share/emacs/site-lisp | |
247 | %dir /usr/share/emacs/%{PACKAGE_VERSION} | |
248 | %dir /usr/share/emacs/%{PACKAGE_VERSION}/site-lisp | |
249 | %dir /usr/share/emacs/%{PACKAGE_VERSION}/leim | |
250 | %dir /usr/share/emacs/%{PACKAGE_VERSION}/lisp | |
251 | %dir /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term | |
252 | /usr/share/emacs/%{PACKAGE_VERSION}/etc | |
253 | ||
254 | # handled by dynamically generated file lists | |
255 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/*.elc | |
256 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/*/*.elc | |
257 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/*.elc | |
258 | #/usr/share/emacs/20.2/lisp/mail/*.elc | |
259 | ||
260 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/README | |
261 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/AT386.el | |
262 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/bobcat.el | |
263 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/internal.el | |
264 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/keyswap.el | |
265 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/lk201.el | |
266 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt102.el | |
267 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt125.el | |
268 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt201.el | |
269 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt220.el | |
270 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt240.el | |
271 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt300.el | |
272 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt320.el | |
273 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt400.el | |
274 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/term/vt420.el | |
275 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/COPYING | |
276 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/forms-d2.dat | |
277 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/README | |
278 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/mail/blessmail.el | |
279 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/forms-d2.el | |
280 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/forms-pass.el | |
281 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/loaddefs.el | |
282 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/loadup.el | |
283 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/patcomp.el | |
284 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/paths.el | |
285 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/mail/sc.el | |
286 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/term-nasty.el | |
287 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/version.el | |
288 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/subdirs.el | |
289 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/international/latin-1.el | |
290 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/international/latin-2.el | |
291 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/international/latin-3.el | |
292 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/international/latin-4.el | |
293 | /usr/share/emacs/%{PACKAGE_VERSION}/lisp/international/latin-5.el | |
294 | ||
295 | %files -f el-filelist el | |
296 | %defattr(-,root,root) | |
297 | # handled by dynamically generated file lists | |
298 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/*.el | |
299 | #/usr/share/emacs/%{PACKAGE_VERSION}/lisp/*/*.el | |
300 | #/usr/share/emacs/%{PACKAGE_VERSION}/leim/*.el | |
301 | #/usr/share/emacs/%{PACKAGE_VERSION}/leim/*/*.el | |
302 | ||
303 | %files -f leim-filelist leim | |
304 | %defattr(-,root,root) | |
305 | /usr/share/emacs/%{PACKAGE_VERSION}/leim/leim-list.el | |
306 | # handled by dynamically generated file lists | |
307 | #/usr/share/emacs/%{PACKAGE_VERSION}/leim/*.elc | |
308 | #/usr/share/emacs/%{PACKAGE_VERSION}/leim/*/*.elc | |
309 | ||
310 | %files nox | |
311 | %defattr(-,root,root) | |
312 | /usr/bin/emacs-nox | |
313 | ||
314 | %files X11 | |
315 | %defattr(-,root,root) | |
316 | /usr/bin/emacs | |
317 | /usr/bin/emacs-%{version} | |
318 | %config(missingok) /etc/X11/wmconfig/emacs |