/[packages]/updates/5/emacs/current/SPECS/emacs.spec
ViewVC logotype

Contents of /updates/5/emacs/current/SPECS/emacs.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30