#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all INSTDIR=`pwd`/debian/chordpro FREEFONTS=FreeMonoBoldOblique.ttf FreeMonoOblique.ttf FreeSansBoldOblique.ttf \ FreeSansOblique.ttf FreeSerifBoldItalic.ttf FreeSerifItalic.ttf \ FreeMonoBold.ttf FreeMono.ttf FreeSansBold.ttf FreeSans.ttf \ FreeSerifBold.ttf FreeSerif.ttf %: dh $@ override_dh_clean: dh_clean rm -rf script/chordpro script/wxchordpro t/out override_dh_auto_test: # restore freefonts from fonts-freefonts-ttf package in fonts dir: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) (cd lib/ChordPro/res/fonts; \ for i in $(FREEFONTS); do \ ln -s "/usr/share/fonts/truetype/freefont/$$i"; \ done) dh_auto_test rm -f lib/ChordPro/res/fonts/Free*.ttf endif override_dh_install: dh_install rm -f $(INSTDIR)/usr/share/perl5/ChordPro/res/linux/setup_desktop.sh rm -f $(INSTDIR)/usr/share/perl5/ChordPro/res/abc/abc2svg/COPYING.LESSER rm -f $(INSTDIR)/usr/share/perl5/ChordPro/res/abc/abc2svg/README.FIRST rm -rf $(INSTDIR)/usr/share/perl5/ChordPro/res/examples mv $(INSTDIR)/usr/share/perl5/ChordPro/res/linux/chordpro.desktop \ $(INSTDIR)/usr/share/applications/org.chordpro.desktop mv $(INSTDIR)/usr/share/perl5/ChordPro/res/linux/chordpro.metainfo.xml \ $(INSTDIR)/usr/share/metainfo/org.chordpro.metainfo.xml mv $(INSTDIR)/usr/share/perl5/ChordPro/res/linux/chordpro.xml \ $(INSTDIR)/usr/share/mime/packages/ rmdir $(INSTDIR)/usr/share/perl5/ChordPro/res/linux install -m644 lib/ChordPro/res/icons/chordpro-doc.png \ $(INSTDIR)/usr/share/icons/hicolor/256x256/mimetypes/x-chordpro-doc.png install -m644 lib/ChordPro/res/icons/chordpro-doc.svg \ $(INSTDIR)/usr/share/icons/hicolor/scalable/mimetypes/x-chordpro-doc.svg (cd $(INSTDIR)/usr/share/perl5/ChordPro/res/fonts; \ for i in $(FREEFONTS); do \ ln -s "../../../../fonts/truetype/freefont/$$i"; \ done) override_dh_installdocs: dh_installdocs mv $(INSTDIR)/usr/share/perl5/ChordPro/res/abc/abc2svg/README.md \ $(INSTDIR)/usr/share/doc/chordpro/README.abc2svg.md