add a Makefile to build a simple debian package (#560)

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
pull/562/head
Martin 2022-10-13 11:57:41 +02:00 zatwierdzone przez GitHub
rodzic 533a543a1b
commit c5bee7f3e3
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 51 dodań i 0 usunięć

9
.gitignore vendored
Wyświetl plik

@ -14,3 +14,12 @@ settings.json
.coverage
.flatpak-builder
/nanovna-saver.exe.spec
/deb_dist/
*.deb
*.tar.gz
*~
.*~
.bak
.new
.old
.orig

42
Makefile 100644
Wyświetl plik

@ -0,0 +1,42 @@
.PHONY: info
info:
@echo "- type 'make deb' to build a debian 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: distclean
DEB_BUILD_OPTIONS=nocheck python3 setup.py \
--command-packages=stdeb.command \
sdist_dsc --compat 12 --package3 nanovnasaver --section electronics bdist_deb
-rm nanovnasaver_*.deb
-ln `ls deb_dist/nanovnasaver_*.deb | tail -1` .
# remove all package build artifacts (keep the *.deb)
.PHONY: clean
clean:
python setup.py clean
-rm -rf deb_dist dist *.tar.gz *.egg*
# remove all package build artefacts
.PHONY: distclean
distclean: clean
-rm *.deb
# 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_*.deb