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