Compare commits
3 Commits
3103721c8e
...
36102f22b4
Author | SHA1 | Date |
---|---|---|
Thomas Hobson | 36102f22b4 | |
Thomas Hobson | e2c8427a7a | |
Thomas Hobson | d57b1f0fd4 |
|
@ -0,0 +1,3 @@
|
||||||
|
*
|
||||||
|
!**/Makefile
|
||||||
|
!.gitignore
|
|
@ -0,0 +1,28 @@
|
||||||
|
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)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf $(filter-out Makefile, $(wildcard *))
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
NAME=python
|
||||||
|
VERSION=3.9.1
|
||||||
|
AUTHOR=Thomas Hobson <thomas@hexf.me>
|
||||||
|
DEPS=
|
||||||
|
COMPILED=false
|
||||||
|
|
||||||
|
MAKE_JOBS=64
|
||||||
|
|
||||||
|
include ../../Makefile
|
||||||
|
|
||||||
|
run:
|
||||||
|
echo "python3.9 $*" > run
|
||||||
|
|
||||||
|
python-${VERSION}/environment:
|
||||||
|
echo 'export PATH=$$PWD/python-${VERSION}/bin:$$PATH' > $@
|
||||||
|
|
||||||
|
python-${VERSION}/: Python-${VERSION}/
|
||||||
|
cd $< && ./configure --prefix /
|
||||||
|
make -j${MAKE_JOBS} -C $<
|
||||||
|
DESTDIR=../$@ make -j${MAKE_JOBS} -C $< altinstall || true
|
||||||
|
|
||||||
|
Python-${VERSION}.tgz:
|
||||||
|
curl "https://www.python.org/ftp/python/${VERSION}/$@" -o $@
|
||||||
|
|
||||||
|
%/: %.tgz
|
||||||
|
tar xzvf $<
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue