mirror of
https://github.com/engineer-man/piston.git
synced 2025-06-07 18:56:26 +02:00
Better python packaging
This commit is contained in:
parent
51b06018c1
commit
4f3e7a536d
6 changed files with 54 additions and 32 deletions
|
@ -1,33 +0,0 @@
|
|||
LANG_NAME=$(or ${NAME},none)
|
||||
LANG_VERSION=$(or ${VERSION},0.0.0)
|
||||
LANG_AUTHOR=$(or ${AUTHOR},HexF <thomas@hexf.me>)
|
||||
LANG_DEPS=$(or ${DEPS})
|
||||
LANG_COMPILED=$(or ${COMPILED}, false)
|
||||
|
||||
LANG_PKG_TARGETS=pkg-info.json ${LANG_NAME}-${LANG_VERSION}/ ${LANG_NAME}-${LANG_VERSION}/environment run
|
||||
|
||||
ifeq (${LANG_COMPILED}, true)
|
||||
${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: $(LANG_PKG_TARGETS) compile
|
||||
endif
|
||||
${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: $(LANG_PKG_TARGETS)
|
||||
tar czvf $@ $?
|
||||
|
||||
%.json: %.jq
|
||||
jq '$(shell tr '\n' '|' < $<).' <<< "{}" > $@
|
||||
|
||||
pkg-info.jq:
|
||||
echo '.language="${LANG_NAME}"' > pkg-info.jq
|
||||
echo '.version="${LANG_VERSION}"' >> pkg-info.jq
|
||||
echo '.author="${LANG_AUTHOR}"' >> pkg-info.jq
|
||||
echo '.dependencies={}' >> pkg-info.jq
|
||||
$(foreach dep, ${LANG_DEPS}, echo '.dependencies.$(word 1,$(subst =, ,${dep}))="$(word 2,$(subst =, ,${dep}))"' >> pkg-info.jq)
|
||||
|
||||
%.asc: %
|
||||
gpg --detach-sig --armor --output $@ $<
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf $(filter-out Makefile, $(wildcard *))
|
||||
|
||||
.PHONY: sign
|
||||
sign: ${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz.asc
|
Loading…
Add table
Add a link
Reference in a new issue