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

  ViewVC Help
Powered by ViewVC 1.1.30