/[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 349596 - (hide annotations) (download)
Fri Jan 11 19:10:12 2013 UTC (11 years, 3 months ago) by umeabot
Original Path: cauldron/emacs/current/SPECS/emacs.spec
File size: 10049 byte(s)
Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild
1 ahmad 8289 %define _localstatedir /var/lib
2    
3     Summary: GNU Emacs text editor with X11 support
4    
5     Name: emacs
6 luigiwalser 303174 Version: 24.2
7 umeabot 349596 Release: %mkrel 5
8 ahmad 8289 License: GPLv3+
9     Group: Editors
10     URL: http://www.gnu.org/software/emacs/
11    
12 luigiwalser 303174 Source0: ftp://ftp.gnu.org/pub/gnu/emacs/emacs-%{version}.tar.xz
13 ahmad 8289 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 luigiwalser 303174 Patch7: emacs-24.2-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 luigiwalser 303174 Patch111: emacs-24.2-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 luigiwalser 303174 BuildRequires: ungif-devel
34 ahmad 8289 BuildRequires: texinfo
35     BuildRequires: xpm-devel
36 blino 259558 BuildRequires: gtk+3-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 luigiwalser 303174 Requires: %{name}-common = %{version}
45 ahmad 8289 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 luigiwalser 303174 %package el
62 ahmad 8289 Summary: GNU Emacs Lisp source files
63     Group: Editors
64 luigiwalser 303174 Requires: %{name}-common = %{version}
65 ahmad 8289 Conflicts: emacs-snapshot-el
66 tv 137802 BuildArch: noarch
67 ahmad 8289
68 luigiwalser 303174 %description el
69 ahmad 8289 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 luigiwalser 303174 %package doc
77 ahmad 8289 Summary: GNU Emacs documentation
78     Group: Editors
79 luigiwalser 303174 Requires: %{name}-common = %{version}
80 fwang 305159 BuildArch: noarch
81 ahmad 8289 Conflicts: emacs-snapshot-doc
82    
83 luigiwalser 303174 %description doc
84 ahmad 8289 Documentation for GNU Emacs.
85    
86 luigiwalser 303174 %package leim
87 ahmad 8289 Summary: GNU Emacs Lisp code for international input methods
88     Group: Editors
89 fwang 305159 BuildArch: noarch
90 luigiwalser 303174 Requires: %{name}-common = %{version}
91 ahmad 8289 Conflicts: emacs-snapshot-leim
92    
93 luigiwalser 303174 %description leim
94 ahmad 8289 This package contains Emacs Lisp code for input methods for various
95     international character scripts.
96    
97 luigiwalser 303174 %package nox
98 ahmad 8289 Summary: GNU Emacs text editor without support for X11
99     Group: Editors
100 luigiwalser 303174 Requires: %{name}-common = %{version}
101 ahmad 8289 Provides: emacs-bin
102    
103     Conflicts: emacs-snapshot-nox
104    
105     Requires(preun): update-alternatives
106     Requires(post): update-alternatives
107    
108 luigiwalser 303174 %description nox
109 ahmad 8289 Emacs is a powerful, customizable, self-documenting, modeless text
110     editor. Emacs contains special code editing features, a scripting
111     language (elisp), and the capability to read mail, news, and more
112     without leaving the editor.
113    
114     This package provides an emacs binary with no X Windows support for
115     running on a terminal.
116    
117 luigiwalser 303174 %package common
118 ahmad 8289 Summary: Common files for GNU Emacs
119     Group: Editors
120    
121     Obsoletes: gnus-emacs < 5.13.0
122     Provides: gnus-emacs = 5.13.0
123    
124     Obsoletes: emacs-cedet < 1.0-0.pre7
125     Provides: emacs-cedet = 1.0-0.pre7
126    
127     Conflicts: emacs-speedbar < 1.0
128     Provides: emacs-speedbar = 1.0
129    
130     Obsoletes: emacs-tramp < 2.1.18-pre
131     Provides: emacs-tramp = 2.1.18-pre
132    
133     Obsoletes: emacs-url
134     Provides: emacs-url
135    
136     # (Lev) This doesn't look correct:
137     Obsoletes: emacs-pcomplete <= 2.4.2
138     Provides: emacs-pcomplete = 1.1.1
139    
140     Obsoletes: eshell-emacs <= 2.4.2
141     Provides: eshell-emacs = 2.4.2
142    
143     Obsoletes: emacs-easypg < 1.0.0
144     Provides: emacs-easypg = 1.0.0
145    
146     Obsoletes: emacs-erc < 5.3
147     Provides: emacs-erc = 5.3
148    
149     Conflicts: emacs-snapshot-common
150    
151 blino 259557 # conflicts due to %%_bindir/{etags,rcs-checkin}
152 ahmad 8289 Conflicts: xemacs-extras
153    
154 luigiwalser 303174 %description common
155 ahmad 8289 Emacs is a powerful, customizable, self-documenting, modeless text
156     editor. Emacs contains special code editing features, a scripting
157     language (elisp), and the capability to read mail, news, and more
158     without leaving the editor.
159    
160     This package contains all of the common files needed by emacs-snapshot
161     or emacs-snapshot-nox
162    
163     %prep
164 luigiwalser 303174 %setup -q
165 ahmad 8289
166     %__perl -p -i -e 's/ctags/gctags/g' etc/etags.1
167    
168     %patch1 -p1 -b .loadup
169     %patch6 -p1
170     %patch7 -p1 -b .rpath
171    
172     %patch100 -p1
173     %patch101 -p1 -b .version
174     %patch111 -p1
175    
176     %build
177 blino 259499 autoreconf -fi -I m4
178 ahmad 8289
179     PUREDEF="-DNCURSES_OSPEED_T"
180     XPUREDEF="-DNCURSES_OSPEED_T"
181    
182     export CFLAGS="$RPM_OPT_FLAGS $PUREDEF -fno-zero-initialized-in-bss"
183    
184     %configure2_5x --with-x=no
185     %make bootstrap
186    
187 blino 259497 %make distclean
188     # Build binary without X support
189     %configure2_5x --with-x=no
190     %make
191     mv src/emacs src/nox-emacs
192 ahmad 8289
193     %make distclean
194     # Build binary with X support
195 blino 259558 %configure2_5x --with-x-toolkit=gtk3
196 ahmad 8289 %make
197    
198     %install
199     mkdir -p %{buildroot}/usr
200    
201     PATH=$PATH:/sbin
202     ARCHDIR=%{_target_platform}
203     %old_makeinstall sharedstatedir=%{buildroot}/var
204    
205 luigiwalser 303174 rm -f %{buildroot}%{_bindir}/emacs
206 ahmad 8289 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     mkdir -p %{buildroot}%{_sysconfdir}/emacs
216     install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
217     (cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)
218    
219     install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
220    
221    
222     install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
223     chmod -t %{buildroot}%{_bindir}/emacs*
224    
225     # create file lists
226    
227     #
228     # emacs-doc file list
229     #
230     # 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
231     # NB: etc/ps-prin{0,1}.ps are needed by ps-print
232 luigiwalser 303174 find %{buildroot}%{_datadir}/emacs/%{version}/etc/ -type f | \
233 ahmad 8289 egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
234     sed "s^%{buildroot}^^" > doc-filelist
235    
236     #
237     # emacs-el file list
238     #
239    
240     # take every .el and .el.gz which have a corresponding .elc
241     find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
242     grep -v /leim/ | while read I; do
243     f=`basename $I .gz`
244     f=`basename $f .el`
245     if [ -e `dirname $I`/$f.elc ]; then
246     echo $I | sed "s^%{buildroot}^^"
247     fi
248     done > el-filelist
249    
250     #
251     # emacs-common file list
252     #
253    
254     # everything not in previous filelists, and remove a few things listed in %files
255 luigiwalser 303174 find %{buildroot}%{_datadir}/emacs/%{version} -type f -print -o -type d -printf "%%%%dir %%p\n" | \
256 ahmad 8289 grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
257     while read I; do
258     grep -qxF $I doc-filelist el-filelist || echo $I
259     done < common-filelist.raw > common-filelist
260    
261 luigiwalser 340533 find %{buildroot}%{_libexecdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
262 ahmad 8289 egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist
263    
264    
265 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
266 blino 259555 have_info_files=$(echo $(ls %{buildroot}%{_infodir} | egrep -v -- '-[0-9]+$' | sed -e 's/\.gz$//' | sort))
267 ahmad 8289
268     [ "$have_info_files" = "%info_files" ] || {
269     echo "you must modify the spec file, %%info_files should be: $have_info_files"
270     exit 1
271     }
272    
273    
274     %post common
275     # --section="GNU Emacs"
276 luigiwalser 303174 for f in %{info_files}; do %_install_info $f
277 ahmad 8289 done
278     :
279    
280     %preun
281 luigiwalser 303174 for f in %{info_files}; do %_remove_install_info $f
282 ahmad 8289 done
283     :
284    
285     %post nox
286 luigiwalser 303174 update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nox 10
287 ahmad 8289
288 luigiwalser 303174 [[ ! -f %{_bindir}/emacs ]] && update-alternatives --auto emacs
289 ahmad 8289 :
290    
291     %postun nox
292 luigiwalser 303174 [[ ! -f %{_bindir}/emacs-nox ]] && \
293     /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-nox
294 ahmad 8289 :
295    
296     %post
297 luigiwalser 303174 /usr/sbin/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 21
298 ahmad 8289
299 malo 202633 %postun
300 ahmad 8289 [[ ! -f %{_bindir}/emacs-%{version} ]] && \
301     /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| :
302    
303     %files -f common-filelist common
304     %doc BUGS README src/COPYING
305     %{_localstatedir}/games/emacs
306     %dir %{_sysconfdir}/emacs/site-start.d
307     %dir %{_sysconfdir}/emacs
308     %config(noreplace) %{_sysconfdir}/emacs/site-start.el
309     %dir %{_datadir}/emacs
310     %dir %{_datadir}/emacs/site-lisp
311 luigiwalser 303174 %{_datadir}/emacs/%{version}/lisp/site-start.el
312 luigiwalser 340533 %attr(2755,root,mail) %{_libexecdir}/emacs/%{version}/%{_target_platform}/movemail
313     %attr(4755,games,root) %{_libexecdir}/emacs/%{version}/%{_target_platform}/update-game-score
314 ahmad 8289 %{_bindir}/emacsclient
315     %{_bindir}/etags
316     %{_bindir}/ebrowse
317     %{_bindir}/grep-changelog
318     %{_bindir}/gctags
319     %{_bindir}/rcs-checkin
320     %{_mandir}/*/*
321     %{_infodir}/*
322    
323     %files -f doc-filelist doc
324    
325     %files -f el-filelist el
326     %doc src/COPYING
327     %{_datadir}/emacs/%{version}/site-lisp/subdirs.el
328     %{_datadir}/emacs/site-lisp/subdirs.el
329     %{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz
330     %{_datadir}/emacs/%{version}/leim/quail/*.el.gz
331    
332     %files leim
333     %doc src/COPYING
334     %{_datadir}/emacs/%{version}/leim/leim-list.el
335     %dir %{_datadir}/emacs/%{version}/leim/ja-dic
336     %{_datadir}/emacs/%{version}/leim/ja-dic/*.elc
337     %dir %{_datadir}/emacs/%{version}/leim/quail
338     %{_datadir}/emacs/%{version}/leim/quail/*.elc
339    
340     %files nox
341     %doc src/COPYING
342     %{_bindir}/emacs-nox
343    
344     %files
345     %doc src/COPYING
346     %{_bindir}/emacs-%{version}
347     %{_datadir}/applications/emacs.desktop
348     %{_iconsdir}/hicolor/*/apps/emacs*.png
349     %{_iconsdir}/hicolor/scalable/apps/emacs.svg
350     %{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg

  ViewVC Help
Powered by ViewVC 1.1.30