#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_BUILD_MAINT_OPTIONS=reproducible=-timeless LD_LIBRARY_PATH += debian/libexpeyes1/usr/lib export DEB_BUILD_HARDENING=1 #export CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2" export QT_SELECT := 5 %: dh $@ --with python3 BUILD_DIR = $(CURDIR)/debian/build override_dh_auto_build-arch: mkdir $(CURDIR)/debian/build $(MAKE) all_arch HOME=$(BUILD_DIR) rm -rf $(CURDIR)/debian/build override_dh_auto_build-indep: $(MAKE) all_indep cd eyes17/helpFiles; $(MAKE) fixTheLinks; $(MAKE) userManual override_dh_auto_clean: dh_auto_clean # the clean process compiles a few Python scripts find . -name __pycache__ | xargs rm -rf rm -rf $(BUILD_DIR) # remove broken symlinks which can be in the source find eyes17/helpFiles -xtype l | xargs rm -f DOCDIR_17 = debian/eyes17/usr/share/eyes17/doc override_dh_install: $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp find $(CURDIR)/debian/tmp -name "*.pdf" -exec chmod -x {} \; dh_install make -C po install DESTDIR=$(CURDIR)/debian/expeyes make -C microhope/po install DESTDIR=$(CURDIR)/debian/microhope # remove python files .gitignore, and doctrees from helpFiles subdirectory for d in $$(find $(CURDIR)/debian -type d -name helpFiles); do \ for f in $$(find $$d -name '*.py' -o -name '.gitignore'); do \ rm -f $$f; \ done; \ for f in $$(find $$d -type d -name 'doctrees'); do \ rm -rf $$f; \ done; \ done # install eyes17 documents for lang in en fr es ml; do \ mkdir -p $(DOCDIR_17)/$${lang}; \ for ext in pdf epub; do \ cp $$(find eyes17/helpFiles/$${lang} -name expEYES-17.$${ext}) \ $(DOCDIR_17)/$${lang}/eyes17.$${ext}; \ done; \ done