Make makefile more distro generic

This commit is contained in:
June Tate-Gans 2023-10-28 10:01:11 -05:00
parent dc7986f4fd
commit 5dd39e4eee

View File

@ -2,23 +2,36 @@ VERSION := `grep "VERSION" g13gui/common.py |awk '{ print $$2 }' |sed 's/'//g'
GITBRANCH ?= master
PIPENV := pipenv
PYTHON := `which python3`
PIP := $(PYTHON) -m pip
PIP := ${PYTHON} -m pip
DISTRO := $(shell \
lsb_release -i \
|awk -F: '{ print $$2 }' \
|sed -e 's/[ \t]*//g' \
|tr '[A-Z]' '[a-z]' \
|sed -e 's/linux//g')
all:
$(warning Building on ${DISTRO})
all: ${DISTRO}
manjaro:
makepkg
debian:
export GITBRANCH=master
debuild
debclean
build:
debian-build:
gbp buildpackage --git-debian-branch=$(GITBRANCH)
clean:
debian-clean:
debclean
build-source: clean
debian-build-source: debian-clean
gbp buildpackage -S --git-debian-branch=$(GITBRANCH)
mkdir build
mv ../g13gui_$(VERSION)* build
release: build-source
debian-release: debian-build-source