Skip to content

Commit

Permalink
Move package-build.el to a separate repository
Browse files Browse the repository at this point in the history
This commit removes "package-build.el" and adjusts "Makefile" to expect
that file to be located in "package-build/" instead of at the top-level.

This commit also adjusts the documentation and adds a new make target
"pull-package-build" which performs a subtree merge after fetching from
the "package-build" repository.

This commit does not move the library into the subdirectory.  The file
is removed without being added at the new location.  The next commit
will add the new repository as a subtree using "git subtree".

The move to a subtree is split across two commits because the second
commit as described above has to be a merge commit and one shouldn't
install any changes in a merge commit that do not come from the merged
branch or are the result of conflicts.
  • Loading branch information
tarsius committed Aug 12, 2016
1 parent 2fe69ac commit 948fb86
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 1,524 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Let `<NAME>` denote the name of the recipe to submit.
2. Add your new file under the directory specified by
`package-build-recipes-dir` (default: `recipes/` directory where
`package-build` was loaded). If you prefer, the interactive command
`package-build-create-recipe` in `package-build.el` will guide you
through this process.
`package-build-create-recipe` in `package-build/package-build.el` will
guide you through this process.

3. Confirm your package builds properly by running

Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ifeq ($(NEED_CL-LIB), t)
EMACS_COMMAND := $(EMACS_COMMAND) --eval "(package-initialize)"
endif

EVAL := $(EMACS_COMMAND) --no-site-file --batch -l package-build.el --eval
EVAL := $(EMACS_COMMAND) --no-site-file --batch -l package-build/package-build.el --eval

TIMEOUT := $(shell which timeout && echo "-k 60 600")

Expand Down Expand Up @@ -56,6 +56,9 @@ sync:
chmod -R go+rx $(WEBROOT)/packages/*


pull-package-build:
git subtree pull --squash -P package-build package-build master

clean: clean-working clean-packages clean-json clean-sandbox

packages: $(RCPDIR)/*
Expand All @@ -65,16 +68,16 @@ packages/archive-contents: .FORCE
$(EVAL) '(package-build-dump-archive-contents)'

cleanup:
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--this-dir))) (package-build-cleanup))'
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--melpa-base))) (package-build-cleanup))'

## Json rules
html/archive.json: $(PKGDIR)/archive-contents
@echo " • Building $@ ..."
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--this-dir))) (package-build-archive-alist-as-json "html/archive.json"))'
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--melpa-base))) (package-build-archive-alist-as-json "html/archive.json"))'

html/recipes.json: $(RCPDIR)/.dirstamp
@echo " • Building $@ ..."
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--this-dir))) (package-build-recipe-alist-as-json "html/recipes.json"))'
$(EVAL) '(let ((package-build-stable $(STABLE)) (package-build-archive-dir (expand-file-name "$(PKGDIR)/" package-build--melpa-base))) (package-build-recipe-alist-as-json "html/recipes.json"))'

json: html/archive.json html/recipes.json

Expand All @@ -87,7 +90,7 @@ $(RCPDIR)/.dirstamp: .FORCE
$(RCPDIR)/%: .FORCE
@echo " • Building recipe $(@F) ..."

- $(TIMEOUT) $(EVAL) "(let ((package-build-stable $(STABLE)) (package-build-write-melpa-badge-images t) (package-build-archive-dir (expand-file-name \"$(PKGDIR)\" package-build--this-dir))) (package-build-archive '$(@F)))"
- $(TIMEOUT) $(EVAL) "(let ((package-build-stable $(STABLE)) (package-build-write-melpa-badge-images t) (package-build-archive-dir (expand-file-name \"$(PKGDIR)\" package-build--melpa-base))) (package-build-archive '$(@F)))"

@echo " ✓ Wrote $$(ls -lsh $(PKGDIR)/$(@F)-*) "
@echo " Sleeping for $(SLEEP) ..."
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ format.

## API

All repository code is contained in the `package-build.el`.
All repository code is contained in the file
`package-build/package-build.el`. That code is maintained in a
[separate repository](https://github.com/melpa/package-build): the version
in the MELPA repository is imported using `git subtree`.

### Functions

Expand Down
2 changes: 1 addition & 1 deletion features/support/env.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(setq melpa-root-path project-directory)
(setq melpa-util-path (expand-file-name "util" melpa-root-path)))

(add-to-list 'load-path melpa-root-path)
(add-to-list 'load-path (expand-file-name "package-build" melpa-root-path))
(add-to-list 'load-path (expand-file-name "espuds" melpa-util-path))

(require 'package)
Expand Down
Loading

0 comments on commit 948fb86

Please sign in to comment.