/[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 259438 - (show annotations) (download)
Sun Jun 10 17:02:34 2012 UTC (11 years, 10 months ago) by blino
Original Path: cauldron/emacs/current/SPECS/emacs.spec
File size: 9988 byte(s)
drop merged patches
1 %define _localstatedir /var/lib
2
3 Summary: GNU Emacs text editor with X11 support
4
5 Name: emacs
6 Version: 24.1
7 Release: %mkrel 1
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.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 Patch3: emacs-23.0.94-ia64-1.patch
20 Patch6: emacs-snapshot-same-etc-DOC-for-all.patch
21 Patch7: emacs-24.1-rpath.patch
22
23 Patch100: emacs-23.3-infofix.patch
24 Patch101: emacs-23.1.92-version.patch
25 Patch111: emacs-24.1-ispell-dictionaries-list-iso-8859-15.patch
26
27 BuildRequires: libxaw-devel
28 BuildRequires: xaw3d-devel
29 BuildRequires: x11-server-common
30 BuildRequires: libx11-devel
31 BuildRequires: gcc
32 BuildRequires: libjpeg-devel
33 BuildRequires: libpng-devel
34 BuildRequires: libtiff-devel
35 BuildRequires: ncurses-devel
36 BuildRequires: libungif-devel
37 BuildRequires: texinfo
38 BuildRequires: xpm-devel
39 BuildRequires: gtk+2-devel
40
41 Requires(preun): update-alternatives
42 Requires(post): update-alternatives
43
44 Requires: %{name}-common = %version
45 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 %package el
62 Summary: GNU Emacs Lisp source files
63 Group: Editors
64 Requires: %{name}-common = %version
65 Conflicts: emacs-snapshot-el
66 BuildArch: noarch
67
68 %description el
69 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 %package doc
77 Summary: GNU Emacs documentation
78 Group: Editors
79 Requires: %{name}-common = %version
80 Conflicts: emacs-snapshot-doc
81
82 %description doc
83 Documentation for GNU Emacs.
84
85 %package leim
86 Summary: GNU Emacs Lisp code for international input methods
87 Group: Editors
88 Requires: %{name}-common = %version
89 Conflicts: emacs-snapshot-leim
90
91 %description leim
92 This package contains Emacs Lisp code for input methods for various
93 international character scripts.
94
95 %package nox
96 Summary: GNU Emacs text editor without support for X11
97 Group: Editors
98 Requires: %{name}-common = %version
99 Provides: emacs-bin
100
101 Conflicts: emacs-snapshot-nox
102
103 Requires(preun): update-alternatives
104 Requires(post): update-alternatives
105
106 %description nox
107 Emacs is a powerful, customizable, self-documenting, modeless text
108 editor. Emacs contains special code editing features, a scripting
109 language (elisp), and the capability to read mail, news, and more
110 without leaving the editor.
111
112 This package provides an emacs binary with no X Windows support for
113 running on a terminal.
114
115 %package common
116 Summary: Common files for GNU Emacs
117 Group: Editors
118
119 Obsoletes: gnus-emacs < 5.13.0
120 Provides: gnus-emacs = 5.13.0
121
122 Obsoletes: emacs-cedet < 1.0-0.pre7
123 Provides: emacs-cedet = 1.0-0.pre7
124
125 Conflicts: emacs-speedbar < 1.0
126 Provides: emacs-speedbar = 1.0
127
128 Obsoletes: emacs-tramp < 2.1.18-pre
129 Provides: emacs-tramp = 2.1.18-pre
130
131 Obsoletes: emacs-url
132 Provides: emacs-url
133
134 # (Lev) This doesn't look correct:
135 Obsoletes: emacs-pcomplete <= 2.4.2
136 Provides: emacs-pcomplete = 1.1.1
137
138 Obsoletes: eshell-emacs <= 2.4.2
139 Provides: eshell-emacs = 2.4.2
140
141 Obsoletes: emacs-easypg < 1.0.0
142 Provides: emacs-easypg = 1.0.0
143
144 Obsoletes: emacs-erc < 5.3
145 Provides: emacs-erc = 5.3
146
147 Conflicts: emacs-snapshot-common
148
149 # conflicts due to %%_bindir/{b2m,etags,rcs-checkin}
150 Conflicts: xemacs-extras
151
152 %description common
153 Emacs is a powerful, customizable, self-documenting, modeless text
154 editor. Emacs contains special code editing features, a scripting
155 language (elisp), and the capability to read mail, news, and more
156 without leaving the editor.
157
158 This package contains all of the common files needed by emacs-snapshot
159 or emacs-snapshot-nox
160
161 %prep
162
163 %setup -q -n emacs-%{version}
164
165 %__perl -p -i -e 's/ctags/gctags/g' etc/etags.1
166
167 %patch1 -p1 -b .loadup
168 %patch3 -p1 -b .ia64-2
169 %patch6 -p1
170 %patch7 -p1 -b .rpath
171
172 %patch100 -p1
173 %patch101 -p1 -b .version
174 %patch111 -p1
175
176 %build
177 autoreconf -fi
178
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 %make distclean
188 # Build binary without X support
189 %configure2_5x --with-x=no
190 %make
191 mv src/emacs src/nox-emacs
192
193 %make distclean
194 # Build binary with X support
195 %configure2_5x --with-x-toolkit
196 %make
197
198 %install
199 rm -rf %{buildroot}
200 mkdir -p %{buildroot}/usr
201
202 PATH=$PATH:/sbin
203 ARCHDIR=%{_target_platform}
204 %old_makeinstall sharedstatedir=%{buildroot}/var
205
206 rm -f %{buildroot}%_bindir/emacs
207 rm -f %{buildroot}%{_infodir}/dir
208 rm %{buildroot}%{_libdir}/emacs/%version/%{_target_platform}/fakemail
209
210 # remove sun specific stuff
211 rm -f %{buildroot}%{_datadir}/emacs/%{version}/etc/{emacstool.1,emacs.1,ctags.1,etags.1,sex.6}
212
213 # rename ctags to gctags
214 mv %{buildroot}%{_mandir}/man1/ctags.1 %{buildroot}%{_mandir}/man1/gctags.1
215 mv %{buildroot}%{_bindir}/ctags %{buildroot}%{_bindir}/gctags
216
217 # is that needed?
218 install -d %{buildroot}%{_libdir}/emacs/site-lisp
219
220 mkdir -p %{buildroot}%{_sysconfdir}/emacs
221 install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/emacs/site-start.el
222 (cd %{buildroot}%{_datadir}/emacs/%{version}/lisp; ln -s ../../../../..%{_sysconfdir}/emacs/site-start.el site-start.el)
223
224 install -d %{buildroot}%{_sysconfdir}/emacs/site-start.d
225
226
227 install -m755 src/nox-emacs %{buildroot}%{_bindir}/emacs-nox
228 chmod -t %{buildroot}%{_bindir}/emacs*
229
230 # create file lists
231
232 #
233 # emacs-doc file list
234 #
235 # 3.22MB of docs from emacs-common to emacs-doc to reduce size (tutorials, news, postscript files, ...)
236 # NB: etc/ps-prin{0,1}.ps are needed by ps-print
237 find %{buildroot}%{_datadir}/emacs/%version/etc/ -type f | \
238 egrep 'TUTORIAL\.|NEWS|ONEWS|.ps$'|fgrep -v /etc/ps-prin | \
239 sed "s^%{buildroot}^^" > doc-filelist
240
241 #
242 # emacs-el file list
243 #
244
245 # take every .el and .el.gz which have a corresponding .elc
246 find %{buildroot}%{_datadir}/emacs -name '*.el' -o -name '*.el.gz' | \
247 grep -v /leim/ | while read I; do
248 f=`basename $I .gz`
249 f=`basename $f .el`
250 if [ -e `dirname $I`/$f.elc ]; then
251 echo $I | sed "s^%{buildroot}^^"
252 fi
253 done > el-filelist
254
255 #
256 # emacs-common file list
257 #
258
259 # everything not in previous filelists, and remove a few things listed in %files
260 find %{buildroot}%{_datadir}/emacs/%version -type f -print -o -type d -printf "%%%%dir %%p\n" | \
261 grep -v /leim/ | sed "s^%{buildroot}^^" > common-filelist.raw
262 while read I; do
263 grep -qxF $I doc-filelist el-filelist || echo $I
264 done < common-filelist.raw > common-filelist
265
266 find %{buildroot}%{_libdir}/emacs -type f -print -o -type d -printf "%%%%dir %%p\n" | \
267 egrep -v 'movemail$|update-game-score$' | sed "s^%{buildroot}^^" >> common-filelist
268
269
270 %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
271 have_info_files=$(echo $(ls %{buildroot}%{_infodir} | egrep -v -- '-[0-9]+$' | sort))
272
273 [ "$have_info_files" = "%info_files" ] || {
274 echo "you must modify the spec file, %%info_files should be: $have_info_files"
275 exit 1
276 }
277
278
279 %clean
280 rm -rf %{buildroot}
281
282 %post common
283 # --section="GNU Emacs"
284 for f in %info_files; do %_install_info $f
285 done
286 :
287
288 %preun
289 for f in %info_files; do %_remove_install_info $f
290 done
291 :
292
293 %post nox
294 update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-nox 10
295
296 [[ ! -f %_bindir/emacs ]] && update-alternatives --auto emacs
297 :
298
299 %postun nox
300 [[ ! -f %_bindir/emacs-nox ]] && \
301 /usr/sbin/update-alternatives --remove emacs %_bindir/emacs-nox
302 :
303
304 %post
305 /usr/sbin/update-alternatives --install %_bindir/emacs emacs %_bindir/emacs-%version 21
306
307 %postun
308 [[ ! -f %{_bindir}/emacs-%{version} ]] && \
309 /usr/sbin/update-alternatives --remove emacs %{_bindir}/emacs-%{version}|| :
310
311 %files -f common-filelist common
312 %defattr(-,root,root)
313 %doc BUGS README src/COPYING
314 %{_localstatedir}/games/emacs
315 %dir %{_sysconfdir}/emacs/site-start.d
316 %dir %{_sysconfdir}/emacs
317 %config(noreplace) %{_sysconfdir}/emacs/site-start.el
318 %dir %{_datadir}/emacs
319 %dir %{_datadir}/emacs/site-lisp
320 %{_datadir}/emacs/%version/lisp/site-start.el
321 %attr(2755,root,mail) %{_libdir}/emacs/%version/%{_target_platform}/movemail
322 %attr(4755,games,root) %{_libdir}/emacs/%version/%{_target_platform}/update-game-score
323 %{_bindir}/b2m
324 %{_bindir}/emacsclient
325 %{_bindir}/etags
326 %{_bindir}/ebrowse
327 %{_bindir}/grep-changelog
328 %{_bindir}/gctags
329 %{_bindir}/rcs-checkin
330 %{_mandir}/*/*
331 %{_infodir}/*
332
333 %files -f doc-filelist doc
334 %defattr(-,root,root)
335
336 %files -f el-filelist el
337 %defattr(-,root,root)
338 %doc src/COPYING
339 %{_datadir}/emacs/%{version}/site-lisp/subdirs.el
340 %{_datadir}/emacs/site-lisp/subdirs.el
341 %{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz
342 %{_datadir}/emacs/%{version}/leim/quail/*.el.gz
343
344 %files leim
345 %defattr(-,root,root)
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 %defattr(-,root,root)
355 %doc src/COPYING
356 %{_bindir}/emacs-nox
357
358 %files
359 %defattr(-,root,root)
360 %doc src/COPYING
361 %{_bindir}/emacs-%{version}
362 %{_datadir}/applications/emacs.desktop
363 %{_iconsdir}/hicolor/*/apps/emacs*.png
364 %{_iconsdir}/hicolor/scalable/apps/emacs.svg
365 %{_iconsdir}/hicolor/scalable/mimetypes/emacs-document.svg
366
367

  ViewVC Help
Powered by ViewVC 1.1.30