-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathMakefile
More file actions
111 lines (86 loc) · 3.36 KB
/
Makefile
File metadata and controls
111 lines (86 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Makefile for building combined pagekite.py files.
export PYTHONPATH := .
#PATH_SIX = $(shell python3 -c 'import six; print(six.__file__.replace(".pyc", ".py"))')
zipapp: build/six.py build/legacy_cgi.py sockschain
python3 ./scripts/zipapp.py \
--shebonk \
--python=python3,python \
--preamble=pagekite/__main__.py \
--main='pagekite.__main__:main' \
--compress \
--output=pagekite-tmp.py \
pagekite sockschain build/six.py build/legacy_cgi.py
@chmod +x pagekite-tmp.py
@cp -v pagekite-tmp.py dist/pagekite-`python3 setup.py --version`.py
sockschain:
ln -s ../PySocksipyChain/sockschain/ .
build/legacy_cgi.py:
mkdir -p build
curl https://raw.githubusercontent.com/jackrosenthal/legacy-cgi/refs/heads/main/cgi.py \
>build/legacy_cgi.py
build/six.py:
mkdir -p build
curl https://raw.githubusercontent.com/benjaminp/six/refs/heads/main/six.py \
>build/six.py
combined: pagekite tools doc/MANPAGE.md dev .header defaults.cfg zipapp
@./scripts/blackbox-test.sh ./pagekite-tmp.py - \
&& ./scripts/blackbox-test.sh ./pagekite-tmp.py - --nopyopenssl \
&& ./scripts/blackbox-test.sh ./pagekite-tmp.py - --nossl \
&& ./scripts/blackbox-test.sh ./pagekite-tmp.py - --tls_legacy
@killall pagekite-tmp.py || true
@mv pagekite-tmp.py dist/pagekite-`python3 setup.py --version`.py
@ls -l dist/pagekite-*.py
untested: pagekite tools doc/MANPAGE.md dev .header defaults.cfg zipapp
@ls -l dist/pagekite-*.py
doc/MANPAGE.md: pagekite pagekite/manual.py
@python3 -m pagekite.manual --nopy --markdown >doc/MANPAGE.md
doc/pagekite.1: pagekite pagekite/manual.py
@python3 -m pagekite.manual --nopy --man >doc/pagekite.1
dist: combined .deb
alldeb: .deb
VERSION=`python3 setup.py --version`
DEB_VERSION=`head -n1 debian/changelog | sed -e "s+.*(\(.*\)).*+\1+"`
.debprep:
@ln -sf deb debian
if [ "x$(VERSION)" != "x$(DEB_VERSION)" ] ; \
then \
dch --maintmaint --newversion $(VERSION) --urgency=low \
--distribution=unstable "New release." ; \
fi
.targz:
@python3 setup.py sdist
.deb: .debprep
@debuild -i -us -uc
@mv ../pagekite*.deb ../python*-pagekite_*.deb dist/
.header: pagekite doc/header.txt
@sed -e "s/@VERSION@/$(VERSION)/g" \
< doc/header.txt >.header
test: dev
@./scripts/blackbox-test.sh ./pk -
@./scripts/blackbox-test.sh ./pk - --nopyopenssl
@./scripts/blackbox-test.sh ./pk - --nossl
@./scripts/blackbox-test.sh ./pk - --tls_legacy
@(for pkb in scripts/legacy-testing/*py; do \
./scripts/blackbox-test.sh $$pkb ./pk --nossl && \
./scripts/blackbox-test.sh $$pkb ./pk || \
./scripts/blackbox-test.sh $$pkb ./pk --tls_legacy \
;done)
pagekite: pagekite/__init__.py pagekite/httpd.py pagekite/__main__.py
dev: sockschain
@rm -f .SELF
@ln -fs . .SELF
@echo export PYTHONPATH=`pwd`
@echo export HTTP_PROXY=
@echo export http_proxy=
sockschain:
@ln -fs ../PySocksipyChain/sockschain .
tools: scripts/breeder.py Makefile
scripts/breeder.py:
@ln -fs ../../PyBreeder/breeder.py scripts/breeder.py
distclean: clean
@rm -rvf dist/*.*
clean:
[ -e debian ] && debuild clean || true
@rm -vf sockschain *.py[co] */*.py[co] */*/*.py[co] scripts/breeder.py .SELF
@rm -vf .appver pagekite-tmp.py MANIFEST setup.cfg
@rm -vrf debian *.egg-info .header doc/pagekite.1 build/