Browse Source

Add easy 'make deb' target. Thanks to Konstantin Kharlamov

Serj Kalichev 3 years ago
parent
commit
0637d7205e
2 changed files with 20 additions and 1 deletions
  1. 3 1
      .gitignore
  2. 17 0
      Makefile.am

+ 3 - 1
.gitignore

@@ -25,6 +25,7 @@
 /Makefile.in
 /clish/plugin_builtin.c
 /*.patch
+/deb
 
 # Debian files
 /build-stamp
@@ -44,4 +45,5 @@
 
 /cov-int
 /klish-*.tar*
-/*.tgz
+/*.tgz
+/*.deb

+ 17 - 0
Makefile.am

@@ -51,3 +51,20 @@ include $(top_srcdir)/bin/Makefile.am
 #include $(top_srcdir)/plugins/module.am
 #include $(top_srcdir)/libc/module.am
 #include $(top_srcdir)/doc/module.am
+
+define CONTROL
+PACKAGE: klish
+Version: $(PACKAGE_VERSION)
+Architecture: amd64
+Depends: faux
+Maintainer: pkun
+Description: The klish is a framework for implementing a CISCO-like CLI on a UNIX systems. It is configurable by XML files
+Homepage: http://klish.libcode.org
+endef
+
+export CONTROL
+deb: all
+	mkdir -p deb/DEBIAN
+	echo "$$CONTROL" > deb/DEBIAN/control
+	DESTDIR=$(shell pwd)/deb make install
+	dpkg-deb --build deb/ klish_$(PACKAGE_VERSION).deb