diff --git a/debian/control b/debian/control index 1b2b71da5f..889c82137e 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: GBIF Development Team Uploaders: GBIF Development Team Build-Depends: - debhelper (>= 11), maven, git, openjdk-8-jdk + debhelper (>= 11), maven, git, curl Standards-Version: 4.2.1 Homepage: https://github.com/gbif/ipt Vcs-Browser: https://github.com/gbif/ipt diff --git a/debian/rules b/debian/rules index 7ea8fb0f9d..d050ceb2a2 100755 --- a/debian/rules +++ b/debian/rules @@ -11,27 +11,15 @@ # $(CURDIR) is the repository directory -M2_REPO = $(CURDIR)/debian/maven-repo-local CURVERSION = $(shell grep -oPm2 "(?<=)[^<]+" "pom.xml" | tail -1) -BUILDDATE = $(shell date -u +%Y%m%d%H%M%S) -# Previously: -# CURVERSION = $(shell mvn -Dmaven.repo.local=$(M2_REPO) -q -Dexec.executable=echo -Dexec.args='$${project.version}' --non-recursive exec:exec)-r$(shell git rev-parse HEAD | cut -c1-7) -# but we don't have the git revision in a debian build from sources without .git directory %: dh $@ override_dh_auto_build: -ifeq ($(filter nobuildjar,$(DEB_BUILD_PROFILES)),) -# This allows to skip the maven jar build (for instance, if its builded by another jenkins job) -# for instance with debuild -us -uc -b --build-profiles=nobuildjar - mvn -Dmaven.repo.local=$(M2_REPO) -P release install -DskipTests -Dmaven.buildNumber.revisionOnScmFailure=$(BUILDDATE) -endif - - -override_dh_auto_install: -# install don't allow to rename files (like wars), so we copy here the file we want to install with the package - cp $(CURDIR)/target/ipt-$(CURVERSION)-*.war $(CURDIR)/target/ipt.war + dh_auto_build + mkdir -p $(CURDIR)/target + curl -o $(CURDIR)/target/ipt.war https://repository.gbif.org/content/groups/gbif/org/gbif/ipt/$(CURVERSION)/ipt-$(CURVERSION).war override_dh_fixperms: dh_fixperms @@ -39,6 +27,7 @@ override_dh_fixperms: # chmod 4755 debian/foo/opt/ipt/foo.jar # Also we use postinstall for this + #override_dh_install: # dh_install # calls default *.install and *.dirs installation # man install