Remove old XE Mercurial repo infrastructure
[packages] / xemacs-packages / prog-modes / rpm-spec-mode.el.upstream
1 ;;; rpm-spec-mode.el --- RPM spec file editing commands for Emacs/XEmacs
2
3 ;; Copyright (C) 1997-2002 Stig Bjørlykke, <stigb@tihlde.org>
4
5 ;; Author:   Stig Bjørlykke, <stigb@tihlde.org>
6 ;; Keywords: unix, languages
7 ;; Version:  0.12
8
9 ;; This file is part of XEmacs.
10
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)
14 ;; any later version.
15
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.
20
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.
25
26 ;;; Synched up with: not in GNU Emacs.
27
28 ;;; Thanx to:
29
30 ;;     Tore Olsen <toreo@tihlde.org> for some general fixes.
31 ;;     Steve Sanbeg <sanbeg@dset.com> for navigation functions and
32 ;;          some Emacs fixes.
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.
36
37 ;;; ToDo:
38
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)
46
47 ;;; Commentary:
48
49 ;; This mode is used for editing spec files used for building RPM packages.
50 ;;
51 ;; Most recent version is available from:
52 ;;  <URL:http://www.tihlde.org/~stigb/rpm-spec-mode.el>
53 ;;
54 ;; Put this in your .emacs file to enable autoloading of rpm-spec-mode,
55 ;; and auto-recognition of ".spec" files:
56 ;;
57 ;;  (autoload 'rpm-spec-mode "rpm-spec-mode.el" "RPM spec mode." t)
58 ;;  (setq auto-mode-alist (append '(("\\.spec" . rpm-spec-mode))
59 ;;                                auto-mode-alist))
60 ;;------------------------------------------------------------
61 ;;
62
63 ;;; Code:
64
65 (defconst rpm-spec-mode-version "0.12" "Version of `rpm-spec-mode'.")
66
67 (defgroup rpm-spec nil
68   "RPM spec mode with Emacs/XEmacs enhancements."
69   :prefix "rpm-spec-"
70   :group 'languages)
71
72 (defcustom rpm-spec-build-command "rpmbuild"
73   "Command for building a RPM package."
74   :type 'string
75   :group 'rpm-spec)
76
77 (defcustom rpm-spec-add-attr nil
78   "Add \"%attr\" entry for file listings or not."
79   :type 'boolean
80   :group 'rpm-spec)
81
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."
86   :type 'boolean
87   :group 'rpm-spec)
88
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
93 timecheck age."
94   :type 'integer
95   :group 'rpm-spec)
96
97 (defcustom rpm-spec-buildroot ""
98   "Override the BuildRoot tag with directory <dir>."
99   :type 'string
100   :group 'rpm-spec)
101
102 (defcustom rpm-spec-target ""
103   "Interpret given string as `arch-vendor-os'.
104 Set the macros _target, _target_arch and _target_os accordingly"
105   :type 'string
106   :group 'rpm-spec)
107
108 (define-obsolete-variable-alias
109   'rpm-completion-ignore-case 'rpm-spec-completion-ignore-case)
110
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."
115   :type 'boolean
116   :group 'rpm-spec)
117
118 (defcustom rpm-spec-clean nil
119   "Remove the build tree after the packages are made."
120   :type 'boolean
121   :group 'rpm-spec)
122
123 (defcustom rpm-spec-rmsource nil
124   "Remove the source and spec file after the packages are made."
125   :type 'boolean
126   :group 'rpm-spec)
127
128 (defcustom rpm-spec-nobuild nil
129   "Do not execute any build stages.  Useful for testing out spec files."
130   :type 'boolean
131   :group 'rpm-spec)
132
133 (defcustom rpm-spec-sign-gpg nil
134   "Embed a GPG signature in the package.