2013-01-17 22:10:36 +00:00
|
|
|
BASEDIR := ../..
|
2013-01-17 22:46:27 +00:00
|
|
|
PREFIX := /usr
|
2013-01-17 22:10:36 +00:00
|
|
|
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:
|
2013-01-17 22:46:27 +00:00
|
|
|
$(MAKE) -C $(BASEDIR) DESTDIR=distro/deb/$(DEBDIR) PREFIX=$(PREFIX) install
|
2013-01-17 22:33:02 +00:00
|
|
|
@install -d -m755 $(DEBDIR)/DEBIAN
|
2013-01-18 00:45:35 +00:00
|
|
|
@cp control $(DEBDIR)/DEBIAN/control
|
|
|
|
@tar czf data.tar.gz -C $(DEBDIR)/ . --exclude=DEBIAN
|
|
|
|
@tar czf control.tar.gz -C $(DEBDIR)/DEBIAN/ .
|
2013-01-17 22:10:36 +00:00
|
|
|
@echo 2.0 > debian-binary
|
|
|
|
@ar r $(DEB) debian-binary control.tar.gz data.tar.gz
|
2013-01-18 00:45:35 +00:00
|
|
|
@rm -rf debian-binary control.tar.gz data.tar.gz $(DEBDIR)
|
2013-01-17 22:10:36 +00:00
|
|
|
clean:
|
2013-01-17 22:34:39 +00:00
|
|
|
@rm -f $(DEB)
|
2013-01-17 22:10:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
all: base
|