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

  ViewVC Help
Powered by ViewVC 1.1.30