diff --git a/packages/.gitignore b/packages/.gitignore new file mode 100644 index 0000000..022537b --- /dev/null +++ b/packages/.gitignore @@ -0,0 +1,3 @@ +* +!Makefile +!.gitignore \ No newline at end of file diff --git a/packages/Makefile b/packages/Makefile index 56fba4f..52345bc 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -5,10 +5,10 @@ LANG_DEPS=$(or ${DEPS}) LANG_BINARY_FILES=$(or ${BINARY_FILES},) ${LANG_NAME}-${LANG_VERSION}.pkg.tar.gz: pkg-info.json package.squashfs - tar czvf $@ $* + tar czvf $@ $? package.squashfs: ${LANG_BINARY_FILES} - mksquashfs $* $@ + mksquashfs $? $@ %.json: %.jq jq '$(shell tr '\n' '|' < $<).' <<< "{}" > $@ @@ -20,3 +20,7 @@ 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 *)) + \ No newline at end of file diff --git a/packages/python/3.9.1/Makefile b/packages/python/3.9.1/Makefile index ebfa3fe..d77b69a 100644 --- a/packages/python/3.9.1/Makefile +++ b/packages/python/3.9.1/Makefile @@ -2,16 +2,24 @@ NAME=python VERSION=3.9.1 AUTHOR=Thomas Hobson DEPS= -BINARY_FILES= +BINARY_FILES=out/ run + +MAKE_JOBS=64 include ../../Makefile -bin: +run: + echo "bin/python3.9 $*" > run + +out/: Python-${VERSION}/ + cd $< && ./configure --prefix / + make -j${MAKE_JOBS} -C $< + DESTDIR=../out make -j${MAKE_JOBS} -C $< altinstall Python-${VERSION}.tgz: - curl "https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz" -O $@ + curl "https://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz" -o $@ -%: %.tgz - tar xzvf $@ +%/: %.tgz + tar xzvf $<