#!/usr/bin/make -f DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk include /usr/share/dpkg/architecture.mk export DH_VERBOSE = 1 # make clean does not clean properly, so building out of source BUILD = $(CURDIR)/build-tree LDFLAGS += -Wl,--as-needed LISP := sbcl oa_libdir := /usr/lib/open-axiom PACKAGE := open-axiom GIT_REPO := https://github.com/GabrielDosReis/open-axiom.git DEBIAN_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) SRC_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN_PATH)/changelog | awk '/^Version:/ {sub(/-[^-]*/, "", $$2); print $$2}') GIT_REVISION := $(shell echo $(SRC_VERSION) | sed -r 's,.+git\.(\w+).*,\1,') TARBALL := $(PACKAGE)_$(SRC_VERSION).orig.tar.xz DELETE = \ contrib/windows-installer \ .PHONY: get-orig-source get-orig-source: rm -rf get-orig-source $(TARBALL) && mkdir get-orig-source git clone $(GIT_REPO) get-orig-source/$(PACKAGE)-$(SRC_VERSION) git -C get-orig-source/$(PACKAGE)-$(SRC_VERSION) checkout $(GIT_REVISION) find get-orig-source/$(PACKAGE)-$(SRC_VERSION) -name '.*' -print0 | xargs -0 --no-run-if-empty rm -rfv cd get-orig-source/$(PACKAGE)-$(SRC_VERSION) && rm -rfv $(DELETE) tar cJf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION) rm -rf get-orig-source @echo " "$(TARBALL)" created; move it to the right destination to build the package" debian/open-axiom.1: build-stamp help2man --no-info \ --version-string='$(SRC_VERSION)' \ -m 'The open scientific computation platform' \ -n 'open source platform for symbolic, algebraic, and numerical computations' \ $(BUILD)/src/driver/open-axiom > $@ configure-stamp: dh_testdir $(LISP) --version