SPECS (DEVEL): emacs.spec - build Athena and Motif version too (GT...
twittner
twittner at pld-linux.org
Fri Jan 6 20:19:26 CET 2006
Author: twittner Date: Fri Jan 6 19:19:26 2006 GMT
Module: SPECS Tag: DEVEL
---- Log message:
- build Athena and Motif version too (GTK2 version is slow)
- do `make bootstrap' (time-consuming elisp files compilation) only once
- rel. 2
---- Files affected:
SPECS:
emacs.spec (1.68.4.12 -> 1.68.4.13)
---- Diffs:
================================================================
Index: SPECS/emacs.spec
diff -u SPECS/emacs.spec:1.68.4.12 SPECS/emacs.spec:1.68.4.13
--- SPECS/emacs.spec:1.68.4.12 Tue Jan 3 17:56:13 2006
+++ SPECS/emacs.spec Fri Jan 6 20:19:20 2006
@@ -1,7 +1,10 @@
# $Revision$, $Date$
#
# Conditional build:
-%bcond_without gtk
+%bcond_without athena # don't build athena version
+%bcond_without gtk # don't build GTK2 version
+%bcond_without motif # don't build motif version
+%bcond_without nox # don't build nox version
#
%define snap 20051223
Summary: The Emacs text editor for the X Window System
@@ -13,7 +16,7 @@
Summary(tr): GNU Emacs
Name: emacs
Version: 22.0.50
-Release: 0.%{snap}.1
+Release: 0.%{snap}.2
License: GPL
Group: Applications/Editors/Emacs
Source0: %{name}-%{version}.tar.gz
@@ -32,11 +35,10 @@
BuildRequires: libtool
BuildRequires: libungif-devel
BuildRequires: ncurses-devel
-%if %{with gtk}
-BuildRequires: gtk+2-devel
-%else
-BuildRequires: Xaw3d-devel >= 1.5E-3
-%endif
+%{?with_athena:BuildRequires: Xaw3d-devel >= 1.5E-3}
+%{?with_gtk:BuildRequires: gtk+2-devel}
+%{?with_motif:BuildRequires: openmotif-devel}
+BuildRequires: sed >= 4.0
BuildRequires: texinfo
Requires: ctags
Requires: %{name}-common = %{version}-%{release}
@@ -235,6 +237,42 @@
Bu paket içinde yer alan emacs programý, X11 desteđi içermez ve
çalýţmak için daha az belleđe gereksinim duyar.
+%package athena
+Summary: The Emacs text editor for X Window System (Athena toolkit version)
+Summary(pl): Emacs - edytor tekstu Emacs dla X Window System (wersja Athena)
+Group: Applications/Editors/Emacs
+Requires: %{name}-common = %{version}-%{release}
+
+%description athena
+The Emacs text editor for X Window System (Athena toolkit version).
+
+%description athena -l pl
+Emacs - edytor tekstu Emacs dla X Window System (wersja Athena).
+
+%package gtk
+Summary: The Emacs text editor for X Window System (GTK2 toolkit version)
+Summary(pl): Emacs - edytor tekstu Emacs dla X Window System (wersja GTK2)
+Group: Applications/Editors/Emacs
+Requires: %{name}-common = %{version}-%{release}
+
+%description gtk
+The Emacs text editor for X Window System (GTK2 toolkit version).
+
+%description gtk -l pl
+Emacs - edytor tekstu Emacs dla X Window System (wersja GTK2).
+
+%package motif
+Summary: The Emacs text editor for X Window System (Motif toolkit version)
+Summary(pl): Emacs - edytor tekstu Emacs dla X Window System (wersja Motif)
+Group: Applications/Editors/Emacs
+Requires: %{name}-common = %{version}-%{release}
+
+%description motif
+The Emacs text editor for X Window System (Motif toolkit version).
+
+%description motif -l pl
+Emacs - edytor tekstu Emacs dla X Window System (wersja Motif).
+
%package common
Summary: The libraries needed to run the GNU Emacs text editor
Summary(pl): Biblioteki potrzebne do uruchomienia edytora tekstu GNU Emacs
@@ -302,24 +340,39 @@
Kod źródłowy Gnusa w Emacs Lispie.
%prep
+#
+%if %{with gtk}
+%define default_emacs gtk
+%else
+%if %{with motif}
+%define default_emacs motif
+%else
+%if %{with athena}
+%define default_emacs athena
+%else
+%if %{with nox}
+%define default_emacs nox
+%else
+echo "ERROR: building Emacs with passed conditionals is impossible."
+exit 1
+%endif
+%endif
+%endif
+%endif
+echo -e "\nEmacs %{default_emacs} version will be emacs binary as default.\n"
+#
%setup -q
-
-# /usr/sbin is not in standard path
-for file in Makefile.in lispref/Makefile.in; do
- sed "s/install\-info/\/usr\/sbin\/install\-info/" < $file > $file.new
- mv $file.new $file
-done
-
%build
cp -f /usr/share/automake/config.* .
%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
-# Build binary with X support
-[ -d build-withx ] && rm -rf build-withx
-mkdir build-withx && cd build-withx
+%if %{with athena}
+echo "Building emacs athena binary ..."
+rm -rf build-athena
+mkdir build-athena && cd build-athena
../%configure \
--with-pop \
--with-xpm \
@@ -327,17 +380,59 @@
--with-tiff \
--with-gif \
--with-png \
-%if %{without gtk}
- --with-x-toolkit \
+ --with-x-toolkit=athena
+
+%{__make} bootstrap
+%define bootstrap athena
+cd ..
+%endif
+
+%if %{with gtk}
+echo "Building emacs GTK2 binary ..."
+rm -rf build-gtk
+mkdir build-gtk && cd build-gtk
+../%configure \
+ --with-pop \
+ --with-xpm \
+ --with-jpeg \
+ --with-tiff \
+ --with-gif \
+ --with-png \
+ --with-x-toolkit=gtk
+
+%if %{?bootstrap}
+%{__make}
%else
- --with-gtk \
+%{__make} bootstrap
+%define bootstrap gtk
+%endif
+cd ..
%endif
- %{_target_platform}
+%if %{with motif}
+echo "Building emacs motif binary ..."
+rm -rf build-motif
+mkdir build-motif && cd build-motif
+../%configure \
+ --with-pop \
+ --with-xpm \
+ --with-jpeg \
+ --with-tiff \
+ --with-gif \
+ --with-png \
+ --with-x-toolkit=motif
+
+%if %{?bootstrap}
+%{__make}
+%else
%{__make} bootstrap
+%define bootstrap motif
+%endif
cd ..
+%endif
-#Build binary without X support
+%if %{with nox}
+echo "Building emacs binary without X support ..."
[ -d build-nox ] && rm -rf build-nox
mkdir build-nox && cd build-nox
../%configure \
@@ -347,15 +442,20 @@
--without-tiff \
--without-gif \
--without-png \
- --with-x=no \
- %{_target_platform}
+ --with-x=no
+%if %{?bootstrap}
+%{__make}
+%else
%{__make} bootstrap
+%define bootstrap nox
+%endif
cd ..
+%endif
mv lisp/term/README README.term
-sed s!@SITE_START_DIR@!%{_datadir}/emacs/site-lisp/site-start.d! \
+%{__sed} s!@SITE_START_DIR@!%{_datadir}/emacs/site-lisp/site-start.d! \
< %{SOURCE3} > site-start.el
%install
@@ -364,17 +464,36 @@
install -d $RPM_BUILD_ROOT{%{_infodir},%{_datadir}/emacs/site-lisp/site-start.d} \
$RPM_BUILD_ROOT{%{_desktopdir},/etc/skel,%{_pixmapsdir}} \
-%{makeinstall} -C build-withx
-install build-nox/src/emacs $RPM_BUILD_ROOT%{_bindir}/emacs-nox
-install site-start.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
+%if %{with athena}%{with gtk}%{with motif}%{with nox}
+%{makeinstall} -C build-%{bootstrap}
+%else
+echo 'ERROR: neither athena nor gtk nor motif nor nox emacs was built.' 1>&2
+exit 1
+%endif
+for e in athena gtk motif nox ; do
+ [ -d build-$e ] && install build-${e}/src/emacs $RPM_BUILD_ROOT%{_bindir}/emacs-$e
+done
+rm -f $RPM_BUILD_ROOT%{_bindir}/emacs
+# make "default emacs" from gtk, athena, motif and non-X version
+for e in gtk athena motif nox ; do
+ if [ -f $RPM_BUILD_ROOT%{_bindir}/emacs-$e ] ; then
+ (cd $RPM_BUILD_ROOT%{_bindir}
+ cp -pf emacs-$e emacs
+ cp -pf emacs-$e emacs-%{version}
+ )
+ break;
+ fi
+done
+
+install site-start.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/
install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/skel/.emacs
install %{SOURCE4} $RPM_BUILD_ROOT%{_pixmapsdir}
install %{SOURCE5} $RPM_BUILD_ROOT/%{_datadir}/emacs/%{version}/site-lisp/tuareg.el
install %{SOURCE6} $RPM_BUILD_ROOT/%{_datadir}/emacs/%{version}/site-lisp/nemerle.el
-install build-nox/etc/DOC-* $RPM_BUILD_ROOT%{_datadir}/emacs/%{version}/etc
+[ -d build-nox ] && install build-nox/etc/DOC-* $RPM_BUILD_ROOT%{_datadir}/emacs/%{version}/etc
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
@@ -629,9 +748,29 @@
%{_datadir}/emacs/%{version}/leim/quail/*.el.gz
%{_datadir}/emacs/%{version}/leim/ja-dic/*.el.gz
+%if %{with nox} && %{?default_emacs} != "nox"
%files nox
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/emacs-nox
+%endif
+
+%if %{with athena} && %{?default_emacs} != "athena"
+%files athena
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/emacs-athena
+%endif
+
+%if %{with gtk} && %{?default_emacs} != "gtk"
+%files gtk
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/emacs-gtk
+%endif
+
+%if %{with motif} && %{?default_emacs} != "motif"
+%files motif
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/emacs-motif
+%endif
%files gnus
%defattr(644,root,root,755)
@@ -650,6 +789,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.68.4.13 2006/01/06 19:19:20 twittner
+- build Athena and Motif version too (GTK2 version is slow)
+- do `make bootstrap' (time-consuming elisp files compilation) only once
+- rel. 2
+
Revision 1.68.4.12 2006/01/03 16:56:13 twittner
- CC and CFLAGS fixes - use %%configure, regenerate ac
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/emacs.spec?r1=1.68.4.12&r2=1.68.4.13&f=u
More information about the pld-cvs-commit
mailing list