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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 137802 - (hide annotations) (download)
Fri Sep 2 00:21:29 2011 UTC (12 years, 7 months ago) by tv
Original Path: cauldron/emacs/current/SPECS/emacs.spec
File size: 10831 byte(s)
make the somewhat huge el subpackage be noarch
1 ahmad 8289 %define _localstatedir /var/lib
2    
3     Summary: GNU Emacs text editor with X11 support
4    
5     Name: emacs
6     Version: 23.2
7 tv 137802 Release: %mkrel 4
8 ahmad 8289 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.0.94-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     # Fix Gtk menus not being updated
38     # From http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4122
39     Patch117: emacs-23.1.92-gtk-menus.patch
40    
41     BuildRoot: %_tmppath/%name-root
42     BuildRequires: libxaw-devel
43     BuildRequires: Xaw3d-devel
44     BuildRequires: x11-server-common
45     BuildRequires: libx11-devel
46     BuildRequires: gcc
47     BuildRequires: libjpeg-devel
48     BuildRequires: libpng-devel
49     BuildRequires: libtiff-devel
50     BuildRequires: ncurses-devel
51     BuildRequires: libungif-devel
52     BuildRequires: texinfo
53     BuildRequires: xpm-devel
54     BuildRequires: gtk+2-devel
55    
56     Requires(preun): update-alternatives
57     Requires(post): update-alternatives
58    
59     Requires: %{name}-common = %version
60     Provides: emacs = %{version}-%{release}
61     Provides: emacs-bin emacs-gtk
62    
63     Conflicts: emacs-snapshot < %{version}-%{release}
64     Obsoletes: emacs-gtk <= 22.3
65     Obsoletes: emacs-X11 < 22.0.50
66     Provides: emacs-X11 < 22.0.50
67    
68     %description
69     Emacs is a powerful, customizable, self-documenting, modeless text
70     editor. Emacs contains special code editing features, a scripting
71     language (elisp), and the capability to read mail, news, and more
72     without leaving the editor.
73    
74     This package provides an emacs binary with support for X Windows.
75    
76     %package el
77     Summary: GNU Emacs Lisp source files
78     Group: Editors
79     Requires: %{name}-common = %version
80     Conflicts: emacs-snapshot-el
81 tv 137802 BuildArch: noarch
82 ahmad 8289
83     %description el
84     The emacs-snapshot-el package contains the emacs elisp sources for
85     many of the elisp programs included with the main Emacs text editor
86     package.
87    
88     You need to install this package only if you intend to modify any of
89     the Emacs packages or see some elisp examples.
90    
91     %package doc
92     Summary: GNU Emacs documentation
93     Group: Editors
94     Requires: %{name}-common = %version
95     Conflicts: emacs-snapshot-doc
96    
97     %description doc
98     Documentation for GNU Emacs.
99    
100     %package leim
101     Summary: GNU Emacs Lisp code for international input methods
102     Group: Editors
103     Requires: %{name}-common = %version
104     Conflicts: emacs-snapshot-leim
105    
106     %description leim
107     This package contains Emacs Lisp code for input methods for various
108     international character scripts.
109    
110     %package nox
111     Summary: GNU Emacs text editor without support for X11
112     Group: Editors
113     Requires: %{name}-common = %version
114     Provides: emacs-bin
115    
116     Conflicts: emacs-snapshot-nox
117    
118     Requires(preun): update-alternatives
119     Requires(post): update-alternatives
120    
121     %description nox
122     Emacs is a powerful, customizable, self-documenting, modeless text
123     editor. Emacs contains special code editing features, a scripting
124     language (elisp), and the capability to read mail, news, and more
125     without leaving the editor.
126    
127     This package provides an emacs binary with no X Windows support for
128     running on a terminal.
129    
130     %package common
131     Summary: Common files for GNU Emacs
132     Group: Editors
133    
134     Obsoletes: gnus-emacs < 5.13.0
135     Provides: gnus-emacs = 5.13.0
136    
137     Obsoletes: emacs-cedet < 1.0-0.pre7
138     Provides: emacs-cedet = 1.0-0.pre7
139    
140     Conflicts: emacs-speedbar < 1.0
141     Provides: emacs-speedbar = 1.0
142    
143     Obsoletes: emacs-tramp < 2.1.18-pre
144     Provides: emacs-tramp = 2.1.18-pre
145    
146     Obsoletes: emacs-url
147     Provides: emacs-url
148    
149     # (Lev) This doesn't look correct:
150     Obsoletes: emacs-pcomplete <= 2.4.2
151     Provides: emacs-pcomplete = 1.1.1
152    
153     Obsoletes: eshell-emacs <= 2.4.2
154     Provides: eshell-emacs = 2.4.2
155    
156     Obsoletes: emacs-easypg < 1.0.0
157     Provides: emacs-easypg = 1.0.0
158    
159     Obsoletes: emacs-erc < 5.3
160     Provides: emacs-erc = 5.3
161    
162     Conflicts: emacs-snapshot-common
163    
164     # conflicts due to %%_bindir/{b2m,etags,rcs-checkin}
165     Conflicts: xemacs-extras
166    
167     %description common
168     Emacs is a powerful, customizable, self-documenting, modeless text
169     editor. Emacs contains special code editing features, a scripting
170     language (elisp), and the capability to read mail, news, and more
171     without leaving the editor.
172    
173     This package contains all of the common files needed by emacs-snapshot
174     or emacs-snapshot-nox
175    
176     %prep
177    
178     %setup -q -n emacs-%{version}
179    
180     %__perl -p -i -e 's/ctags/gctags/g' etc/etags.1
181    
182     %patch1 -p1 -b .loadup
183     %patch3 -p1 -b .ia64-2
184     %patch5 -p1 -b .bzip2
185     %patch6 -p1
186     %patch7 -p1 -b .rpath
187     %patch9 -p1 -b .sendmail-program
188    
189     %ifarch ppc
190     %patch20 -p1
191     %patch21 -p1
192     %patch22 -p1
193     %endif
194    
195     %patch100 -p1
196     %patch101 -p1 -b .version
197     %patch103 -p1 -b .x86_64
198     %patch104 -p1 -b .toolbar
199     %patch111 -p1
200     %patch114 -p1 -b .ppc
201     %patch115 -p1 -z .lzma-support
202     %patch116 -p0 -b .str
203     %patch117 -p0 -b .gtkmenus
204    
205     %build
206     autoreconf -fi
207    
208     PUREDEF="-DNCURSES_OSPEED_T"
209     XPUREDEF="-DNCURSES_OSPEED_T"
210    
211     export CFLAGS="$RPM_OPT_FLAGS $PUREDEF -fno-zero-initialized-in-bss"
212    
213     %configure2_5x --with-x=no
214     %make bootstrap
215    
216     %make distclean
217     # Build binary without X support
218     %configure2_5x --with-x=no
219     %make
220     mv src/emacs src/nox-emacs
221    
222     %make distclean
223     # Build binary with X support
224     %configure2_5x --with-x-toolkit
225     %make
226    
227     %install
228     rm -rf %{buildroot}
229     mkdir -p %{buildroot}/usr
230    
231     PATH=$PATH:/sbin
232     ARCHDIR=%{_target_platform}
233     %old_makeinstall sharedstatedir=%{buildroot}/var
234    
235     rm -f %{buildroot}%_bindir/emacs
236     rm -f %{buildroot}%{_infodir}/dir
237     rm %{buildroot}%{_libdir}/emacs/%version/%{_target_platform}/fakemail
238    
239     # remove sun specific stuff
240     rm -f %{buildroot}%{_datadir}/emacs/%{version}/etc/{emacstool.1,emacs.1,ctags.1,etags.1,sex.6}
241    
242     # rename ctags to gctags
243     mv %{buildroot}%{_mandir}/man1/ctags.1 %{buildroot}%{_mandir}/man1/gctags.1
244     mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
245    
246     # is that needed?
247     install -d %{buildroot}%{_libdir}/emacs/site-lisp
248    
249     mkdir -p %{buildroot}%{_sysconfdir}/emacs
250     install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
251     (cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)
252    
253     install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
254    
255    
256     install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
257     chmod -t %{buildroot}%{_bindir}/emacs*
258    
259     # create file lists
260    
261     #
262     # emacs-doc file list
263     #
264     # 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
265     # NB: etc/ps-prin{0,1}.ps are needed by ps-print
266     find %{buildroot}%{_datadir}/emacs/%version/etc/ -type f | \
267     egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
268     sed "s^%{buildroot}^^" > doc-filelist
269    
270     #
271     # emacs-el file list
272     #
273    
274     # take every .el and .el.gz which have a corresponding .elc
275     find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
276     grep -v /leim/ | while read I; do
277     f=`basename $I .gz`
278     f=`basename $f .el`
279     if [ -e `dirname $I`/$f.elc ]; then
280     echo $I | sed "s^%{buildroot}^^"
281     fi
282     done > el-filelist
283    
284     #
285     # emacs-common file list
286     #
287    
288     # everything not in previous filelists, and remove a few things listed in %files
289     find %{buildroot}%{_datadir}/emacs/%version -type f -print -o -type d -printf "%%%%dir %%p\n" | \
290     grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
291     while read I; do
292     grep -qxF $I doc-filelist el-filelist || echo $I
293     done < common-filelist.raw > common-filelist
294    
295     find %{buildroot}%{_libdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
296     egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist
297    
298    
299     %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
300     have_info_files=$(echo $(ls %{buildroot}%{_infodir} | egrep -v -- '-[0-9]+$' | sort))
301    
302     [ "$have_info_files" = "%info_files" ] || {
303     echo "you must modify the spec file, %%info_files should be: $have_info_files"
304     exit 1
305     }
306    
307    
308     %clean
309     rm -rf %{buildroot}
310    
311     %post common
312     # --section="GNU Emacs"
313     for f in %info_files; do %_install_info $f
314     done
315     :
316    
317     %preun
318     for f in %info_files; do %_remove_install_info $f
319     done
320     :
321    
322     %post nox
323     update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-nox 10
324    
325     [[ ! -f %_bindir/emacs ]] && update-alternatives --auto emacs
326     :
327    
328     %postun nox
329     [[ ! -f %_bindir/emacs-nox ]] && \
330     /usr/sbin/update-alternatives --remove emacs %_bindir/emacs-nox
331     :
332    
333     %post
334     /usr/sbin/update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-%version 21
335    
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