Merge pull request #55 from leathekd/master

Add the package source to the package description

OK lets do this.
This commit is contained in:
Donald Ephraim Curtis 2012-04-12 07:00:27 -07:00
commit 8edf95d725

View file

@ -365,19 +365,20 @@ The file is written to `package-build-working-dir'."
(nth 2 pkgfile-info) (nth 2 pkgfile-info)
(nth 1 pkgfile-info))))) (nth 1 pkgfile-info)))))
(defun pb/expand-file-list (dir files) (defun pb/expand-file-list (dir files)
"In DIR, expand FILES, some of which may be shell-style wildcards." "In DIR, expand FILES, some of which may be shell-style wildcards."
(let ((default-directory dir)) (let ((default-directory dir))
(mapcan 'file-expand-wildcards files))) (mapcan 'file-expand-wildcards files)))
(defun pb/merge-package-info (pkg-info name version) (defun pb/merge-package-info (pkg-info name version config)
"Return a version of PKG-INFO updated with NAME and VERSION. "Return a version of PKG-INFO updated with NAME and VERSION.
If PKG-INFO is nil, an empty one is created." If PKG-INFO is nil, an empty one is created."
(let ((merged (or (copy-seq pkg-info) (let* ((merged (or (copy-seq pkg-info)
(vector name nil "No description available." version)))) (vector name nil "No description available." version))))
(aset merged 3 version)
(aset merged 0 (downcase name)) (aset merged 0 (downcase name))
(aset merged 2 (format "%s [source: %s]"
(aref merged 2) (plist-get config :fetcher)))
(aset merged 3 version)
merged)) merged))
(defun pb/dump-archive-contents () (defun pb/dump-archive-contents ()
@ -439,7 +440,8 @@ If PKG-INFO is nil, an empty one is created."
(pkg-info (pb/merge-package-info (pkg-info (pb/merge-package-info
(pb/get-package-info pkgsrc) (pb/get-package-info pkgsrc)
file-name file-name
version))) version
cfg)))
(print pkg-info) (print pkg-info)
(when (file-exists-p pkgdst) (when (file-exists-p pkgdst)
(delete-file pkgdst t)) (delete-file pkgdst t))
@ -455,7 +457,9 @@ If PKG-INFO is nil, an empty one is created."
;; some packages (like magit) provide name-pkg.el.in ;; some packages (like magit) provide name-pkg.el.in
(pb/get-pkg-file-info (concat pkg-file ".in")) (pb/get-pkg-file-info (concat pkg-file ".in"))
(pb/get-package-info (concat file-name ".el")))) (pb/get-package-info (concat file-name ".el"))))
file-name version))) file-name
version
cfg)))
(print pkg-info) (print pkg-info)
(copy-directory file-name pkg-dir) (copy-directory file-name pkg-dir)