mirror of
https://github.com/correl/melpa.git
synced 2024-11-24 19:19:52 +00:00
Fix builds where the *-pkg.el file is in a subdirectory (prefix)
This commit is contained in:
parent
877b5a3e61
commit
743322efcf
1 changed files with 14 additions and 12 deletions
|
@ -537,30 +537,32 @@ of the same-named package which is to be kept."
|
||||||
(copy-file pkgsrc pkgdst)
|
(copy-file pkgsrc pkgdst)
|
||||||
(pb/add-to-archive-contents pkg-info 'single)))
|
(pb/add-to-archive-contents pkg-info 'single)))
|
||||||
((< 1 (length files))
|
((< 1 (length files))
|
||||||
(let* ((pkg-dir (concat file-name "-" version))
|
(let* ((pkg-path-prefix
|
||||||
|
(file-name-as-directory (pb/common-path-prefix files)))
|
||||||
|
(pkg-files (mapcar
|
||||||
|
(lambda (fn) (pb/remove-prefix pkg-path-prefix fn))
|
||||||
|
files))
|
||||||
|
(pkg-dir (concat file-name "-" version))
|
||||||
(pkg-file (concat file-name "-pkg.el"))
|
(pkg-file (concat file-name "-pkg.el"))
|
||||||
(pkg-info
|
(pkg-info
|
||||||
(pb/merge-package-info
|
(pb/merge-package-info
|
||||||
(let ((default-directory pkg-cwd))
|
(let ((default-directory pkg-cwd))
|
||||||
(or (pb/get-pkg-file-info pkg-file)
|
(or (pb/get-pkg-file-info pkg-file)
|
||||||
|
(pb/get-pkg-file-info (concat pkg-path-prefix pkg-file))
|
||||||
;; 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
|
file-name
|
||||||
version
|
version
|
||||||
cfg))
|
cfg)))
|
||||||
(pkg-path-prefix
|
|
||||||
(file-name-as-directory (pb/common-path-prefix files))))
|
|
||||||
|
|
||||||
(when (file-exists-p pkg-dir)
|
(when (file-exists-p pkg-dir)
|
||||||
(delete-directory pkg-dir t nil))
|
(delete-directory pkg-dir t nil))
|
||||||
|
|
||||||
(mapc (lambda (fn)
|
(loop for src in files
|
||||||
(pb/copy-file (expand-file-name fn pkg-cwd)
|
for dst in pkg-files
|
||||||
(expand-file-name
|
do (pb/copy-file (expand-file-name src pkg-cwd)
|
||||||
(pb/remove-prefix pkg-path-prefix fn)
|
(expand-file-name dst pkg-dir)))
|
||||||
pkg-dir)))
|
|
||||||
files)
|
|
||||||
|
|
||||||
(pb/write-pkg-file (expand-file-name
|
(pb/write-pkg-file (expand-file-name
|
||||||
pkg-file
|
pkg-file
|
||||||
|
@ -571,13 +573,13 @@ of the same-named package which is to be kept."
|
||||||
pkg-info)
|
pkg-info)
|
||||||
|
|
||||||
(when files
|
(when files
|
||||||
(add-to-list 'files pkg-file))
|
(add-to-list 'pkg-files pkg-file))
|
||||||
|
|
||||||
(pb/create-tar
|
(pb/create-tar
|
||||||
(expand-file-name
|
(expand-file-name
|
||||||
(concat file-name "-" version ".tar") package-build-archive-dir)
|
(concat file-name "-" version ".tar") package-build-archive-dir)
|
||||||
pkg-dir
|
pkg-dir
|
||||||
(mapcar (lambda (fn) (pb/remove-prefix pkg-path-prefix fn)) files))
|
pkg-files)
|
||||||
|
|
||||||
(delete-directory pkg-dir t nil)
|
(delete-directory pkg-dir t nil)
|
||||||
(pb/add-to-archive-contents pkg-info 'tar)))
|
(pb/add-to-archive-contents pkg-info 'tar)))
|
||||||
|
|
Loading…
Reference in a new issue