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!

This commit is contained in:
Dale Weiler 2013-01-17 22:10:36 +00:00
parent 06f53b1a28
commit 94a83ad969
2 changed files with 47 additions and 0 deletions

40
distro/deb/Makefile Normal file
View file

@ -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

7
distro/deb/control Normal file
View file

@ -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>