#!/usr/bin/make -f export LC_ALL=C.UTF-8 %: dh $@ get-orig-source: debian/get-orig-source # The tree is copied into debian/build-tree first: three of the submodules come # from source packages of their own, and the source package must stay clean. # The three single-file-core bundles Zotero loads are upstream's build of that # package, which is node-single-file-core in Debian: debian/assemble.sh links # them there. XRegExp likewise comes from node-xregexp. override_dh_auto_build: node debian/build-citeproc.js debian/missing-sources/citeproc-js/src chrome/content/zotero/xpcom/citeproc.js rm -rf debian/build-alfaaz cp -a debian/missing-sources/alfaaz debian/build-alfaaz cd debian/build-alfaaz && tsc -p tsconfig.json --rootDir src --outDir out --module es2020 --declaration false rollup debian/build-alfaaz/out/index.js --format es -p node-resolve --file resource/allfaz.mjs rm -rf debian/build-alfaaz install -D -m644 /usr/share/nodejs/xregexp/xregexp-all.js chrome/content/zotero/xpcom/utilities/xregexp-all.js sh debian/build.sh bash debian/assemble.sh # Upstream's suite needs its packed test runner and a browser window. override_dh_auto_test: override_dh_auto_install: install -d debian/zotero/usr/lib/zotero/app install -d debian/zotero/usr/bin install -d debian/zotero/usr/share/applications install -d debian/zotero/usr/share/man/man1 install -m644 debian/build-xre/omni.ja debian/zotero/usr/lib/zotero/omni.ja install -m644 debian/build-app/omni.ja debian/zotero/usr/lib/zotero/app/omni.ja cp -a debian/build-resource debian/zotero/usr/lib/zotero/app/resource install -m644 debian/build-app/application.ini debian/zotero/usr/lib/zotero/app/application.ini install -m755 /usr/lib/firefox-esr/firefox-esr debian/zotero/usr/lib/zotero/zotero-bin install -m755 debian/bin/zotero debian/zotero/usr/bin/zotero install -m644 app/linux/zotero.desktop debian/zotero/usr/share/applications/zotero.desktop install -m644 debian/man/zotero.1 debian/zotero/usr/share/man/man1/zotero.1 install -D -m644 app/linux/icons/icon32.png \ debian/zotero/usr/share/icons/hicolor/32x32/apps/zotero.png install -D -m644 app/linux/icons/icon64.png \ debian/zotero/usr/share/icons/hicolor/64x64/apps/zotero.png install -D -m644 app/linux/icons/icon128.png \ debian/zotero/usr/share/icons/hicolor/128x128/apps/zotero.png install -D -m644 app/linux/icons/symbolic.svg \ debian/zotero/usr/share/icons/hicolor/scalable/apps/zotero.svg # zotero-bin is firefox-esr's launcher, copied so that /proc/self/exe points # into /usr/lib/zotero; stripping or analysing it is not our business. override_dh_strip: dh_strip -Xzotero-bin # The launcher and the modified omni.ja are firefox-esr's, which is MPL-2.0 and # has to keep the source of that exact version available (Policy 7.8). FIREFOX_ESR_VERSION := $(shell dpkg-query -W -f='$${Version}' firefox-esr) override_dh_gencontrol: dh_gencontrol -- -DBuilt-Using="firefox-esr (= $(FIREFOX_ESR_VERSION))" override_dh_shlibdeps: dh_shlibdeps -- --ignore-missing-info override_dh_clean: dh_clean rm -rf debian/build-src debian/build-tree debian/build-xre debian/build-app \ debian/build-resource rm -f chrome/content/zotero/xpcom/utilities/xregexp-all.js \ chrome/content/zotero/xpcom/citeproc.js resource/allfaz.mjs