Added makefile script for generating deb packages the portable .. but more manual...
authorDale Weiler <killfieldengine@gmail.com>
Thu, 17 Jan 2013 22:10:36 +0000 (22:10 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 17 Jan 2013 22:10:36 +0000 (22:10 +0000)
distro/deb/Makefile [new file with mode: 0644]
distro/deb/control [new file with mode: 0644]

diff --git a/distro/deb/Makefile b/distro/deb/Makefile
new file mode 100644 (file)
index 0000000..cd5a3bf
--- /dev/null
@@ -0,0 +1,40 @@
+BASEDIR := ../..
+PREFIX  := usr
+BINDIR  := $(PREFIX)/bin
+DATADIR := $(PREFIX)/share
+MANDIR  := $(DATADIR)/man
+HEADER  := $(BASEDIR)/gmqcc.h
+MAJOR   := `sed -n -e '/GMQCC_VERSION_MAJOR/{s/.* .* //;p;q;}' $(HEADER)`
+MINOR   := `sed -n -e '/GMQCC_VERSION_MINOR/{s/.* .* //;p;q;}' $(HEADER)`
+PATCH   := `sed -n -e '/GMQCC_VERSION_PATCH/{s/.* .* //;p;q;}' $(HEADER)`
+DEBDIR  := gmqcc-$(MAJOR).$(MINOR).$(PATCH)
+DEB     := $(DEBDIR).deb
+
+base:
+       @mkdir     $(DEBDIR)
+       @mkdir     $(DEBDIR)/$(PREFIX)
+       @mkdir -p  $(DEBDIR)/$(BINDIR)
+       @mkdir -p  $(DEBDIR)/$(DATADIR)
+       @mkdir -p  $(DEBDIR)/$(MANDIR)
+       @mkdir -p  $(DEBDIR)/$(MANDIR)/man1
+       @mkdir -p  $(DEBDIR)/DEBIAN
+
+       @cp        $(BASEDIR)/doc/gmqcc.1 $(DEBDIR)/$(MANDIR)/man1/
+       @cp        $(BASEDIR)/doc/qcvm.1  $(DEBDIR)/$(MANDIR)/man1/
+       @cp        $(BASEDIR)/gmqcc       $(DEBDIR)/$(BINDIR)/
+       @cp        $(BASEDIR)/qcvm        $(DEBDIR)/$(BINDIR)/
+       @cp        control                $(DEBDIR)/DEBIAN/
+
+       @chmod -R 755 $(DEBDIR)
+
+       @tar czf data.tar.gz $(DEBDIR)/[a-z]*
+       @tar czf control.tar.gz $(DEBDIR)/DEBIAN/*
+       @echo 2.0 > debian-binary
+       @ar r $(DEB) debian-binary control.tar.gz data.tar.gz
+       @rm -rf $(DEBDIR) debian-binary control.tar.gz data.tar.gz
+
+clean:
+       @rm $(DEB)
+
+
+all: base
diff --git a/distro/deb/control b/distro/deb/control
new file mode 100644 (file)
index 0000000..74cb372
--- /dev/null
@@ -0,0 +1,7 @@
+Package: gmqcc
+Version: 0.3.0
+Section: user/hidden 
+Priority: optional
+Architecture: any
+Installed-Size: `du -ks usr|cut -f 1`
+Maintainer: <killfieldengine@gmail.com>