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