-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
;;; package-recipe.el --- External module `package-recipe' -*- lexical-binding: t; -*- | ||
;;; Commentary: | ||
;;; Code: | ||
|
||
(with-eval-after-load 'package-recipe | ||
;; Specializations of package-build classes and methods to define a | ||
;; directory based recipe. | ||
(defclass package-directory-recipe (package-recipe) | ||
((dir :initarg :dir :initform "."))) | ||
|
||
(cl-defmethod package-recipe--working-tree ((rcp package-directory-recipe)) | ||
(oref rcp dir)) | ||
|
||
(cl-defmethod package-build--get-commit ((_rcp package-directory-recipe)))) | ||
|
||
;;; package-recipe.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
;;; package.el --- Build a package artefact -*- lexical-binding: t; -*- | ||
|
||
;;; Commentary: | ||
;; | ||
;; Build a package artefact, and put it into the given destination | ||
;; | ||
;; $ eask package [dest] | ||
;; | ||
;; | ||
;; Positional options: | ||
;; | ||
;; [dest] destination path/folder | ||
;; | ||
|
||
;;; Code: | ||
|
||
(load-file (expand-file-name | ||
"_prepare.el" | ||
(file-name-directory (nth 1 (member "-scriptload" command-line-args))))) | ||
|
||
(defconst eask-dist-path "dist" | ||
"Name of default target directory for building packages.") | ||
|
||
(eask-start | ||
(let ((dest (or (eask-argv 0) eask-dist-path))) | ||
(ignore-errors (make-directory (expand-file-name dest) t)) | ||
|
||
(eask-package-install 'package-build) | ||
(require 'package-recipe) | ||
(eask-load "./extern/package-build") ; override | ||
(eask-load "./extern/package-recipe") | ||
|
||
(let* ((name (eask-guess-package-name)) | ||
(patterns (or eask-files package-build-default-files-spec)) | ||
(path default-directory) | ||
(version (eask-package-get :version)) | ||
(rcp (package-directory-recipe name :name name :files patterns :dir path)) | ||
(package-build-working-dir path) | ||
(package-build-archive-dir (expand-file-name dest))) | ||
(package-build--package rcp version)) | ||
(message "\n Done."))) | ||
|
||
;;; package.el ends here |