From ee9dfd30e8c02e9a7457385786218d2b4b935720 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 29 Jan 2021 22:40:29 +0100 Subject: Debian package --- Makefile | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 31af4e2..46626e8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ +PROJECTNAME=unicode +VERSION=$(shell dpkg-parsechangelog --show-field Version) + +DISTROS=base #debian10 + CXX=clang++-11 +# GCC is buggy: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 #CXX=g++-10 STANDARD=c++17 @@ -68,6 +74,21 @@ install: mkdir -p $(DESTDIR)/usr/include cp include/unicode.h $(DESTDIR)/usr/include -.PHONY: all test clean install dep +deb: + # build binary deb package + dpkg-buildpackage -rfakeroot + +deb-src: + dh_clean + dh_auto_clean + dpkg-source -b -I.git -Iresult . + +$(DISTROS): deb-src + sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../$(PROJECTNAME)_$(VERSION).dsc + debsign result/$@/$(PROJECTNAME)_$(VERSION)_amd64.changes + +debs: $(DISTROS) + +.PHONY: all test clean install dep deb deb-src $(DISTROS) -include $(wildcard $(SRC:.cpp=.d)) -- cgit v1.2.3