summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 22 insertions, 1 deletions
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))