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