From: Dale Weiler Date: Thu, 17 Jan 2013 22:10:36 +0000 (+0000) Subject: Added makefile script for generating deb packages the portable .. but more manual... X-Git-Tag: before-library~236 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94a83ad96986ca8df824496fd7174b745769b952;p=xonotic%2Fgmqcc.git Added makefile script for generating deb packages the portable .. but more manual way. It doesn't support multi-architecture yet. It just grabs what ever is already compiled. Not tested! --- diff --git a/distro/deb/Makefile b/distro/deb/Makefile new file mode 100644 index 0000000..cd5a3bf --- /dev/null +++ b/distro/deb/Makefile @@ -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 index 0000000..74cb372 --- /dev/null +++ b/distro/deb/control @@ -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: