summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-01-29 22:40:29 +0100
committerRoland Reichwein <mail@reichwein.it>2021-01-29 22:40:29 +0100
commitee9dfd30e8c02e9a7457385786218d2b4b935720 (patch)
treefb41528d34025bbca1dee55dad12e70a69832947 /Makefile
parent358bd026e30479904c4721d0c84bde19ea31a013 (diff)
Debian package
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))