#!/usr/bin/make -f export PYTHON=python3 export PYBUILD_NAME=omnidb export PYBUILD_DISABLE_python2=1 override_dh_install-indep: dh_install -i echo "fonts:Depends=" >> debian/omnidb-common.substvars find debian/omnidb-*/ -name '*.eot' -or -name '*.svg' -or -name '*.ttf' -or -name '*.woff*' | LC_ALL=C sort | \ while read path; do \ file="$${path##*/}" ; \ dpkg -S "*/$$file" | grep '^fonts' | LC_ALL=C sort | head -1 | while read pkg pkgpath; do \ rm $$path; \ ln -vs $$pkgpath $$path; \ sed -i -e "/fonts:Depends/ s/$$/$${pkg%:},/" debian/omnidb-common.substvars; \ done \ done echo "js:Depends=" >> debian/omnidb-common.substvars find debian/omnidb-*/ -regextype egrep -regex '.*/(jq).*\.(css|js)$$' | LC_ALL=C sort | \ while read path; do \ file="$$(echo $${path##*/} | sed -e 's/-[0-9.]*\././')" ; \ dpkg -S "*/$$file" | grep '^libjs' | LC_ALL=C sort | head -1 | while read pkg pkgpath; do \ rm $$path; \ ln -vs $$pkgpath $$path; \ sed -i -e "/js:Depends/ s/$$/$${pkg%:},/" debian/omnidb-common.substvars; \ done \ done find debian/omnidb-common/usr/lib \( -name .directory -or -name Thumbs.db \) -delete %: dh $@ --with python3