| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DEBVERS ?= $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') |
| 4 |
VERSION ?= $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//') |
| 5 |
DEBFLAVOR ?= $(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2) |
| 6 |
DEBPKGNAME ?= $(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2) |
| 7 |
DEBIAN_BRANCH ?= $(shell cat debian/gbp.conf | grep debian-branch | cut -d'=' -f2 | awk '{print $1}') |
| 8 |
GIT_TAG ?= $(shell echo '$(VERSION)' | sed -e 's/~/_/') |
| 9 |
|
| 10 |
get-orig-source: |
| 11 |
git tag -v $(GIT_TAG) || true |
| 12 |
if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \ |
| 13 |
git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(GIT_TAG) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \ |
| 14 |
fi |
| 15 |
[ ! -e ../build-area ] && mkdir ../build-area || true |
| 16 |
[ ! -e ../build-area/$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] && cp ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ../build-area |
| 17 |
|
| 18 |
build: build-arch build-indep |
| 19 |
build-arch: build-stamp |
| 20 |
build-indep: build-stamp |
| 21 |
build-stamp: |
| 22 |
|
| 23 |
clean: |
| 24 |
dh_testdir |
| 25 |
dh_testroot |
| 26 |
dh_clean |
| 27 |
|
| 28 |
install: |
| 29 |
dh_testdir |
| 30 |
dh_testroot |
| 31 |
dh_installdirs |
| 32 |
install -D -m 644 debian/defaults debian/automysqlbackup/etc/default/automysqlbackup |
| 33 |
|
| 34 |
binary-indep: install |
| 35 |
dh_testdir |
| 36 |
dh_testroot |
| 37 |
dh_install |
| 38 |
dh_installchangelogs |
| 39 |
dh_installcron |
| 40 |
dh_installman |
| 41 |
dh_installdocs |
| 42 |
dh_fixperms |
| 43 |
dh_compress |
| 44 |
dh_installdeb |
| 45 |
dh_gencontrol |
| 46 |
dh_md5sums |
| 47 |
dh_builddeb |
| 48 |
|
| 49 |
binary-arch: install |
| 50 |
|
| 51 |
binary: binary-indep binary-arch |
| 52 |
.PHONY: build clean binary-indep binary-arch binary install |