Permalink
Browse files

Add the package source to the package description

  • Loading branch information...
1 parent d094349 commit 4119ac1741ad1ff96679487dc617235b5b5f3060 David Leatherman committed Apr 11, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 package-build.el
View
@@ -365,19 +365,20 @@ The file is written to `package-build-working-dir'."
(nth 2 pkgfile-info)
(nth 1 pkgfile-info)))))
-
(defun pb/expand-file-list (dir files)
"In DIR, expand FILES, some of which may be shell-style wildcards."
(let ((default-directory dir))
(mapcan 'file-expand-wildcards files)))
-(defun pb/merge-package-info (pkg-info name version)
+(defun pb/merge-package-info (config pkg-info name version)
"Return a version of PKG-INFO updated with NAME and VERSION.
If PKG-INFO is nil, an empty one is created."
- (let ((merged (or (copy-seq pkg-info)
- (vector name nil "No description available." version))))
- (aset merged 3 version)
+ (let* ((merged (or (copy-seq pkg-info)
+ (vector name nil "No description available." version))))
(aset merged 0 (downcase name))
+ (aset merged 2 (format "%s [Packaged source: %s]"
+ (aref merged 2) (plist-get config :fetcher)))
+ (aset merged 3 version)
merged))
(defun pb/dump-archive-contents ()
@@ -437,6 +438,7 @@ If PKG-INFO is nil, an empty one is created."
(concat file-name "-" version ".el")
package-build-archive-dir))
(pkg-info (pb/merge-package-info
+ cfg
(pb/get-package-info pkgsrc)
file-name
version)))
@@ -450,6 +452,7 @@ If PKG-INFO is nil, an empty one is created."
(pkg-file (concat file-name "-pkg.el"))
(pkg-info
(pb/merge-package-info
+ cfg
(let ((default-directory pkg-cwd))
(or (pb/get-pkg-file-info pkg-file)
;; some packages (like magit) provide name-pkg.el.in

0 comments on commit 4119ac1

Please sign in to comment.