rpms/emacs/devel emacs.spec,1.158,1.159

Jonathan G. Underwood jgu at fedoraproject.org
Tue Mar 30 00:01:45 UTC 2010


Author: jgu

Update of /cvs/pkgs/rpms/emacs/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26933

Modified Files:
	emacs.spec 
Log Message:
* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 1:23.1.94-3
- Use out of tree builds so that we can build multibple versions in the
  %build section 



Index: emacs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/emacs/devel/emacs.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -p -r1.158 -r1.159
--- emacs.spec	23 Mar 2010 15:21:12 -0000	1.158
+++ emacs.spec	30 Mar 2010 00:01:45 -0000	1.159
@@ -4,7 +4,7 @@ Summary: GNU Emacs text editor
 Name: emacs
 Epoch: 1
 Version: 23.1.94
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
 URL: http://www.gnu.org/software/emacs/
 Group: Applications/Editors
@@ -177,20 +177,28 @@ export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT
 
 #we patch configure.in so we have to do this
 autoconf
-%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
-   --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk
-
-%__make bootstrap
-%{setarch} %__make %{?_smp_mflags}
 
-# remove versioned file so that we end up with .1 suffix and only one DOC file
-rm src/emacs-%{version}.*
+# Build GTK+2 binary
+mkdir build-gtk && cd build-gtk
+ln -s ../configure .
+%configure --with-dbus --with-gif --with-jpeg --with-png --with-rsvg \
+	   --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk
+make bootstrap
+%{setarch} make %{?_smp_mflags}
+cd ..
+
+# Build binary without X support
+mkdir build-nox && cd build-nox
+ln -s ../configure .
+%configure --with-x=no
+%{setarch} make %{?_smp_mflags}
+cd ..
 
-# make sure patched lisp files get byte-compiled
-TOPDIR=${PWD}
-${TOPDIR}/src/emacs %{bytecompargs} site-lisp/*.el
+# Make sure patched lisp files get byte-compiled
+build-gtk/src/emacs %{bytecompargs} site-lisp/*.el
 
-%__make %{?_smp_mflags} -C lisp updates
+# Remove versioned file so that we end up with .1 suffix and only one DOC file
+rm build-{gtk,nox}/src/emacs-%{version}.*
 
 # Create pkgconfig file
 cat > emacs.pc << EOF
@@ -215,7 +223,9 @@ EOF
 %install
 rm -rf %{buildroot}
 
+cd build-gtk
 make install INSTALL="%{__install} -p" DESTDIR=%{buildroot}
+cd ..
 
 # let alternatives manage the symlink
 rm %{buildroot}%{_bindir}/emacs
@@ -224,14 +234,8 @@ rm %{buildroot}%{_bindir}/emacs
 gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-compr.el.gz
 gunzip %{buildroot}%{_datadir}/emacs/%{version}/lisp/jka-cmpr-hook.el.gz
 
-# rebuild without X support
-# remove the versioned binary with X support so that we end up with .1 suffix for emacs-nox too
-rm src/emacs-%{version}.*
-%configure --without-x
-%__make %{?_smp_mflags}
-
 # install the emacs without X
-install -p -m 0755 src/emacs-%{version}.1 %{buildroot}%{_bindir}/emacs-%{version}-nox
+install -p -m 0755 build-nox/src/emacs %{buildroot}%{_bindir}/emacs-%{version}-nox
 
 # make sure movemail isn't setgid
 chmod 755 %{buildroot}%{emacs_libexecdir}/movemail
@@ -391,6 +395,10 @@ alternatives --install %{_bindir}/etags 
 %dir %{_datadir}/emacs/%{version}
 
 %changelog
+* Tue Mar 30 2010 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 1:23.1.94-3
+- Use out of tree builds so that we can build multibple versions in the
+  %%build section 
+
 * Tue Mar 23 2010 Jonathan G. Underwood <jonathan.underwood at gmail.com> - 1:23.1.94-2
 - Remove checks for old version of Emacs in postrtrans
 



More information about the scm-commits mailing list