el-get/recipes/emacs-goodies-el.rcp
Dimitri Fontaine d904dabfe7 Update emacs-goodies-el
Apparently upstream did stop shipping the vm tricks.
2014-05-16 10:25:36 +02:00

129 lines
6.4 KiB
Plaintext

;; The advantage of installing this via a tarball instead of using apt
;; is that you can install it on non-Debian systems, and you can use
;; it even if you're not using the system emacs on Debian (for
;; example, if you have compiled and installed emacs in your home
;; directory).
(:name emacs-goodies-el
:website "http://packages.debian.org/sid/emacs-goodies-el"
:description "Miscellaneous add-ons for Emacs"
:type http-tar
:url "http://alioth.debian.org/snapshots.php?group_id=30060"
:options ("xzf")
:build
(let* ((pdir (el-get-package-directory 'emacs-goodies-el))
;; This will return "PDIR" or
;; "PDIR/pkg-goodies-el-YYYY-MM-DD" depending on whether
;; tar-cleanup-extract-hook has run already.
(pkg-goodies-dir
(or (car (directory-files pdir 'full "^pkg-goodies-el-"))
pdir))
(default-directory
(file-name-as-directory
(expand-file-name "emacs-goodies-el"
pkg-goodies-dir))))
;; the :build elisp form is evaluated to build the
;; command list before
;; el-get-http-tar-cleanup-extract-hook but the
;; commands are run afterward, so the directory
;; structure is different.
(el-get-verbose-message "Building commands from %s" default-directory)
(el-get-verbose-message "Expecting commands to run in %s" pdir)
(append
;; Apply all patches
(mapcar
(lambda (patch-file)
(list "patch" "-p1" "-f" "--no-backup-if-mismatch"
;; Post-cleanup paths
"-i" (expand-file-name patch-file (expand-file-name "emacs-goodies-el/debian/patches" pdir))
"-d" (expand-file-name "emacs-goodies-el" pdir)))
(with-temp-buffer
;; Pre-cleanup path
(insert-file-contents "debian/patches/series")
(split-string (buffer-string) "\n" t)))
;; Run all "*.make" files
(let ((makerfiles
;; Will return relative file names
(split-string (shell-command-to-string "find . -name '*.make'"))))
(el-get-verbose-message "Makerfiles: %S" makerfiles)
(mapcar
(lambda (makerfile)
;; `maker-dir' is post-cleanup path
(let* ((maker-dir (expand-file-name (file-name-directory makerfile) (expand-file-name "emacs-goodies-el" pdir)))
(maker-command
(replace-regexp-in-string
"\n" ""
(replace-regexp-in-string
"emacs -batch" (concat el-get-emacs " -batch")
(with-temp-buffer
(insert-file-contents makerfile)
(buffer-string))))))
(format "cd %s && %s" maker-dir maker-command)))
makerfiles))))
:load-path ("emacs-goodies-el/elisp/debian-el"
"emacs-goodies-el/elisp/devscripts-el"
"emacs-goodies-el/elisp/dpkg-dev-el"
"emacs-goodies-el/elisp/emacs-goodies-el"
;; "emacs-goodies-el/elisp/gnus-bonus-el"
;; "emacs-goodies-el/elisp/vm-bonus-el"
)
;; The :features and :post-init are taken from the
;; debain/*.emacsen-startup files in the source package.
;; Some of these files just require specific features,
;; and those are added to :features. Others have some
;; significant init code, and this has been manually
;; copied into :post-init. The emacsen-startup files
;; cannot be used directly because they have hardcoded
;; paths to where dpkg would install the packages.
:features (emacs-goodies-el
debian-el
dpkg-dev-el)
:post-init
(progn
;; autoloads for devscripts.el
(autoload 'debuild "devscripts" "Run debuild in the current directory." t)
(autoload 'debc "devscripts" "Run debc in the current directory." t)
(autoload 'debi "devscripts" "Run debi in the current directory." t)
(autoload 'debit "devscripts" "Run debit in the current directory." t)
(autoload 'debdiff "devscripts" "Compare contents of CHANGES-FILE-1 and CHANGES-FILE-2." t)
(autoload 'debdiff-current "devscripts" "Compare the contents of .changes file of current version with previous version;
requires access to debian/changelog, and being in debian/ dir." t)
(autoload 'debclean "devscripts" "Run debclean in the current directory." t)
(autoload 'pdebuild "pbuilder-mode" "Run pdebuild in the current directory." t)
(autoload 'pdebuild-user-mode-linux "pbuilder-mode" "Run pdebuild-user-mode-linux in the current directory." t)
(autoload 'pbuilder-log-view-elserv "pbuilder-log-view-mode" "Run a elserv session with log view.
Running this requires elserv. Use elserv, and do `elserv-start' before invoking this command." t)
(autoload 'debuild-pbuilder "pbuilder-mode" "Run debuild-pbuilder in the current directory." t)
(autoload 'pbuilder-build "pbuilder-mode" "Run pbuilder-build for the given filename." t)
(autoload 'pbuilder-user-mode-linux-build "pbuilder-mode" "Run pbuilder-user-mode-linux for the given filename." t)
;; from "debian/vm-bonus-el.emacsen-startup"
;; (defgroup vm-bonus-el nil
;; "Customize vm-bonus-el Debian packages."
;; :group 'vm)
;; vm-bogofilter.el
;; (defgroup vm-bogofilter nil
;; "VM Spam Filter Options"
;; :group 'vm
;; :group 'vm-bonus-el
;; :load 'vm-bogofilter)
;; (autoload 'vm-bogofilter-setup "vm-bogofilter"
;; "Initialize vm-bogofilter."
;; t)
;; (defcustom vm-bogofilter-setup nil
;; "Whether to initialize vm-bogofilter on startup.
;; vm-bogofilter interfaces VM with the bogofilter spam filter."
;; :type 'boolean
;; :set (lambda (symbol value)
;; (set-default symbol value)
;; (when value
;; (vm-bogofilter-setup)))
;; :load 'vm-bogofilter
;; :group 'vm
;; :group 'vm-bogofilter
;; :group 'vm-bonus-el)
))