From 5dd39e4eee151ba36353acfd7f03a2948f8e401e Mon Sep 17 00:00:00 2001 From: June Tate-Gans Date: Sat, 28 Oct 2023 10:01:11 -0500 Subject: [PATCH] Make makefile more distro generic --- Makefile | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 28414c2..820b08f 100644 --- a/Makefile +++ b/Makefile @@ -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