From c0b6cc97a5742c25d58f69fd7b3d53664a6c533d Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 14 Jul 2005 08:34:35 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20rpm-spec-mode.el=20to=20cvs=20revi?= =?UTF-8?q?sion=201.17=20(Ville=20Skytt=C3=A4)=20-=20fixes=20expansion=20o?= =?UTF-8?q?f=20%%{=3Fdist}=20-=20replace=20emacs-21.4-setarch=5Ffor=5Fload?= =?UTF-8?q?up-101818.patch=20with=20backport=20=20=20=20=20emacs-21-person?= =?UTF-8?q?ality-linux32-101818.patch=20from=20cvs=20(Jan=20Dj=C3=A4rv)=20?= =?UTF-8?q?which=20=20=20=20=20also=20turns=20off=20address=20randomizatio?= =?UTF-8?q?n=20during=20dumping=20(Masatake=20Yamato)=20-=20no=20longer=20?= =?UTF-8?q?need=20to=20pass=20SETARCH=20to=20make=20on=20i386=20-=20move?= =?UTF-8?q?=20ownership=20of=20%{=5Fdatadir}/emacs/=20and=20%{=5Fdatadir}/?= =?UTF-8?q?emacs/%{version}/=20=20=20=20=20from=20emacs=20to=20emacs-el=20?= =?UTF-8?q?and=20emacs-leim=20subpackages=20-=20don't=20build=20tramp=20ht?= =?UTF-8?q?ml=20and=20dvi=20documentation=20-=20drop=20src/config.in=20par?= =?UTF-8?q?t=20of=20bzero-and-have-stdlib.dpatch=20to=20avoid=20compiler?= =?UTF-8?q?=20=20=20=20=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- emacs.spec | 41 +++++++++++++++++++++++---------------- rpm-spec-mode.el | 50 +++++++++++++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/emacs.spec b/emacs.spec index c3f7747..075a2a9 100644 --- a/emacs.spec +++ b/emacs.spec @@ -9,7 +9,7 @@ Summary: GNU Emacs text editor Name: emacs Version: 21.4 -Release: 6 +Release: 7 License: GPL URL: http://www.gnu.org/software/emacs/ Group: Applications/Editors @@ -100,8 +100,8 @@ Patch25: scroll-margin.dpatch Patch26: xfree86-4.3-modifiers.dpatch # generated from ftp://fly.isti.cnr.it/pub/etags.c.gz Patch27: etags-14.21-17.11-diff.patch +Patch28: emacs-21-personality-linux32-101818.patch %endif -Patch28: emacs-21.4-setarch_for_loadup-101818.patch # Lisp and doc patches %if %{emacs21} @@ -123,7 +123,6 @@ Patch121: python-completion-ignored-extensions.dpatch Patch122: save-buffer.dpatch %endif - %description Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs contains special code editing features, a scripting @@ -218,11 +217,11 @@ sets are included in this package. %patch25 -p1 -b .25-scroll-margin %patch26 -p1 -b .26-xmodifier %patch27 -p1 -b .27-14.21 -%endif %ifarch %{ix86} # workaround #101818 (vm/break dumper problem) %patch28 -p1 -b .28-execshield %endif +%endif # patches 2 and 3 touch configure.in %if %{emacs21} @@ -280,17 +279,10 @@ export CFLAGS="-DMAIL_USE_LOCKF $RPM_OPT_FLAGS" --with-gtk --without-xim %endif -# SETARCH needed for setarch patch on i386 (#101818) %if ! %{emacs21} -%__make bootstrap \ -%ifarch %{ix86} - SETARCH="setarch i386" -%endif -%endif -%__make %{?_smp_mflags} \ -%ifarch %{ix86} - SETARCH="setarch i386" +%__make bootstrap %endif +%__make %{?_smp_mflags} # remove versioned file so that we end up with .1 suffix and only one DOC file rm src/emacs-%{version}.* @@ -313,7 +305,8 @@ TOPDIR=${PWD} ( cd tramp-%{tramp_ver} ./configure --with-emacs=${TOPDIR}/src/emacs - make ) + make lisp + make -C texi tramp ) %endif # update cc-mode manual @@ -483,9 +476,6 @@ fi %{_bindir}/emacs-%{version} %{_bindir}/emacs-nox %{_bindir}/emacs-%{version}-nox -%dir %{_datadir}/emacs -%dir %{_datadir}/emacs/%{version} -%dir %{_datadir}/emacs/%{version}/etc %dir %{_libexecdir}/emacs %dir %{_libexecdir}/emacs/%{version} %dir %{emacs_libexecdir} @@ -519,13 +509,30 @@ fi %files -f el-filelist el %defattr(-,root,root) +%dir %{_datadir}/emacs +%dir %{_datadir}/emacs/%{version} %if %{emacs21} %files -f leim-filelist leim %defattr(-,root,root) +%dir %{_datadir}/emacs +%dir %{_datadir}/emacs/%{version} %endif %changelog +* Thu Jul 14 2005 Jens Petersen - 21.4-7 +- update rpm-spec-mode.el to cvs revision 1.17 (Ville Skyttä) + - fixes expansion of %%{?dist} +- replace emacs-21.4-setarch_for_loadup-101818.patch with backport + emacs-21-personality-linux32-101818.patch from cvs (Jan Djärv) + which also turns off address randomization during dumping (Masatake Yamato) + - no longer need to pass SETARCH to make on i386 +- move ownership of %{_datadir}/emacs/ and %{_datadir}/emacs/%{version}/ + from emacs to emacs-el and emacs-leim subpackages +- don't build tramp html and dvi documentation +- drop src/config.in part of bzero-and-have-stdlib.dpatch to avoid + compiler warnings + * Thu Jun 23 2005 Jens Petersen - 21.4-6 - merge in changes from emacs22.spec conditionally - define emacs21 rpm macro switch to control major version and use it diff --git a/rpm-spec-mode.el b/rpm-spec-mode.el index b1e7336..a0dec2a 100644 --- a/rpm-spec-mode.el +++ b/rpm-spec-mode.el @@ -70,6 +70,11 @@ :prefix "rpm-spec-" :group 'languages) +(defcustom rpm-spec-build-command "rpmbuild" + "Command for building an RPM package." + :type 'string + :group 'rpm-spec) + (defcustom rpm-spec-add-attr nil "Add \"%attr\" entry for file listings or not." :type 'boolean @@ -246,11 +251,11 @@ value returned by function `user-mail-address'." (eval-when-compile (concat "^%" (regexp-opt - ;; From RPM 4.2 sources, file build/parseSpec.c: partList[]. + ;; From RPM 4.4.1 sources, file build/parseSpec.c: partList[]. '("build" "changelog" "check" "clean" "description" "files" - "install" "package" "post" "postun" "pre" "prep" "preun" - "trigger" "triggerin" "triggerpostun" "triggerun" - "verifyscript") t) + "install" "package" "post" "postun" "pretrans" "posttrans" + "pre" "prep" "preun" "trigger" "triggerin" "triggerpostun" + "triggerun" "verifyscript") t) "\\b")) "Regular expression to match beginning of a section.") @@ -332,11 +337,11 @@ value returned by function `user-mail-address'." ;;------------------------------------------------------------ (defvar rpm-no-gpg nil "Tell rpm not to sign package.") -(defvar rpm-spec-build-command "rpmbuild" "Command to build rpms.") (defvar rpm-spec-nobuild-option "--nobuild" "Option for no build.") (defvar rpm-tags-list - ;; From RPM 4.2 sources, file build/parsePreamble.c: preambleList[].") + ;; From RPM 4.4.1 sources, file build/parsePreamble.c: preambleList[], and + ;; a few macros that aren't tags, but useful here. '(("AutoProv") ("AutoReq") ("AutoReqProv") @@ -350,6 +355,7 @@ value returned by function `user-mail-address'." ("Copyright") ("%description") ("Distribution") + ("DistTag") ("DistURL") ("DocDir") ("Epoch") @@ -385,7 +391,7 @@ value returned by function `user-mail-address'." "List of elements that are valid tags.") (defvar rpm-group-tags-list - ;; From RPM 4.2 sources, file GROUPS. + ;; From RPM 4.4.1 sources, file GROUPS. '(("Amusements/Games") ("Amusements/Graphics") ("Applications/Archiving") @@ -1205,19 +1211,23 @@ See `search-forward-regexp'." (search-forward-regexp (concat field ":[ \t]*\\(.*?\\)[ \t]*$") max) (match-string 1)))) - (if (string-match "\\(%{?\\)\\([a-zA-Z0-9_]*\\)\\(}?\\)" str) - (let ((end-string (substring str (match-end 3)))) - (concat (substring str 0 (match-beginning 1)) - (progn - (goto-char (point-min)) - (search-forward-regexp - (concat "%define[ \t]+" - (substring str - (match-beginning 2) - (match-end 2)) - "[ \t]+\\(.*\\)")) - (match-string 1)) - end-string)) + ;; Try to expand macros + (if (string-match "\\(%{?\\(\\?\\)?\\)\\([a-zA-Z0-9_]*\\)\\(}?\\)" str) + (let ((start-string (substring str 0 (match-beginning 1))) + (end-string (substring str (match-end 4)))) + (if (progn + (goto-char (point-min)) + (search-forward-regexp + (concat "%\\(define\\|global\\)[ \t]+" + (match-string 3 str) + "[ \t]+\\(.*\\)") nil t)) + ;; Got it - replace. + (concat start-string (match-string 2) end-string) + (if (match-string 2 str) + ;; Conditionally evaluated macro - remove it. + (concat start-string end-string) + ;; Leave as is. + str))) str))))) (defun rpm-find-spec-version (&optional with-epoch)