pkg(python): refactor
This commit is contained in:
parent
170dbc419e
commit
13d5191d77
|
@ -1,24 +1,4 @@
|
||||||
LANGUAGE=python
|
LANGUAGE=python
|
||||||
VERSIONS=2.7.1 3.9.1
|
VERSIONS=2.7.1 3.9.1
|
||||||
|
|
||||||
.PHONY: build sign cleanup clean
|
include ../secondary.mk
|
||||||
build: $(patsubst %,%/${LANGUAGE}-%.pkg.tar.gz,${VERSIONS})
|
|
||||||
sign: $(patsubst %,%/${LANGUAGE}-%.pkg.tar.gz.asc,${VERSIONS})
|
|
||||||
clean:
|
|
||||||
rm -rf ${VERSIONS}
|
|
||||||
cleanup: $(patsubst %,%/cleanup,${VERSIONS})
|
|
||||||
|
|
||||||
|
|
||||||
%/cleanup: %/Makefile
|
|
||||||
$(MAKE) -C $(shell dirname $<) cleanup
|
|
||||||
rm $(shell dirname $<)/Makefile
|
|
||||||
|
|
||||||
%/${LANGUAGE}-%.pkg.tar.gz.asc: %/Makefile
|
|
||||||
$(MAKE) -C $(shell dirname $<) sign
|
|
||||||
%/${LANGUAGE}-%.pkg.tar.gz: %/Makefile
|
|
||||||
$(MAKE) -C $(shell dirname $<)
|
|
||||||
|
|
||||||
%/Makefile:
|
|
||||||
@mkdir -p $(shell dirname $@)
|
|
||||||
@echo 'VERSION=$(patsubst %/Makefile,%,$@)' > $@
|
|
||||||
@echo 'include ../base.mk' >> $@
|
|
|
@ -1,7 +1,5 @@
|
||||||
NAME=python
|
|
||||||
AUTHOR=Thomas Hobson <thomas@hexf.me>
|
AUTHOR=Thomas Hobson <thomas@hexf.me>
|
||||||
DEPS=
|
DEPS=
|
||||||
#VERSION=
|
|
||||||
COMPILED=false
|
COMPILED=false
|
||||||
|
|
||||||
include ../../common.mk
|
include ../../common.mk
|
||||||
|
@ -9,13 +7,13 @@ include ../../common.mk
|
||||||
run:
|
run:
|
||||||
echo 'python$(shell grep -oP "\d+.\d+"<<<${VERSION}) $$*' > run
|
echo 'python$(shell grep -oP "\d+.\d+"<<<${VERSION}) $$*' > run
|
||||||
|
|
||||||
python-${VERSION}/environment:
|
${NAME}-${VERSION}/environment:
|
||||||
echo 'export PATH=$$PWD/${NAME}-${VERSION}/bin:$$PATH' > $@
|
echo 'export PATH=$$PWD/${NAME}-${VERSION}/bin:$$PATH' > $@
|
||||||
|
|
||||||
python-${VERSION}/: Python-${VERSION}/
|
${NAME}-${VERSION}/: Python-${VERSION}/
|
||||||
cd $< && ./configure --prefix /
|
cd $< && ./configure --prefix /
|
||||||
$(MAKE) -j$(or ${MAKE_JOBS},64) -C $<
|
$(MAKE) -j$(or ${MAKE_JOBS},64) -C $<
|
||||||
DESTDIR=../$@ $(MAKE) -j$(or ${MAKE_JOBS},64) -C $< altinstall || true
|
DESTDIR=../$@ $(MAKE) -j$(or ${MAKE_JOBS},64) -C $< altinstall || true
|
||||||
|
|
||||||
Python-${VERSION}.tgz:
|
${NAME}-${VERSION}.tgz:
|
||||||
curl "https://www.python.org/ftp/python/${VERSION}/$@" -o $@
|
curl "https://www.python.org/ftp/python/${VERSION}/$@" -o $@
|
|
@ -0,0 +1,22 @@
|
||||||
|
.PHONY: build sign cleanup clean
|
||||||
|
build: $(patsubst %,%/${LANGUAGE}-%.pkg.tar.gz,${VERSIONS})
|
||||||
|
sign: $(patsubst %,%/${LANGUAGE}-%.pkg.tar.gz.asc,${VERSIONS})
|
||||||
|
clean:
|
||||||
|
rm -rf ${VERSIONS}
|
||||||
|
cleanup: $(patsubst %,%/cleanup,${VERSIONS})
|
||||||
|
|
||||||
|
|
||||||
|
%/cleanup: %/Makefile
|
||||||
|
$(MAKE) -C $(shell dirname $<) cleanup
|
||||||
|
rm $(shell dirname $<)/Makefile
|
||||||
|
|
||||||
|
%/${LANGUAGE}-%.pkg.tar.gz.asc: %/Makefile
|
||||||
|
$(MAKE) -C $(shell dirname $<) sign
|
||||||
|
%/${LANGUAGE}-%.pkg.tar.gz: %/Makefile
|
||||||
|
$(MAKE) -C $(shell dirname $<)
|
||||||
|
|
||||||
|
%/Makefile:
|
||||||
|
@mkdir -p $(shell dirname $@)
|
||||||
|
@echo 'VERSION=$(patsubst %/Makefile,%,$@)' > $@
|
||||||
|
@echo 'NAME=${LANGUAGE}' > $@
|
||||||
|
@echo 'include ../base.mk' >> $@
|
Loading…
Reference in New Issue