#!/usr/bin/make -f DEB_BUILD_MAINT_OPTIONS=hardening=+all export DEB_BUILD_MAINT_OPTIONS include /usr/share/dpkg/architecture.mk %: dh $@ --with bash-completion ## If system (external) sqlite has high enough version, disable internal sqlite. SQLITE_MIN_VERSION=$(shell ./configure --print-minimum-sqlite-version | tail -1) FOSSIL_CONF_SQLITE_OPTIONS:=$(shell pkg-config sqlite3 --atleast-version=$(SQLITE_MIN_VERSION) && echo --disable-internal-sqlite) ## This is an alternative method for checking sqlite version. Seems ## less robust, as pkg-config is designed for this purpose. # dpkg --compare-versions \ # $(shell dpkg --status libsqlite3-dev | egrep '^Version: ' | cut --field=2 --delimiter=' ') \ # ge $(SQLITE_MIN_VERSION) override_dh_auto_configure: dh_auto_configure -- --disable-option-checking \ $(FOSSIL_CONF_SQLITE_OPTIONS) \ --json \ --with-th1-docs --with-th1-hooks \ --with-tcl=1 \ --with-tcl-stubs \ --with-tcl-private-stubs execute_after_dh_installdocs: mv debian/fossil/usr/share/doc/fossil/changes.wiki \ debian/fossil/usr/share/doc/fossil/changelog