- 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
This commit is contained in:
Jens Petersen 2005-07-14 08:34:35 +00:00
parent 475652cd32
commit c0b6cc97a5
2 changed files with 54 additions and 37 deletions

View File

@ -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 <petersen@redhat.com> - 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 <petersen@redhat.com> - 21.4-6
- merge in changes from emacs22.spec conditionally
- define emacs21 rpm macro switch to control major version and use it

View File

@ -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)