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