-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.pkg
60 lines (37 loc) · 1.04 KB
/
Makefile.pkg
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
# versions
VERSION = 1.8.10
PYTHON_VERSION = 2.5
# packages
TAR = summon-$(VERSION).tar.gz
RPM = summon-$(VERSION)-1.i386.rpm
ZIP = summon-$(VERSION).zip
WININST = summon-$(VERSION).win32-py$(PYTHON_VERSION).exe
# upload variables
WWW_DIR = public_html/summon/download
WWW_HOST = [email protected]
UPLOAD = dist/$(TAR) dist/$(ZIP) dist/$(RPM)
#dist/$(WININST)
# package targets
pkg:: $(UPLOAD)
dist/$(TAR):
rm -f MANIFEST
python setup.py sdist
dist/$(ZIP):
python setup.py sdist --format=zip
dist/$(RPM):
python setup.py bdist --format=rpm
wininstall: dist/$(WININST)
dist/$(WININST):
wine start make-wininst.bat
# publish packages to website
pub:: $(UPLOAD)
scp $(UPLOAD) $(WWW_HOST):$(WWW_DIR)
ssh $(WWW_HOST) "chmod o+r $(WWW_DIR)/$(TAR); \
chmod o+r $(WWW_DIR)/$(RPM); \
chmod o+r $(WWW_DIR)/$(WININST); \
tar zxvf $(WWW_DIR)/$(TAR) -C $(WWW_DIR); \
chmod -R o+rx $(WWW_DIR)/summon-$(VERSION)"
pypi:
python setup.py register
clean:
rm -rf $(UPLOAD)