#!/usr/bin/make -f -include /usr/share/javahelper/java-vars.mk DEB_PKGNAME := $(shell dpkg-parsechangelog -SSource) DEB_VERSION := $(shell dpkg-parsechangelog -SVersion) DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-) DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//') GIT_TAG := $(shell echo '$(DEB_UPSTREAM_VERSION)' | sed -e 's/~/_/') PRODUCED_JAR=semver.jar UPSTREAM_GIT = https://github.com/grimradical/clj-semver %: dh $@ --with javahelper --with maven_repo_helper override_jh_build: jar cf $(PRODUCED_JAR) -C src . override_jh_installlibs: jh_installlibs $(PRODUCED_JAR) override_jh_clean: jh_clean rm -f $(CURDIR)/$(PRODUCED_JAR) gen-orig-xz: git tag -v $(GIT_TAG) || true if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \ git archive --prefix=$(DEB_PKGNAME)-$(DEB_UPSTREAM_VERSION)/ $(GIT_TAG) | xz >../$(DEB_PKGNAME)_$(DEB_UPSTREAM_VERSION).orig.tar.xz ; \ mkdir -p ../build-area ; \ cp ../$(DEB_PKGNAME)_$(DEB_UPSTREAM_VERSION).orig.tar.xz ../build-area ; \ fi fetch-upstream-remote: ifeq (,$(findstring https:,$(UPSTREAM_GIT))) $(error Using insecure proto in UPSTREAM_GIT: $(UPSTREAM_GIT)) endif git remote add upstream $(UPSTREAM_GIT) || true git remote set-url upstream $(UPSTREAM_GIT) git fetch upstream