From 7501f239a2ddf82c30cdf97d680eeadd37c155ad Mon Sep 17 00:00:00 2001 From: "Jonathan G. Underwood" Date: Sun, 18 Jan 2009 16:22:07 +0000 Subject: [PATCH] - Add /etc/rpm/macros.emacs file --- emacs.spec | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/emacs.spec b/emacs.spec index 1524fae..aaa1ea5 100644 --- a/emacs.spec +++ b/emacs.spec @@ -4,7 +4,7 @@ Summary: GNU Emacs text editor Name: emacs Epoch: 1 Version: 22.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3+ URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -48,6 +48,8 @@ Provides: emacs(bin) %define expurgate 0 %define site_lisp %{_datadir}/emacs/site-lisp +%define site_start_d %{site_lisp}/site-start.d +%define bytecompargs -batch --no-init-file --no-site-file -f batch-byte-compile %define pkgconfig %{_datadir}/pkgconfig %description @@ -141,11 +143,9 @@ export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS" # remove versioned file so that we end up with .1 suffix and only one DOC file rm src/emacs-%{version}.* -TOPDIR=${PWD} -%define emacsbatch ${TOPDIR}/src/emacs -batch --no-init-file --no-site-file - # make sure patched lisp files get byte-compiled -%emacsbatch -f batch-byte-compile site-lisp/*.el +TOPDIR=${PWD} +${TOPDIR}/src/emacs %{bytecompargs} site-lisp/*.el %__make %{?_smp_mflags} -C lisp updates @@ -159,6 +159,15 @@ Description: GNU Emacs text editor Version: %{epoch}:%{version} EOF +# Create macros.emacs RPM macro file +cat > macros.emacs << EOF +%%_emacs_version %{version} +%%_emacs_epoch %{epoch} +%%_emacs_sitelispdir %{site_lisp} +%%_emacs_sitestartdir %{site_start_d} +%%_emacs_bytecompile /usr/bin/emacs %bytecompargs +EOF + %install rm -rf %{buildroot} @@ -202,6 +211,10 @@ install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/skel/.emacs mkdir -p %{buildroot}/%{pkgconfig} install -m 0644 emacs.pc %{buildroot}/%{pkgconfig} +# install rpm macro definition file +mkdir -p %{buildroot}%{_sysconfdir}/rpm +install -m 0644 macros.emacs %{buildroot}%{_sysconfdir}/rpm/ + # after everything is installed, remove info dir rm -f %{buildroot}%{_infodir}/dir rm %{buildroot}%{_localstatedir}/games/emacs/* @@ -289,6 +302,7 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ %files -f common-filelist common %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/skel/.emacs +%config(noreplace) %{_sysconfdir}/rpm/macros.emacs %doc etc/NEWS BUGS README %exclude %{_bindir}/emacs-* %{_bindir}/* @@ -309,6 +323,9 @@ alternatives --install %{_bindir}/etags emacs.etags %{_bindir}/etags.emacs 80 \ %dir %{_datadir}/emacs/%{version} %changelog +* Sun Jan 18 2009 Jonathan G. Underwood - 1:22.3-3 +- Add /etc/rpm/macros.emacs file + * Mon Dec 01 2008 Ignacio Vazquez-Abrams - 1:22.3-2 - Rebuild for Python 2.6