forked from Eugeny/reconfigure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (61 loc) · 1.96 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
PYTHON=`which python`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/reconfigure
RPMTOPDIR=$(CURDIR)/build
PROJECT=reconfigure
DEBPROJECT=python-reconfigure
VERSION=`python -c "from reconfigure import __version__; print __version__"`
PREFIX=/usr
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
DOCBUILDDIR = docs/build
DOCSOURCEDIR = docs/source
ALLSPHINXOPTS = -d $(DOCBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(DOCSOURCEDIR)
all:
build:
doc:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
cdoc:
rm -rf $(DOCBUILDDIR)/*
make doc
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) --prefix $(PREFIX)
rpm: build tgz
rm -rf dist/*.rpm
cat dist/$(PROJECT).spec.in | sed s/__VERSION__/$(VERSION)/g > $(PROJECT).spec
mkdir -p build/SOURCES || true
cp dist/$(PROJECT)*.tar.gz build/SOURCES
rpmbuild --define '_topdir $(RPMTOPDIR)' -bb $(PROJECT).spec
mv build/RPMS/noarch/$(PROJECT)*.rpm dist
rm $(PROJECT).spec
deb: build tgz
rm -rf dist/*.deb
cat debian/changelog.in | sed s/__VERSION__/$(VERSION)/g | sed "s/__DATE__/$(DATE)/g" > debian/changelog
cp dist/$(PROJECT)*.tar.gz ..
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(DEBPROJECT)_$$1\.orig\.tar\.gz/' ../*
dpkg-buildpackage -b -rfakeroot -us -uc
mv ../$(DEBPROJECT)*.deb dist/
rm ../$(DEBPROJECT)*.orig.tar.gz
rm ../$(DEBPROJECT)*.changes
rm debian/changelog
upload-deb: deb
scp dist/*.deb [email protected]:/srv/repo/ng/debian
ssh [email protected] /srv/repo/rebuild-debian.sh
upload-rpm: rpm
scp dist/*.rpm [email protected]:/srv/repo/ng/centos/6
ssh [email protected] /srv/repo/rebuild-centos.sh
upload-tgz: tgz
$(PYTHON) setup.py sdist upload
tgz: build
rm dist/*.tar.gz || true
$(PYTHON) setup.py sdist
clean:
$(PYTHON) setup.py clean
rm -rf $(DOCBUILDDIR)/*
rm -rf build/ debian/$(PROJECT)* debian/*stamp* debian/files MANIFEST *.egg-info
find . -name '*.pyc' -delete
test:
nosetests -v