/[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 1186819 - (hide annotations) (download)
Thu Dec 28 21:39:43 2017 UTC (6 years, 3 months ago) by luigiwalser
File size: 10477 byte(s)
add patch from debian to fix CVE-2017-14482
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 luigiwalser 1186819 %define subrel 1
8 eatdirt 799369 Release: %mkrel 10
9 ahmad 8289 License: GPLv3+
10     Group: Editors
11     URL: http://www.gnu.org/software/emacs/
12    
13 luigiwalser 303174 Source0: ftp://ftp.gnu.org/pub/gnu/emacs/emacs-%{version}.tar.xz
14 ahmad 8289 Source2: gnu-mini.png
15     Source3: gnu-normal.png
16     Source4: gnu-large.png
17     Source5: emacs-config
18    
19     Patch1: emacs-20.5-loadup.patch
20     Patch6: emacs-snapshot-same-etc-DOC-for-all.patch
21    
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 eatdirt 799369 # update dictionary names for hunspell (from fedora)
26     Patch112: emacs-24.3-hunspell-names.patch
27 ahmad 8289
28 luigiwalser 628025 Patch150: emacs-24.3-CVE-2014-3421.patch
29     Patch151: emacs-24.3-CVE-2014-3422.patch
30     Patch152: emacs-24.3-CVE-2014-3423.patch
31     Patch153: emacs-24.3-CVE-2014-3424.patch
32 luigiwalser 1186819 Patch154: emacs-24.4-CVE-2017-14482.patch
33 luigiwalser 628025
34 ahmad 8289 BuildRequires: x11-server-common
35     BuildRequires: libx11-devel
36     BuildRequires: gcc
37     BuildRequires: libjpeg-devel
38     BuildRequires: libpng-devel
39     BuildRequires: libtiff-devel
40     BuildRequires: ncurses-devel
41 luigiwalser 303174 BuildRequires: ungif-devel
42 ahmad 8289 BuildRequires: texinfo
43     BuildRequires: xpm-devel
44 blino 259558 BuildRequires: gtk+3-devel
45 blino 259506 BuildRequires: imagemagick-devel
46 blino 259501 BuildRequires: gnutls-devel
47 blino 259500 BuildRequires: libxml2-devel
48 doktor5000 736407 BuildRequires: pkgconfig(librsvg-2.0)
49     BuildRequires: pkgconfig(libotf)
50     BuildRequires: pkgconfig(m17n-flt)
51     BuildRequires: gpm-devel
52 ahmad 8289
53     Requires(preun): update-alternatives
54     Requires(post): update-alternatives
55    
56 luigiwalser 303174 Requires: %{name}-common = %{version}
57 ahmad 8289 Provides: emacs = %{version}-%{release}
58     Provides: emacs-bin emacs-gtk
59    
60     Conflicts: emacs-snapshot < %{version}-%{release}
61     Obsoletes: emacs-gtk <= 22.3
62     Obsoletes: emacs-X11 < 22.0.50
63     Provides: emacs-X11 < 22.0.50
64    
65 eatdirt 799355 Recommends: hunspell
66    
67 ahmad 8289 %description
68     Emacs is a powerful, customizable, self-documenting, modeless text
69     editor. Emacs contains special code editing features, a scripting
70     language (elisp), and the capability to read mail, news, and more
71     without leaving the editor.
72    
73     This package provides an emacs binary with support for X Windows.
74    
75 luigiwalser 303174 %package el
76 ahmad 8289 Summary: GNU Emacs Lisp source files
77     Group: Editors
78 luigiwalser 303174 Requires: %{name}-common = %{version}
79 ahmad 8289 Conflicts: emacs-snapshot-el
80 tv 137802 BuildArch: noarch
81 ahmad 8289
82 luigiwalser 303174 %description el
83 ahmad 8289 The emacs-snapshot-el package contains the emacs elisp sources for
84     many of the elisp programs included with the main Emacs text editor
85     package.
86    
87     You need to install this package only if you intend to modify any of
88     the Emacs packages or see some elisp examples.
89    
90 luigiwalser 303174 %package doc
91 ahmad 8289 Summary: GNU Emacs documentation
92     Group: Editors
93 luigiwalser 303174 Requires: %{name}-common = %{version}
94 fwang 305159 BuildArch: noarch
95 ahmad 8289 Conflicts: emacs-snapshot-doc
96    
97 luigiwalser 303174 %description doc
98 ahmad 8289 Documentation for GNU Emacs.
99    
100 luigiwalser 303174 %package leim
101 ahmad 8289 Summary: GNU Emacs Lisp code for international input methods
102     Group: Editors
103 fwang 305159 BuildArch: noarch
104 luigiwalser 303174 Requires: %{name}-common = %{version}
105 ahmad 8289 Conflicts: emacs-snapshot-leim
106    
107 luigiwalser 303174 %description leim
108 ahmad 8289 This package contains Emacs Lisp code for input methods for various
109     international character scripts.
110    
111 luigiwalser 303174 %package nox
112 ahmad 8289 Summary: GNU Emacs text editor without support for X11
113     Group: Editors
114 luigiwalser 303174 Requires: %{name}-common = %{version}
115 ahmad 8289 Provides: emacs-bin
116    
117     Conflicts: emacs-snapshot-nox
118    
119     Requires(preun): update-alternatives
120     Requires(post): update-alternatives
121    
122 luigiwalser 303174 %description nox
123 ahmad 8289 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 luigiwalser 303174 %package common
132 ahmad 8289 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 blino 259557 # conflicts due to %%_bindir/{etags,rcs-checkin}
166 ahmad 8289 Conflicts: xemacs-extras
167    
168 luigiwalser 303174 %description common
169 ahmad 8289 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 luigiwalser 303174 %setup -q
179 ahmad 8289
180     %__perl -p -i -e 's/ctags/gctags/g' etc/etags.1
181    
182     %patch1 -p1 -b .loadup
183     %patch6 -p1
184    
185     %patch100 -p1
186     %patch101 -p1 -b .version
187     %patch111 -p1
188 eatdirt 799369 %patch112 -p1 -b .hunspell-name
189 ahmad 8289
190 luigiwalser 628025 %patch150 -p1 -b .CVE-2014-3421
191     %patch151 -p1 -b .CVE-2014-3422
192     %patch152 -p1 -b .CVE-2014-3423
193     %patch153 -p1 -b .CVE-2014-3424
194 luigiwalser 1186819 %patch154 -p1 -b .CVE-2017-14482
195 luigiwalser 628025
196 ahmad 8289 %build
197 blino 259499 autoreconf -fi -I m4
198 ahmad 8289
199     PUREDEF="-DNCURSES_OSPEED_T"
200     XPUREDEF="-DNCURSES_OSPEED_T"
201    
202     export CFLAGS="$RPM_OPT_FLAGS $PUREDEF -fno-zero-initialized-in-bss"
203    
204     %configure2_5x --with-x=no
205     %make bootstrap
206    
207 blino 259497 %make distclean
208     # Build binary without X support
209 doktor5000 736407 %configure2_5x --with-x=no --with-gpm
210 blino 259497 %make
211     mv src/emacs src/nox-emacs
212 ahmad 8289
213     %make distclean
214     # Build binary with X support
215 blino 259558 %configure2_5x --with-x-toolkit=gtk3
216 ahmad 8289 %make
217    
218     %install
219     mkdir -p %{buildroot}/usr
220    
221     PATH=$PATH:/sbin
222     ARCHDIR=%{_target_platform}
223     %old_makeinstall sharedstatedir=%{buildroot}/var
224    
225 luigiwalser 303174 rm -f %{buildroot}%{_bindir}/emacs
226 ahmad 8289 rm -f %{buildroot}%{_infodir}/dir
227    
228     # remove sun specific stuff
229     rm -f %{buildroot}%{_datadir}/emacs/%{version}/etc/{emacstool.1,emacs.1,ctags.1,etags.1,sex.6}
230    
231     # rename ctags to gctags
232 blino 259555 mv %{buildroot}%{_mandir}/man1/ctags.1.gz %{buildroot}%{_mandir}/man1/gctags.1.gz
233 ahmad 8289 mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
234    
235     mkdir -p %{buildroot}%{_sysconfdir}/emacs
236     install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
237     (cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)
238    
239     install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
240    
241    
242     install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
243     chmod -t %{buildroot}%{_bindir}/emacs*
244    
245     # create file lists
246    
247     #
248     # emacs-doc file list
249     #
250     # 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
251     # NB: etc/ps-prin{0,1}.ps are needed by ps-print
252 luigiwalser 303174 find %{buildroot}%{_datadir}/emacs/%{version}/etc/ -type f | \
253 ahmad 8289 egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
254     sed "s^%{buildroot}^^" > doc-filelist
255    
256     #
257     # emacs-el file list
258     #
259    
260     # take every .el and .el.gz which have a corresponding .elc
261     find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
262     grep -v /leim/ | while read I; do
263     f=`basename $I .gz`
264     f=`basename $f .el`
265     if [ -e `dirname $I`/$f.elc ]; then
266     echo $I | sed "s^%{buildroot}^^"
267     fi
268     done > el-filelist
269    
270     #
271     # emacs-common file list
272     #
273    
274     # everything not in previous filelists, and remove a few things listed in %files
275 luigiwalser 303174 find %{buildroot}%{_datadir}/emacs/%{version} -type f -print -o -type d -printf "%%%%dir %%p\n" | \
276 ahmad 8289 grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
277     while read I; do
278     grep -qxF $I doc-filelist el-filelist || echo $I
279     done < common-filelist.raw > common-filelist
280    
281 luigiwalser 340533 find %{buildroot}%{_libexecdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
282 ahmad 8289 egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist
283    
284 blino 429871 # this conflicts with the info package
285     rm -f %{buildroot}%{_infodir}/info.info.gz
286 ahmad 8289
287 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
288 blino 429804 have_info_files=$(echo $(ls %{buildroot}%{_infodir} | sed -e 's/\.info\.gz$//' | egrep -v -- '-[0-9]+$' | LC_ALL=C sort))
289 ahmad 8289
290     [ "$have_info_files" = "%info_files" ] || {
291     echo "you must modify the spec file, %%info_files should be: $have_info_files"
292     exit 1
293     }
294    
295    
296     %post common
297     # --section="GNU Emacs"
298 luigiwalser 303174 for f in %{info_files}; do %_install_info $f
299 ahmad 8289 done
300     :
301    
302     %preun
303 luigiwalser 303174 for f in %{info_files}; do %_remove_install_info $f
304 ahmad 8289 done
305     :
306    
307     %post nox
308 luigiwalser 303174 update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nox 10
309 ahmad 8289
310 luigiwalser 303174 [[ ! -f %{_bindir}/emacs ]] && update-alternatives --auto emacs
311 ahmad 8289 :
312    
313     %postun nox
314 luigiwalser 303174 [[ ! -f %{_bindir}/emacs-nox ]] && \
315     /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-nox
316 ahmad 8289 :
317    
318     %post
319 luigiwalser 303174 /usr/sbin/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 21
320 ahmad 8289
321 malo 202633 %postun
322 ahmad 8289 [[ ! -f %{_bindir}/emacs-%{version} ]] && \
323     /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| :
324    
325     %files -f common-filelist common
326     %doc BUGS README src/COPYING
327     %{_localstatedir}/games/emacs
328     %dir %{_sysconfdir}/emacs/site-start.d
329     %dir %{_sysconfdir}/emacs
330     %config(noreplace) %{_sysconfdir}/emacs/site-start.el
331     %dir %{_datadir}/emacs
332     %dir %{_datadir}/emacs/site-lisp
333 luigiwalser 303174 %{_datadir}/emacs/%{version}/lisp/site-start.el
334 luigiwalser 340533 %attr(2755,root,mail) %{_libexecdir}/emacs/%{version}/%{_target_platform}/movemail
335     %attr(4755,games,root) %{_libexecdir}/emacs/%{version}/%{_target_platform}/update-game-score
336 ahmad 8289 %{_bindir}/emacsclient
337     %{_bindir}/etags
338     %{_bindir}/ebrowse
339     %{_bindir}/grep-changelog
340     %{_bindir}/gctags
341     %{_mandir}/*/*
342     %{_infodir}/*
343    
344     %files -f doc-filelist doc
345    
346     %files -f el-filelist el
347     %doc src/COPYING
348     %{_datadir}/emacs/%{version}/site-lisp/subdirs.el
349     %{_datadir}/emacs/site-lisp/subdirs.el
350     %{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz
351     %{_datadir}/emacs/%{version}/leim/quail/*.el.gz
352    
353     %files leim
354     %doc src/COPYING
355     %{_datadir}/emacs/%{version}/leim/leim-list.el
356     %dir %{_datadir}/emacs/%{version}/leim/ja-dic
357     %{_datadir}/emacs/%{version}/leim/ja-dic/*.elc
358     %dir %{_datadir}/emacs/%{version}/leim/quail
359     %{_datadir}/emacs/%{version}/leim/quail/*.elc
360    
361     %files nox
362     %doc src/COPYING
363     %{_bindir}/emacs-nox
364    
365     %files
366     %doc src/COPYING
367     %{_bindir}/emacs-%{version}
368     %{_datadir}/applications/emacs.desktop
369     %{_iconsdir}/hicolor/*/apps/emacs*.png
370     %{_iconsdir}/hicolor/scalable/apps/emacs.svg
371     %{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg

  ViewVC Help
Powered by ViewVC 1.1.30