forked from arkOScloud/genesis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (46 loc) · 1.45 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
PYTHON=`which python`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/genesis
PROJECT=genesis
VERSION=0.6.3
PREFIX=/usr
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
DOCBUILDDIR = docs/build
DOCSOURCEDIR = docs/source
ALLSPHINXOPTS = -d $(DOCBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(DOCSOURCEDIR)
all:
doc:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
cdoc:
rm -rf $(DOCBUILDDIR)/*
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) --prefix $(PREFIX)
rpm:
rm -rf dist/*.rpm
$(PYTHON) setup.py sdist
#$(PYTHON) setup.py bdist_rpm --spec-file dist/genesis.spec #--post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall
rpmbuild -bb dist/genesis.spec
mv ~/rpmbuild/RPMS/noarch/$(PROJECT)*.rpm dist
deb:
rm -rf dist/*.deb
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*
dpkg-buildpackage -b -rfakeroot -us -uc
rm ../$(PROJECT)*.orig.tar.gz
rm ../$(PROJECT)*.changes
mv ../$(PROJECT)*.deb dist/
tgz:
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