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 |
fwang |
305159 |
Release: %mkrel 2 |
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 |
|
|
# is that needed? |
216 |
|
|
install -d %{buildroot}%{_libdir}/emacs/site-lisp |
217 |
|
|
|
218 |
|
|
mkdir -p %{buildroot}%{_sysconfdir}/emacs |
219 |
|
|
install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el |
220 |
|
|
(cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el) |
221 |
|
|
|
222 |
|
|
install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d |
223 |
|
|
|
224 |
|
|
|
225 |
|
|
install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox |
226 |
|
|
chmod -t %{buildroot}%{_bindir}/emacs* |
227 |
|
|
|
228 |
|
|
# create file lists |
229 |
|
|
|
230 |
|
|
# |
231 |
|
|
# emacs-doc file list |
232 |
|
|
# |
233 |
|
|
# 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...) |
234 |
|
|
# NB: etc/ps-prin{0,1}.ps are needed by ps-print |
235 |
luigiwalser |
303174 |
find %{buildroot}%{_datadir}/emacs/%{version}/etc/ -type f | \ |
236 |
ahmad |
8289 |
egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \ |
237 |
|
|
sed "s^%{buildroot}^^" > doc-filelist |
238 |
|
|
|
239 |
|
|
# |
240 |
|
|
# emacs-el file list |
241 |
|
|
# |
242 |
|
|
|
243 |
|
|
# take every .el and .el.gz which have a corresponding .elc |
244 |
|
|
find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \ |
245 |
|
|
grep -v /leim/ | while read I; do |
246 |
|
|
f=`basename $I .gz` |
247 |
|
|
f=`basename $f .el` |
248 |
|
|
if [ -e `dirname $I`/$f.elc ]; then |
249 |
|
|
echo $I | sed "s^%{buildroot}^^" |
250 |
|
|
fi |
251 |
|
|
done > el-filelist |
252 |
|
|
|
253 |
|
|
# |
254 |
|
|
# emacs-common file list |
255 |
|
|
# |
256 |
|
|
|
257 |
|
|
# everything not in previous filelists, and remove a few things listed in %files |
258 |
luigiwalser |
303174 |
find %{buildroot}%{_datadir}/emacs/%{version} -type f -print -o -type d -printf "%%%%dir %%p\n" | \ |
259 |
ahmad |
8289 |
grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw |
260 |
|
|
while read I; do |
261 |
|
|
grep -qxF $I doc-filelist el-filelist || echo $I |
262 |
|
|
done < common-filelist.raw > common-filelist |
263 |
|
|
|
264 |
|
|
find %{buildroot}%{_libdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \ |
265 |
|
|
egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist |
266 |
|
|
|
267 |
|
|
|
268 |
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 |
269 |
blino |
259555 |
have_info_files=$(echo $(ls %{buildroot}%{_infodir} | egrep -v -- '-[0-9]+$' | sed -e 's/\.gz$//' | sort)) |
270 |
ahmad |
8289 |
|
271 |
|
|
[ "$have_info_files" = "%info_files" ] || { |
272 |
|
|
echo "you must modify the spec file, %%info_files should be: $have_info_files" |
273 |
|
|
exit 1 |
274 |
|
|
} |
275 |
|
|
|
276 |
|
|
|
277 |
|
|
%post common |
278 |
|
|
# --section="GNU Emacs" |
279 |
luigiwalser |
303174 |
for f in %{info_files}; do %_install_info $f |
280 |
ahmad |
8289 |
done |
281 |
|
|
: |
282 |
|
|
|
283 |
|
|
%preun |
284 |
luigiwalser |
303174 |
for f in %{info_files}; do %_remove_install_info $f |
285 |
ahmad |
8289 |
done |
286 |
|
|
: |
287 |
|
|
|
288 |
|
|
%post nox |
289 |
luigiwalser |
303174 |
update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-nox 10 |
290 |
ahmad |
8289 |
|
291 |
luigiwalser |
303174 |
[[ ! -f %{_bindir}/emacs ]] && update-alternatives --auto emacs |
292 |
ahmad |
8289 |
: |
293 |
|
|
|
294 |
|
|
%postun nox |
295 |
luigiwalser |
303174 |
[[ ! -f %{_bindir}/emacs-nox ]] && \ |
296 |
|
|
/usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-nox |
297 |
ahmad |
8289 |
: |
298 |
|
|
|
299 |
|
|
%post |
300 |
luigiwalser |
303174 |
/usr/sbin/update-alternatives --install %{_bindir}/emacs emacs %{_bindir}/emacs-%{version} 21 |
301 |
ahmad |
8289 |
|
302 |
malo |
202633 |
%postun |
303 |
ahmad |
8289 |
[[ ! -f %{_bindir}/emacs-%{version} ]] && \ |
304 |
|
|
/usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| : |
305 |
|
|
|
306 |
|
|
%files -f common-filelist common |
307 |
|
|
%doc BUGS README src/COPYING |
308 |
|
|
%{_localstatedir}/games/emacs |
309 |
|
|
%dir %{_sysconfdir}/emacs/site-start.d |
310 |
|
|
%dir %{_sysconfdir}/emacs |
311 |
|
|
%config(noreplace) %{_sysconfdir}/emacs/site-start.el |
312 |
|
|
%dir %{_datadir}/emacs |
313 |
|
|
%dir %{_datadir}/emacs/site-lisp |
314 |
luigiwalser |
303174 |
%{_datadir}/emacs/%{version}/lisp/site-start.el |
315 |
|
|
%attr(2755,root,mail) %{_libdir}/emacs/%{version}/%{_target_platform}/movemail |
316 |
|
|
%attr(4755,games,root) %{_libdir}/emacs/%{version}/%{_target_platform}/update-game-score |
317 |
ahmad |
8289 |
%{_bindir}/emacsclient |
318 |
|
|
%{_bindir}/etags |
319 |
|
|
%{_bindir}/ebrowse |
320 |
|
|
%{_bindir}/grep-changelog |
321 |
|
|
%{_bindir}/gctags |
322 |
|
|
%{_bindir}/rcs-checkin |
323 |
|
|
%{_mandir}/*/* |
324 |
|
|
%{_infodir}/* |
325 |
|
|
|
326 |
|
|
%files -f doc-filelist doc |
327 |
|
|
|
328 |
|
|
%files -f el-filelist el |
329 |
|
|
%doc src/COPYING |
330 |
|
|
%{_datadir}/emacs/%{version}/site-lisp/subdirs.el |
331 |
|
|
%{_datadir}/emacs/site-lisp/subdirs.el |
332 |
|
|
%{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz |
333 |
|
|
%{_datadir}/emacs/%{version}/leim/quail/*.el.gz |
334 |
|
|
|
335 |
|
|
%files leim |
336 |
|
|
%doc src/COPYING |
337 |
|
|
%{_datadir}/emacs/%{version}/leim/leim-list.el |
338 |
|
|
%dir %{_datadir}/emacs/%{version}/leim/ja-dic |
339 |
|
|
%{_datadir}/emacs/%{version}/leim/ja-dic/*.elc |
340 |
|
|
%dir %{_datadir}/emacs/%{version}/leim/quail |
341 |
|
|
%{_datadir}/emacs/%{version}/leim/quail/*.elc |
342 |
|
|
|
343 |
|
|
%files nox |
344 |
|
|
%doc src/COPYING |
345 |
|
|
%{_bindir}/emacs-nox |
346 |
|
|
|
347 |
|
|
%files |
348 |
|
|
%doc src/COPYING |
349 |
|
|
%{_bindir}/emacs-%{version} |
350 |
|
|
%{_datadir}/applications/emacs.desktop |
351 |
|
|
%{_iconsdir}/hicolor/*/apps/emacs*.png |
352 |
|
|
%{_iconsdir}/hicolor/scalable/apps/emacs.svg |
353 |
|
|
%{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg |