rules 1.84 KB
Newer Older
anarcat's avatar
anarcat committed
1 2 3 4 5 6
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

7 8
%:
	dh $@
anarcat's avatar
anarcat committed
9

10
override_dh_install:
11
	cp -r "$(CURDIR)/db/"  "$(CURDIR)/dns/"  "$(CURDIR)/http/" "$(CURDIR)/aegir.make" "$(CURDIR)/platform/" "$(CURDIR)/tests/" "$(CURDIR)"/*.inc "$(CURDIR)"/*.php "$(CURDIR)"/*.info "$(CURDIR)/debian/aegir-provision/usr/share/drush/commands/provision/"
12
	cp "$(CURDIR)/debian/aegir-provision.lintian" "$(CURDIR)/debian/aegir-provision/usr/share/lintian/overrides/aegir-provision"
anarcat's avatar
anarcat committed
13

anarcat's avatar
anarcat committed
14 15 16
DOMAIN?=$(shell hostname -f)
KEY?="-kjenkins@$(DOMAIN)"

17 18
# this builds a debian package based on what the current branches are
# this usually tests the latest release
anarcat's avatar
anarcat committed
19
jenkins-build-official:
20
	git-buildpackage -b --git-upstream-branch=origin/upstream --git-debian-branch=origin/debian --git-ignore-branch -kjenkins@ci.aegirproject.org
21

22 23 24
# the upstream version: strip the 6.x and turn the appendix into
# +N.foo where N is the number of commits since last tag and foo is
# the hash
25
upstream_version=$(shell git describe --tags origin/6.x-1.x | sed 's/6.x-//;s/-\([0-9]*\)-\([^-]*\)$$/+\1.\2/')
26 27 28
# the debian version, strip the debian/ part of the tag and the
# upstream version number, keep just the debian part, replacing as
# above for the N.foo part
29
debian_version=$(shell git describe --tags origin/debian | sed "s/debian\///;s/-\([0-9]*\)-\([^-]*\)$$/+\1.\2/;s/^.*-//" )
anarcat's avatar
anarcat committed
30

31
# this builds a debian package but first updates the branches to follow the latest 1.x branch
32
# this assumes you are on a "debian" branch (of course)
anarcat's avatar
anarcat committed
33
jenkins-build-auto:
anarcat's avatar
anarcat committed
34
	git merge origin/6.x-1.x
anarcat's avatar
anarcat committed
35 36 37
	dch -D unstable -v ${upstream_version}-${debian_version} "automatic jenkins build ${BUILD_TAG}"
	git commit -m"dummy commit for jenkins ${BUILD_TAG} autobuild" debian/changelog
	git-buildpackage -b --git-upstream-branch=origin/6.x-1.x ${KEY}
38 39 40

show-version:
	@echo ${upstream_version}-${debian_version}