1 ;;; rpm-spec-mode.el --- RPM spec file editing commands for Emacs/XEmacs
3 ;; Copyright (C) 1997-2002 Stig Bjørlykke, <stigb@tihlde.org>
5 ;; Author: Stig Bjørlykke, <stigb@tihlde.org>
6 ;; Keywords: unix, languages
9 ;; This file is part of XEmacs.
11 ;; XEmacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
16 ;; XEmacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24 ;; MA 02111-1307, USA.
26 ;;; Synched up with: not in GNU Emacs.
30 ;; Tore Olsen <toreo@tihlde.org> for some general fixes.
31 ;; Steve Sanbeg <sanbeg@dset.com> for navigation functions and
33 ;; Tim Powers <timp@redhat.com> and Trond Eivind Glomsrød
34 ;; <teg@redhat.com> for Red Hat adaptions and some fixes.
35 ;; Chmouel Boudjnah <chmouel@mandrakesoft.com> for Mandrake fixes.
39 ;; - rewrite function names.
40 ;; - autofill changelog entries.
41 ;; - customize rpm-tags-list and rpm-group-tags-list.
42 ;; - get values from `rpm --showrc'.
43 ;; - ssh/rsh for compile.
44 ;; - finish integrating the new navigation functions in with existing stuff.
45 ;; - use a single prefix consistently (internal)
49 ;; This mode is used for editing spec files used for building RPM packages.
51 ;; Most recent version is available from:
52 ;; <URL:http://www.tihlde.org/~stigb/rpm-spec-mode.el>
54 ;; Put this in your .emacs file to enable autoloading of rpm-spec-mode,
55 ;; and auto-recognition of ".spec" files:
57 ;; (autoload 'rpm-spec-mode "rpm-spec-mode.el" "RPM spec mode." t)
58 ;; (setq auto-mode-alist (append '(("\\.spec" . rpm-spec-mode))
60 ;;------------------------------------------------------------
65 (defconst rpm-spec-mode-version "0.12" "Version of `rpm-spec-mode'.")
67 (defgroup rpm-spec nil
68 "RPM spec mode with Emacs/XEmacs enhancements."
72 (defcustom rpm-spec-build-command "rpmbuild"
73 "Command for building a RPM package."
77 (defcustom rpm-spec-add-attr nil
78 "Add \"%attr\" entry for file listings or not."
82 (defcustom rpm-spec-short-circuit nil
83 "Skip straight to specified stage.
84 (ie, skip all stages leading up to the specified stage). Only valid
85 in \"%build\" and \"%install\" stage."
89 (defcustom rpm-spec-timecheck "0"
90 "Set the \"timecheck\" age (0 to disable).
91 The timecheck value expresses, in seconds, the maximum age of a file
92 being packaged. Warnings will be printed for all files beyond the
97 (defcustom rpm-spec-buildroot ""
98 "Override the BuildRoot tag with directory <dir>."
102 (defcustom rpm-spec-target ""
103 "Interpret given string as `arch-vendor-os'.
104 Set the macros _target, _target_arch and _target_os accordingly"
108 (define-obsolete-variable-alias
109 'rpm-completion-ignore-case 'rpm-spec-completion-ignore-case)
111 (defcustom rpm-spec-completion-ignore-case t
112 "*Non-nil means that case differences are ignored during completion.
113 A value of nil means that case is significant.
114 This is used during Tempo template completion."
118 (defcustom rpm-spec-clean nil
119 "Remove the build tree after the packages are made."
123 (defcustom rpm-spec-rmsource nil
124 "Remove the source and spec file after the packages are made."
128 (defcustom rpm-spec-nobuild nil
129 "Do not execute any build stages. Useful for testing out spec files."
133 (defcustom rpm-spec-sign-gpg nil
134 "Embed a GPG signature in the package.