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

  ViewVC Help
Powered by ViewVC 1.1.30