]> git.pld-linux.org Git - packages/xemacs.git/blob - xemacs.spec
- make gtk and postgresql conditional build
[packages/xemacs.git] / xemacs.spec
1 # with_postgresql       - postgresql support
2 # with_gtk              - gtk enabled version
3 %define         ver             21.4
4 %define         basepkgver      1.53
5 Summary:        The XEmacs -- Emacs: The Next Generation
6 Summary(pl):    XEmacs -- Emacs nastêpnej generacji
7 Name:           xemacs
8 Version:        %{ver}.3
9 Release:        2
10 License:        GPL
11 Group:          Applications/Editors/Emacs
12 Group(de):      Applikationen/Editors/Emacs
13 Group(pl):      Aplikacje/Edytory/Emacs
14 Source0:        ftp://ftp.xemacs.org/pub/xemacs/%{name}-%{ver}/%{name}-%{version}.tar.gz
15 Source1:        ftp://ftp.xemacs.org/pub/xemacs/%{name}-%{ver}/%{name}-%{version}-elc.tar.gz
16 Source2:        ftp://ftp.xemacs.org/pub/xemacs/packages/%{name}-base-%{basepkgver}-pkg.tar.gz
17 Source3:        %{name}.desktop
18 Source4:        %{name}.ad-pl
19 Source5:        %{name}-default.el
20 Source6:        %{name}-ogony-mule.el
21 Source7:        %{name}-ogony-nomule.el
22 Source8:        %{name}.png
23 Patch0:         %{name}-info.patch
24 Patch1:         %{name}-archlibdir.patch
25 Patch2:         %{name}-fix_ldflafs.patch
26 Patch3:         %{name}-event.patch
27 URL:            http://www.xemacs.org/
28 BuildRequires:  XFree86-devel
29 BuildRequires:  motif-devel
30 BuildRequires:  zlib-devel
31 BuildRequires:  libtiff-devel
32 BuildRequires:  libjpeg-devel
33 BuildRequires:  libpng >= 1.0.8
34 %{?with_postgresql:BuildRequires:       postgresql-devel >= 7.1}
35 BuildRequires:  gpm-devel
36 BuildRequires:  ncurses-devel >= 5.0
37 BuildRequires:  gpm-devel
38 %{?with_gtk:BuildRequires:      gtk+-devel >= 1.2.10}
39 %{?with_gtk:BuildRequires:      glib-devel}
40 Requires:       ctags
41 Requires:       %{name}-common = %{version}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 XEmacs is a highly customizable open source text editor and
46 application development system. XEmacs is a version of Emacs,
47 compatible with and containing many improvements over GNU Emacs,
48 written by Richard Stallman of the Free Software Foundation. It was
49 originally based on an early release of GNU Emacs version 19, and has
50 tracked subsequent releases of GNU Emacs as they have become
51 available. This XEmacs distribution has been splitted in some rpm:
52
53 xemacs-common - common files needed by xemacs and xemacs-nox packages
54 xemacs - XEmacs binary with both X11 and TTY support xemacs-nox -
55 XEmacs binary with TTY support only xemacs-extras - files in conflict
56 with emacs
57
58 Install xemacs-extras if you haven't emacs installed.
59
60 %description -l pl 
61 XEmacs jest odmian± Emacsa, zgodn± (i zawieraj±c± wiele udogodnieñ) z
62 GNU Emacsem tworzonym przez Richarda Stallmana z Free Software
63 Foundation. Wywodzi siê z wczesnych odmian GNU Emacs 19, wprowadza
64 wiele mi³ych ulepszeñ nie trac±c jednak wiêzi z oryginaln± wersj±.
65
66 Ta dystrubucja XEmacsa zosta³± podzielona na wiele pakietów binarnych:
67
68 xemacs-common - pakiet zawieraj±cy pliki wspó³dzielone przez pakiety
69 xemacs i xemacs-nox xemacs - XEmacs skompilowany ze wsparciem dla X11
70 i konsoli xemacs-nox - XEmacs skompilowany bez wsparcia dla X11
71 (pracuje tylko na konsoli tekstowej) xemacs-extras - pliki wchodz±ce w
72 sk³ad dystrybucji GNU Emacs
73
74 Do pracy niezbêdne s± xemacs-common oraz xemacs b±d¼ xemacs-nox.
75 Zainstaluj tak¿e xemacs-extras je¶li nie posiadasz GNU Emacsa.
76
77 %package common
78 Summary:        Common part of XEmacs distribution
79 Group:          Applications/Editors/Emacs
80 Group(de):      Applikationen/Editors/Emacs
81 Group(pl):      Aplikacje/Edytory/Emacs
82 Provides:       xemacs-base-pkg
83
84 %description common
85 Common files of XEmacs distribution. This package does not contain
86 XEmacs editor binary, you must install xemacs or xemacs-nox package to
87 use XEmacs -- Emacs: The Next Generation editor.
88
89 %package nox
90 Summary:        XEmacs binary compiled without X11 support
91 Group:          Applications/Editors/Emacs
92 Group(de):      Applikationen/Editors/Emacs
93 Group(pl):      Aplikacje/Edytory/Emacs
94 Requires:       %{name}-common = %{version}
95 Provides:       %{name} = %{version}
96
97 %description nox
98 XEmacs binary compiled with TTY support only, without X11 support.
99
100 %description nox -l pl
101 XEmacs skompilowany bez wsparcia dla X11 (pracuje tylko na konsoli lub
102 w okienku xterma).
103
104 %package extras
105 Summary:        files which conflict with GNU Emacs
106 Summary(pl):    wspólne pliki XEmacsa i GNU Emacsa
107 Group:          Applications/Editors/Emacs
108 Group(de):      Applikationen/Editors/Emacs
109 Group(pl):      Aplikacje/Edytory/Emacs
110 Requires:       %{name} = %{version}
111 Conflicts:      emacs
112
113 %description extras
114 These files are common between GNU Emacs and XEmacs. If you do not
115 have GNU Emacs installed, be sure to install this package as well when
116 you install XEmacs.
117
118 %description extras -l pl
119 S± to wpólne pliki GNU Emacs i XEmacs. Je¶li nie zainstalowa³e¶ GNU
120 Emacsa, to koniecznie zainstaluj ten pakiet.
121
122 %prep
123 %setup0 -q -b1 -a2
124 %patch0 -p1
125 %patch1 -p1
126 %patch2 -p1
127 %patch3 -p1
128
129 %build
130 aclocal
131 autoconf
132 CFLAGS="-I%{rpmcflags}"
133 CPPFLAGS="-I%{rpmcflags}"
134 LDFLAGS="%{rpmldflags} -lc"
135 sitelispdir=%{_libdir}/%{name}/site-lisp
136 export CFLAGS CPPFLAGS LDFLAGS sitelispdir
137
138 # no X 
139 ./configure %{_target_platform} \
140         --prefix=%{_prefix} \
141         --infodir=%{_infodir} \
142         --mandir=%{_mandir}/man1 \
143         --datadir=%{_datadir} \
144         --package_path="~/.xemacs::%{_datadir}/%{name}-packages" \
145         --with-mule \
146         --with-site-lisp \
147         --without-postgresql \
148         --without-sound \
149         --without-x11 \
150         --without-jpeg \
151         --without-png \
152         --without-xpm \
153         --with-gpm \
154         --with-ncurses \
155         --with-database=no \
156         --without-tiff \
157         --without-dnet \
158         --without-ldap \
159         --without-dragndrop \
160         --without-msw
161
162 sitelispdir=%{_libdir}/%{name}/site-lisp \
163 %{__make}
164 cp src/xemacs src/xemacs-nox
165 %{__make} distclean
166
167 # X
168 aclocal
169 autoconf
170 ./configure %{_target_platform} \
171         --prefix=%{_prefix} \
172         --infodir=%{_infodir} \
173         --mandir=%{_mandir}/man1 \
174         --datadir=%{_datadir} \
175         --package_path="~/.xemacs::%{_datadir}/%{name}-packages" \
176         --with-mule \
177         --with-site-lisp \
178         --with%{?!with_postgresql:out}-postgresql \
179         --without-sound \
180         --with-jpeg \
181         --with-png \
182         --with-xpm \
183         --with-gpm \
184         --with-ncurses \
185         --with%{?!with_gtk:out}-gtk \
186         %{?!with_gtk:--with-x11 --with-athena=3d --with-menubars=lucid} \
187         %{?!with_gtk:--with-scrollbars=lucid --with-dialogs=athena} \
188         %{?!with_gtk:--with-widgets=athena} \
189         --with-database=no \
190         --with-gnome=no \
191         --without-tiff \
192         --without-dnet \
193         --without-ldap \
194         --without-dragndrop \
195         --without-msw
196
197 # if you want to xemacs sings and plays sounds add option 
198 #       --with-sound=native 
199
200 #       --lispdir=%{_datadir}/%{name}/lisp \
201 #       --pkgdir=%{_datadir}/%{name}/lisp \
202 #       --etcdir=%{_datadir}/%{name}/etc \
203 #       --cflags="$RPM_OPT_FLAGS" \
204 #       --error-checking=none \
205 #       --debug=no \
206 #       --with-session=yes \
207
208 sitelispdir=%{_libdir}/%{name}/site-lisp \
209 %{__make}
210
211 %install
212 rm -rf $RPM_BUILD_ROOT
213 install -d $RPM_BUILD_ROOT{%{_applnkdir}/Development/Editors,%{_pixmapsdir},/var/lock/xemacs} \
214         $RPM_BUILD_ROOT{%{_mandir}/{ja/man1,man1},%{_prefix}/X11R6/lib/X11/{,pl}/app-defaults} \
215         $RPM_BUILD_ROOT%{_datadir}/%{name}/lisp \
216         $RPM_BUILD_ROOT%{_libdir}/%{name} \
217         $RPM_BUILD_ROOT%{_datadir}/%{name}-packages/{etc,lib-src}
218
219 %{__make} install-arch-dep install-arch-indep \
220         prefix=$RPM_BUILD_ROOT%{_prefix} \
221         infodir=$RPM_BUILD_ROOT%{_infodir} \
222         mandir=$RPM_BUILD_ROOT%{_mandir}/man1 \
223         datadir=$RPM_BUILD_ROOT%{_datadir} \
224
225 install %{SOURCE3} $RPM_BUILD_ROOT%{_applnkdir}/Development/Editors/xemacs.desktop
226
227 ( cd $RPM_BUILD_ROOT%{_datadir}/%{name}-packages; gzip -dc %{SOURCE2} | tar xf - )
228
229 install %{SOURCE5} $RPM_BUILD_ROOT%{_datadir}/%{name}-packages/lisp/default.el
230 install %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/%{name}-packages/lisp/ogony-mule.el
231 install %{SOURCE7} $RPM_BUILD_ROOT%{_datadir}/%{name}-packages/lisp/ogony-nomule.el
232 install %{SOURCE8} $RPM_BUILD_ROOT%{_pixmapsdir}
233
234 mv $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/%{_target_platform}/config.values $RPM_BUILD_ROOT%{_libdir}/%{name}
235
236 [ -d $RPM_BUILD_ROOT%{_datadir}/%{name}/site-lisp ] || \
237 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/site-lisp
238 ln -s %{_datadir}/%{name}/site-lisp $RPM_BUILD_ROOT%{_libdir}/%{name}/site-lisp
239
240 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}%{_sysconfdir}/Emacs.ad \
241         $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/app-defaults/Emacs
242 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}%{_sysconfdir}/Emacs.ad \
243         $RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/pl/app-defaults/Emacs
244 cat %{SOURCE4} >>$RPM_BUILD_ROOT%{_prefix}/X11R6/lib/X11/pl/app-defaults/Emacs
245
246 mv $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}%{_sysconfdir}/xemacs-ja.1 \
247         $RPM_BUILD_ROOT%{_mandir}/ja/man1/xemacs.1
248
249 mv -f $RPM_BUILD_ROOT%{_bindir}/xemacs-%{version} \
250         $RPM_BUILD_ROOT%{_bindir}/xemacs
251
252 find $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/* -type f -name "ChangeLog*" | xargs gzip -9nf
253
254 install -s src/xemacs-nox $RPM_BUILD_ROOT%{_bindir}
255
256 # remove .el file if corresponding .elc file exists
257 find $RPM_BUILD_ROOT -type f -name "*.el" | while read i; do test ! -f ${i}c || rm -f $i; done
258 rm -f $RPM_BUILD_ROOT%{_bindir}/{c,e}tags
259 # hmm, maybe xemacs-devel is necessary?
260 rm -fr $RPM_BUILD_ROOT%{_libdir}/%{name}-%{version}/%{_target_platform}/include
261 rm -f $RPM_BUILD_ROOT%{_infodir}/dir*
262 rm -f $RPM_BUILD_ROOT%{_infodir}/{info,standards,texinfo}.info*
263
264 gzip -9nf README GETTING.GNU.SOFTWARE PROBLEMS \
265         etc/NEWS etc/MAILINGLISTS BUGS etc/TERMS etc/SERVICE
266
267 %clean
268 rm -rf $RPM_BUILD_ROOT
269
270 %post
271 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 
272
273 %postun
274 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 
275
276 %files
277 %defattr(644,root,root,755)
278 %lang(en) %{_prefix}/X11R6/lib/X11/app-defaults/Emacs
279 %lang(pl) %{_prefix}/X11R6/lib/X11/pl/app-defaults/Emacs
280 %attr(755,root,root) %{_bindir}/gnu*
281 %attr(755,root,root) %{_bindir}/xemacs
282 %attr(755,root,root) %{_bindir}/ootags
283 %attr(755,root,root) %{_bindir}/ellcc
284 %attr(755,root,root) %{_libdir}/%{name}-%{version}/*/gnuserv
285 %{_applnkdir}/Development/Editors/xemacs.desktop
286 %{_pixmapsdir}/*
287 %{_mandir}/man1/gnuattach.1*
288 %{_mandir}/man1/gnuclient.1*
289 %{_mandir}/man1/gnudoit.1*
290 %{_mandir}/man1/gnuserv.1*
291 %{_datadir}/%{name}-%{version}%{_sysconfdir}/custom
292 %{_datadir}/%{name}-%{version}%{_sysconfdir}/eos
293 %{_datadir}/%{name}-%{version}%{_sysconfdir}/toolbar
294 %{_datadir}/%{name}-%{version}%{_sysconfdir}/*.png
295 %{_datadir}/%{name}-%{version}%{_sysconfdir}/*.xbm
296 %{_datadir}/%{name}-%{version}%{_sysconfdir}/*.xpm
297
298 %files common
299 %defattr(644,root,root,755)
300 %doc *.gz etc/*.gz
301 %doc %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL
302 %doc %lang(de) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.de
303 %doc %lang(fr) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.fr
304 %doc %lang(hr) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.hr
305 %doc %lang(ja) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.ja
306 %doc %lang(ko) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.ko
307 %doc %lang(no) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.no
308 %doc %lang(pl) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.pl
309 %doc %lang(ro) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.ro
310 %doc %lang(ru) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.ru
311 %doc %lang(th) %{_datadir}/%{name}-%{version}%{_sysconfdir}/TUTORIAL.th
312 %doc %{_datadir}/%{name}-%{version}%{_sysconfdir}/[A-SU-Z]*
313
314 %{_libdir}/%{name}
315 %dir %{_libdir}/%{name}-%{version}
316 %attr(755,root,root)  %{_libdir}/%{name}-%{version}/%{_target_platform}
317
318 %{_datadir}/%{name}
319
320 %dir %{_datadir}/%{name}-%{version}
321 # do not know it is necessary
322 %{_datadir}/%{name}-%{version}/%{_target_platform}
323
324 %{_datadir}/%{name}-%{version}/lisp/
325
326 %dir %{_datadir}/%{name}-packages
327 %{_datadir}/%{name}-packages/lisp
328
329 %{_mandir}/man1/xemacs.1*
330 %lang(ja) %{_mandir}/ja/man1/*
331
332 %{_infodir}/*
333
334 /var/lock/xemacs
335
336 %files nox
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_bindir}/xemacs-nox
339
340 %files extras
341 %defattr(644,root,root,755)
342 %attr(755,root,root) %{_bindir}/b2m
343 %attr(755,root,root) %{_bindir}/rcs-checkin
This page took 0.164441 seconds and 4 git commands to generate.