/[packages]/updates/5/emacs/current/SPECS/emacs.spec
ViewVC logotype

Contents of /updates/5/emacs/current/SPECS/emacs.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 202643 - (show annotations) (download)
Sat Jan 28 15:16:09 2012 UTC (12 years, 2 months ago) by malo
Original Path: cauldron/emacs/current/SPECS/emacs.spec
File size: 10847 byte(s)
bump rel

1 %define _localstatedir /var/lib
2
3 Summary: GNU Emacs text editor with X11 support
4
5 Name: emacs
6 Version: 23.3
7 Release: %mkrel 5
8 License: GPLv3+
9 Group: Editors
10 URL: http://www.gnu.org/software/emacs/
11
12 Source0: ftp://ftp.gnu.org/pub/gnu/emacs/emacs-%{version}.tar.bz2
13 Source2: gnu-mini.png
14 Source3: gnu-normal.png
15 Source4: gnu-large.png
16 Source5: emacs-config
17
18 Patch1: emacs-20.5-loadup.patch
19 Patch3: emacs-23.0.94-ia64-1.patch
20 Patch5: emacs-23.0.94-bzip2.patch
21 Patch6: emacs-snapshot-same-etc-DOC-for-all.patch
22 Patch7: emacs-22.0.90-rpath.patch
23 Patch9: emacs-22.0.90-force-sendmail-program.patch
24
25 Patch20: emacs-20.4-ppc-config.patch
26 Patch21: emacs-20.4-ppc.patch
27 Patch22: emacs-21.1-omit-nocombreloc-ppc.patch
28
29 Patch100: emacs-23.3-infofix.patch
30 Patch101: emacs-23.1.92-version.patch
31 Patch103: emacs-23.0.94-x86_64.patch
32 Patch104: emacs-23.2-hide-toolbar.patch
33 Patch111: emacs-23.1.92-ispell-dictionaries-list-iso-8859-15.patch
34 Patch114: emacs-23.0.94-ppc64.patch
35 Patch115: emacs-23.0.94-lzma-support.patch
36 Patch116: emacs-22.3-fix-str-fmt.patch
37 # (blino) fix infinite loop in text mode select() when built with gtk support
38 # this has been exposed by glib >= 2.31 (emacs #9754, mga #3259)
39 Patch117: emacs-23.3-xgselect_init.patch
40
41 BuildRequires: libxaw-devel
42 BuildRequires: Xaw3d-devel
43 BuildRequires: x11-server-common
44 BuildRequires: libx11-devel
45 BuildRequires: gcc
46 BuildRequires: libjpeg-devel
47 BuildRequires: libpng-devel
48 BuildRequires: libtiff-devel
49 BuildRequires: ncurses-devel
50 BuildRequires: libungif-devel
51 BuildRequires: texinfo
52 BuildRequires: xpm-devel
53 BuildRequires: gtk+2-devel
54
55 Requires(preun): update-alternatives
56 Requires(post): update-alternatives
57
58 Requires: %{name}-common = %version
59 Provides: emacs = %{version}-%{release}
60 Provides: emacs-bin emacs-gtk
61
62 Conflicts: emacs-snapshot < %{version}-%{release}
63 Obsoletes: emacs-gtk <= 22.3
64 Obsoletes: emacs-X11 < 22.0.50
65 Provides: emacs-X11 < 22.0.50
66
67 %description
68 Emacs is a powerful, customizable, self-documenting, modeless text
69 editor. Emacs contains special code editing features, a scripting
70 language (elisp), and the capability to read mail, news, and more
71 without leaving the editor.
72
73 This package provides an emacs binary with support for X Windows.
74
75 %package el
76 Summary: GNU Emacs Lisp source files
77 Group: Editors
78 Requires: %{name}-common = %version
79 Conflicts: emacs-snapshot-el
80 BuildArch: noarch
81
82 %description el
83 The emacs-snapshot-el package contains the emacs elisp sources for
84 many of the elisp programs included with the main Emacs text editor
85 package.
86
87 You need to install this package only if you intend to modify any of
88 the Emacs packages or see some elisp examples.
89
90 %package doc
91 Summary: GNU Emacs documentation
92 Group: Editors
93 Requires: %{name}-common = %version
94 Conflicts: emacs-snapshot-doc
95
96 %description doc
97 Documentation for GNU Emacs.
98
99 %package leim
100 Summary: GNU Emacs Lisp code for international input methods
101 Group: Editors
102 Requires: %{name}-common = %version
103 Conflicts: emacs-snapshot-leim
104
105 %description leim
106 This package contains Emacs Lisp code for input methods for various
107 international character scripts.
108
109 %package nox
110 Summary: GNU Emacs text editor without support for X11
111 Group: Editors
112 Requires: %{name}-common = %version
113 Provides: emacs-bin
114
115 Conflicts: emacs-snapshot-nox
116
117 Requires(preun): update-alternatives
118 Requires(post): update-alternatives
119
120 %description nox
121 Emacs is a powerful, customizable, self-documenting, modeless text
122 editor. Emacs contains special code editing features, a scripting
123 language (elisp), and the capability to read mail, news, and more
124 without leaving the editor.
125
126 This package provides an emacs binary with no X Windows support for
127 running on a terminal.
128
129 %package common
130 Summary: Common files for GNU Emacs
131 Group: Editors
132
133 Obsoletes: gnus-emacs < 5.13.0
134 Provides: gnus-emacs = 5.13.0
135
136 Obsoletes: emacs-cedet < 1.0-0.pre7
137 Provides: emacs-cedet = 1.0-0.pre7
138
139 Conflicts: emacs-speedbar < 1.0
140 Provides: emacs-speedbar = 1.0
141
142 Obsoletes: emacs-tramp < 2.1.18-pre
143 Provides: emacs-tramp = 2.1.18-pre
144
145 Obsoletes: emacs-url
146 Provides: emacs-url
147
148 # (Lev) This doesn't look correct:
149 Obsoletes: emacs-pcomplete <= 2.4.2
150 Provides: emacs-pcomplete = 1.1.1
151
152 Obsoletes: eshell-emacs <= 2.4.2
153 Provides: eshell-emacs = 2.4.2
154
155 Obsoletes: emacs-easypg < 1.0.0
156 Provides: emacs-easypg = 1.0.0
157
158 Obsoletes: emacs-erc < 5.3
159 Provides: emacs-erc = 5.3
160
161 Conflicts: emacs-snapshot-common
162
163 # conflicts due to %%_bindir/{b2m,etags,rcs-checkin}
164 Conflicts: xemacs-extras
165
166 %description common
167 Emacs is a powerful, customizable, self-documenting, modeless text
168 editor. Emacs contains special code editing features, a scripting
169 language (elisp), and the capability to read mail, news, and more
170 without leaving the editor.
171
172 This package contains all of the common files needed by emacs-snapshot
173 or emacs-snapshot-nox
174
175 %prep
176
177 %setup -q -n emacs-%{version}
178
179 %__perl -p -i -e 's/ctags/gctags/g' etc/etags.1
180
181 %patch1 -p1 -b .loadup
182 %patch3 -p1 -b .ia64-2
183 %patch5 -p1 -b .bzip2
184 %patch6 -p1
185 %patch7 -p1 -b .rpath
186 %patch9 -p1 -b .sendmail-program
187
188 %ifarch ppc
189 %patch20 -p1
190 %patch21 -p1
191 %patch22 -p1
192 %endif
193
194 %patch100 -p1
195 %patch101 -p1 -b .version
196 %patch103 -p1 -b .x86_64
197 %patch104 -p1 -b .toolbar
198 %patch111 -p1
199 %patch114 -p1 -b .ppc
200 %patch115 -p1 -z .lzma-support
201 %patch116 -p0 -b .str
202 %patch117 -p1 -b .xgselect_init
203
204 %build
205 autoreconf -fi
206
207 PUREDEF="-DNCURSES_OSPEED_T"
208 XPUREDEF="-DNCURSES_OSPEED_T"
209
210 export CFLAGS="$RPM_OPT_FLAGS $PUREDEF -fno-zero-initialized-in-bss"
211
212 %configure2_5x --with-x=no
213 %make bootstrap
214
215 %make distclean
216 # Build binary without X support
217 %configure2_5x --with-x=no
218 %make
219 mv src/emacs src/nox-emacs
220
221 %make distclean
222 # Build binary with X support
223 %configure2_5x --with-x-toolkit
224 %make
225
226 %install
227 rm -rf %{buildroot}
228 mkdir -p %{buildroot}/usr
229
230 PATH=$PATH:/sbin
231 ARCHDIR=%{_target_platform}
232 %old_makeinstall sharedstatedir=%{buildroot}/var
233
234 rm -f %{buildroot}%_bindir/emacs
235 rm -f %{buildroot}%{_infodir}/dir
236 rm %{buildroot}%{_libdir}/emacs/%version/%{_target_platform}/fakemail
237
238 # remove sun specific stuff
239 rm -f %{buildroot}%{_datadir}/emacs/%{version}/etc/{emacstool.1,emacs.1,ctags.1,etags.1,sex.6}
240
241 # rename ctags to gctags
242 mv %{buildroot}%{_mandir}/man1/ctags.1 %{buildroot}%{_mandir}/man1/gctags.1
243 mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
244
245 # is that needed?
246 install -d %{buildroot}%{_libdir}/emacs/site-lisp
247
248 mkdir -p %{buildroot}%{_sysconfdir}/emacs
249 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
250 (cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)
251
252 install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
253
254
255 install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
256 chmod -t %{buildroot}%{_bindir}/emacs*
257
258 # create file lists
259
260 #
261 # emacs-doc file list
262 #
263 # 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
264 # NB: etc/ps-prin{0,1}.ps are needed by ps-print
265 find %{buildroot}%{_datadir}/emacs/%version/etc/ -type f | \
266 egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
267 sed "s^%{buildroot}^^" > doc-filelist
268
269 #
270 # emacs-el file list
271 #
272
273 # take every .el and .el.gz which have a corresponding .elc
274 find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
275 grep -v /leim/ | while read I; do
276 f=`basename $I .gz`
277 f=`basename $f .el`
278 if [ -e `dirname $I`/$f.elc ]; then
279 echo $I | sed "s^%{buildroot}^^"
280 fi
281 done > el-filelist
282
283 #
284 # emacs-common file list
285 #
286
287 # everything not in previous filelists, and remove a few things listed in %files
288 find %{buildroot}%{_datadir}/emacs/%version -type f -print -o -type d -printf "%%%%dir %%p\n" | \
289 grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
290 while read I; do
291 grep -qxF $I doc-filelist el-filelist || echo $I
292 done < common-filelist.raw > common-filelist
293
294 find %{buildroot}%{_libdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
295 egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist
296
297
298 %define info_files ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc eshell eudc flymake forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail speedbar tramp url vip viper widget woman
299 have_info_files=$(echo $(ls %{buildroot}%{_infodir} | egrep -v -- '-[0-9]+$' | sort))
300
301 [ "$have_info_files" = "%info_files" ] || {
302 echo "you must modify the spec file, %%info_files should be: $have_info_files"
303 exit 1
304 }
305
306
307 %clean
308 rm -rf %{buildroot}
309
310 %post common
311 # --section="GNU Emacs"
312 for f in %info_files; do %_install_info $f
313 done
314 :
315
316 %preun
317 for f in %info_files; do %_remove_install_info $f
318 done
319 :
320
321 %post nox
322 update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-nox 10
323
324 [[ ! -f %_bindir/emacs ]] && update-alternatives --auto emacs
325 :
326
327 %postun nox
328 [[ ! -f %_bindir/emacs-nox ]] && \
329 /usr/sbin/update-alternatives --remove emacs %_bindir/emacs-nox
330 :
331
332 %post
333 /usr/sbin/update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-%version 21
334
335 %postun
336 [[ ! -f %{_bindir}/emacs-%{version} ]] && \
337 /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| :
338
339 %files -f common-filelist common
340 %defattr(-,root,root)
341 %doc BUGS README src/COPYING
342 %{_localstatedir}/games/emacs
343 %dir %{_sysconfdir}/emacs/site-start.d
344 %dir %{_sysconfdir}/emacs
345 %config(noreplace) %{_sysconfdir}/emacs/site-start.el
346 %dir %{_datadir}/emacs
347 %dir %{_datadir}/emacs/site-lisp
348 %{_datadir}/emacs/%version/lisp/site-start.el
349 %attr(2755,root,mail) %{_libdir}/emacs/%version/%{_target_platform}/movemail
350 %attr(4755,games,root) %{_libdir}/emacs/%version/%{_target_platform}/update-game-score
351 %{_bindir}/b2m
352 %{_bindir}/emacsclient
353 %{_bindir}/etags
354 %{_bindir}/ebrowse
355 %{_bindir}/grep-changelog
356 %{_bindir}/gctags
357 %{_bindir}/rcs-checkin
358 %{_mandir}/*/*
359 %{_infodir}/*
360
361 %files -f doc-filelist doc
362 %defattr(-,root,root)
363
364 %files -f el-filelist el
365 %defattr(-,root,root)
366 %doc src/COPYING
367 %{_datadir}/emacs/%{version}/site-lisp/subdirs.el
368 %{_datadir}/emacs/site-lisp/subdirs.el
369 %{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz
370 %{_datadir}/emacs/%{version}/leim/quail/*.el.gz
371
372 %files leim
373 %defattr(-,root,root)
374 %doc src/COPYING
375 %{_datadir}/emacs/%{version}/leim/leim-list.el
376 %dir %{_datadir}/emacs/%{version}/leim/ja-dic
377 %{_datadir}/emacs/%{version}/leim/ja-dic/*.elc
378 %dir %{_datadir}/emacs/%{version}/leim/quail
379 %{_datadir}/emacs/%{version}/leim/quail/*.elc
380
381 %files nox
382 %defattr(-,root,root)
383 %doc src/COPYING
384 %{_bindir}/emacs-nox
385
386 %files
387 %defattr(-,root,root)
388 %doc src/COPYING
389 %{_bindir}/emacs-%{version}
390 %{_datadir}/applications/emacs.desktop
391 %{_iconsdir}/hicolor/*/apps/emacs*.png
392 %{_iconsdir}/hicolor/scalable/apps/emacs.svg
393 %{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg
394
395

  ViewVC Help
Powered by ViewVC 1.1.30