-
Notifications
You must be signed in to change notification settings - Fork 601
/
Makefile
117 lines (90 loc) · 3.33 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
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
111
112
113
114
115
116
117
DESTDIR=/
PROJECT=diamond
VERSION :=$(shell bash version.sh )
RELEASE :=$(shell ls -1 dist/*.noarch.rpm 2>/dev/null | wc -l )
HASH :=$(shell git rev-parse HEAD )
DISTRO=precise
all:
@echo "make run - Run Diamond from this directory"
@echo "make config - Run a simple configuration CLI program"
@echo "make watch - Watch and continuously run tests"
@echo "make test - Run tests"
@echo "make docs - Build docs"
@echo "make sdist - Create source package"
@echo "make bdist - Create binary package"
@echo "make pypi - Update PyPI package"
@echo "make install - Install on local system"
@echo "make develop - Install on local system in development mode"
@echo "make rpm - Generate a rpm package"
@echo "make deb - Generate a deb package"
@echo "make sdeb - Generate a deb source package"
@echo "make ebuild - Generate a ebuild package"
@echo "make tar - Generate a tar ball"
@echo "make clean - Get rid of scratch and byte files"
run:
./bin/diamond --configfile=conf/diamond.conf --foreground --log-stdout
config:
./bin/diamond-setup --configfile=conf/diamond.conf
watch:
watchr test.watchr
test:
./test.py
docs: version
./build_doc.py --configfile=conf/diamond.conf
make test
sdist: version
./setup.py sdist --prune
bdist: version
./setup.py bdist --prune
bdist_wheel: version
USE_SETUPTOOLS=1 ./setup.py bdist_wheel
install: version
./setup.py install --root $(DESTDIR)
develop: version
USE_SETUPTOOLS=1 ./setup.py develop
rpm: buildrpm
buildrpm: sdist
./setup.py bdist_rpm \
--release=`ls dist/*.noarch.rpm | wc -l` \
--build-requires='python, python-configobj, python-setuptools' \
--requires='python, python-configobj, python-setuptools'
deb: builddeb
sdeb: buildsourcedeb
builddeb: version
dch --newversion $(VERSION) --distribution unstable --force-distribution -b "Last Commit: $(shell git log -1 --pretty=format:'(%ai) %H %cn <%ce>')"
dch --release "new upstream"
./setup.py sdist --prune
mkdir -p build
tar -C build -zxf dist/$(PROJECT)-$(VERSION).tar.gz
(cd build/$(PROJECT)-$(VERSION) && debuild --no-tgz-check -us -uc -v$(VERSION))
@echo "Package is at build/$(PROJECT)_$(VERSION)_all.deb"
buildsourcedeb: version
dch --newversion $(VERSION)~$(DISTRO) --distribution $(DISTRO) --force-distribution -b "Last Commit: $(shell git log -1 --pretty=format:'(%ai) %H %cn <%ce>')"
dch --release "new upstream"
./setup.py sdist --prune
mkdir -p build
tar -C build -zxf dist/$(PROJECT)-$(VERSION).tar.gz
(cd build/$(PROJECT)-$(VERSION) && debuild -S -sa -v$(VERSION))
@echo "Source package is at build/$(PROJECT)_$(VERSION)~$(DISTRO)_source.changes"