#!/usr/bin/make -f APL_CONFIGURE_FULL = \ --with-erlang \ --with-gtk3 \ --with-libapl \ --with-pcre \ --without-python \ --without-postgresql \ --without-sqlite3 \ %: dh $@ override_dh_auto_configure: dh_auto_configure -- $(APL_CONFIGURE_FULL) --libdir=/usr/lib override_dh_missing: dh_missing --list-missing override_dh_auto_clean: dh_auto_clean rm -f \ makefile.h \ src/Gtk/Gtk_events1.asciidoc \ src/Gtk/Gtk_events2.asciidoc \ src/Gtk/Gtk_functions.asciidoc \ workspaces/Makefile PACKAGE := apl SVN_REPO := http://svn.savannah.gnu.org/svn/apl/trunk DEBIAN_PATH := $(abspath $(dir $(firstword $(MAKEFILE_LIST)))) SRC_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN_PATH)/changelog | awk '/^Version:/ {sub(/-[^-]*/, "", $$2); print $$2}') SVN_REVISION := $(shell echo $(SRC_VERSION) | sed -r 's,.+svn\.([0-9]+).*,\1,') TARBALL := $(PACKAGE)_$(SRC_VERSION).orig.tar.xz DELETE := \ aclocal.m4 autom4te.cache build config.guess config.h \ config.rpath config.status config.sub configure debian depcomp \ libtool ltmain.sh Makefile missing stamp-h1 .PHONY: get-orig-source get-orig-source: rm -rf get-orig-source $(TARBALL) && mkdir get-orig-source svn export -r $(SVN_REVISION) $(SVN_REPO) get-orig-source/$(PACKAGE)-$(SRC_VERSION) 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) && \ echo '#define BUILDTAG PACKAGE_NAME, "$(SRC_VERSION)"' > buildtag.hh && \ echo '#define ARCHIVE_SVN "$(SVN_REVISION)"' >> buildtag.hh 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"