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

  ViewVC Help
Powered by ViewVC 1.1.30