-
Notifications
You must be signed in to change notification settings - Fork 270
/
Makefile
60 lines (47 loc) · 1.48 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
.PHONY: info
info:
@echo "- type 'make deb' to build a debian package"
@echo "- type 'make rpm' to build an (experimental) rpm package"
@echo "- you need the debian packages"
@echo " fakeroot python3-setuptools python3-stdeb dh-python"
@echo
# build a new debian package and create a link in the current directory
.PHONY: deb
deb: clean
@# build the deb package
PYBUILD_DISABLE=test python3 setup.py \
--command-packages=stdeb.command \
sdist_dsc --compat 10 --package3 nanovnasaver --section electronics \
bdist_deb
@# create a link in the main directory
-@ rm nanovnasaver_*_all.deb
-@ln `ls deb_dist/nanovnasaver_*.deb | tail -1` .
@# and show the result
@ls -l nanovnasaver_*.deb
# build a new rpm package and create a link in the current directory
.PHONY: rpm
rpm: clean
@# build the rpm package
PYBUILD_DISABLE=test python3 setup.py bdist_rpm
@# create a link in the main directory
-@ rm NanoVNASaver-*.noarch.rpm
@ln `ls dist/NanoVNASaver-*.noarch.rpm | tail -1` .
@# and show the result
@ls -l NanoVNASaver-*.noarch.rpm
# remove all package build artifacts (keep the *.deb)
.PHONY: clean
clean:
python3 setup.py clean
-rm -rf build deb_dist dist *.tar.gz *.egg*
# remove all package build artefacts
.PHONY: distclean
distclean: clean
-rm -f *.deb *.rpm
# build and install a new debian package
.PHONY: debinstall
debinstall: deb
sudo apt install ./nanovnasaver_*.deb
# uninstall this debian package
.PHONY: debuninstall
debuninstall:
sudo apt purge nanovnasaver