Browse Source

Makefile.am: add a rule to create debian package

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Konstantin Kharlamov 3 years ago
parent
commit
6024987fb7
1 changed files with 16 additions and 0 deletions
  1. 16 0
      Makefile.am

+ 16 - 0
Makefile.am

@@ -25,3 +25,19 @@ EXTRA_DIST = \
 include $(top_srcdir)/faux/Makefile.am
 include $(top_srcdir)/utils/Makefile.am
 include $(top_srcdir)/testc/Makefile.am
+
+define CONTROL
+PACKAGE: faux
+Version: $(PACKAGE_VERSION)
+Architecture: amd64
+Maintainer: pkun
+Description: Various auxiliary functions
+Homepage: https://src.libcode.org/pkun/faux
+endef
+
+export CONTROL
+deb: all
+	mkdir -p deb/DEBIAN
+	echo "$$CONTROL" > deb/DEBIAN/control
+	DESTDIR=$(shell pwd)/deb make install
+	dpkg-deb --build deb/ faux_$(PACKAGE_VERSION).deb