-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
73 lines (60 loc) · 2.08 KB
/
Makefile
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
# These are rules for building various types of distributions of this
# module. This Makefile is known to work on an Ubuntu 11.04 and builds
# the following packages:
#
# - Source .tar.gz distribution
# - Source and binary (noarch) .rpm for: RHEL 4/5/6, Fedora 13/14/15
# - Binary (all) .deb
#
dist: .deb .rpm .targz
@echo ======= BUILD OK =====================
@ls -l dist/
VERSION=`python setup.py --version`
.targz:
@echo ======= .TAR.GZ =====================
@python setup.py sdist
@touch .targz
.deb: .targz debian/control.in setup.py Makefile
@echo ======= .DEB =====================
@rm -f setup.cfg
@cp -v dist/SocksipyChain*tar.gz \
../python-socksipychain-$(VERSION)_$(VERSION).orig.tar.gz
@sed -e "s/@VERSION@/$(VERSION)/g" \
< debian/control.in >debian/control
@sed -e "s/@VERSION@/$(VERSION)/g" \
< debian/copyright.in >debian/copyright
@sed -e "s/@VERSION@/$(VERSION)/g" \
-e "s/@DATE@/`date -R`/g" \
< debian/changelog.in >debian/changelog
@debuild -i -us -uc -b
@mv ../python-socksipychain_*.deb dist/
@rm ../python-socksipychain-*
@touch .deb
.rpm: rpm_el4 rpm_el5 rpm_el6-fc13 rpm_fc14-15 rpm_fc16-17
@touch .rpm
rpm_fc16-17:
@./scripts/rpm-setup.sh 0pagekite_fc16fc17 /usr/lib/python2.7/site-packages
@make rpm
rpm_fc14-15:
@./scripts/rpm-setup.sh 0pagekite_fc14fc15 /usr/lib/python2.7/site-packages
@make rpm
rpm_el4:
@./scripts/rpm-setup.sh 0pagekite_el4 /usr/lib/python2.3/site-packages
@make rpm
rpm_el5:
@./scripts/rpm-setup.sh 0pagekite_el5 /usr/lib/python2.4/site-packages
@make rpm
rpm_el6-fc13:
@./scripts/rpm-setup.sh 0pagekite_el6fc13 /usr/lib/python2.6/site-packages
@make rpm
rpm: setup.py sockschain/__init__.py Makefile
@echo ======= .RPM =====================
@sed -i -e 's/"Socks/"python-Socks/g' setup.py
@python setup.py bdist_rpm --install scripts/rpm-install.sh
@sed -i -e 's/"python-Socks/"Socks/g' setup.py
clean:
@rm -rf .rpm .targz .deb build MANIFEST *.egg-info setup.cfg
@rm -rf debian/files debian/control debian/copyright debian/python-*
@rm -rf debian/changelog
distclean: clean
@rm -rf dist/*