@@ -0,0 +1,30 @@
1+VERSION=$(shell cat version.txt)
4+ALL=$(BASE)-macOS.pkg $(BASE)-macOS.zip
9+ chmod +x $(DEST)/bin/pandoc $(DEST)/bin/pandoc-citeproc
10+ codesign -v $(DEST)/bin/pandoc || codesign -s "5U2WKE6DES" $(DEST)/bin/pandoc
11+ codesign -v $(DEST)/bin/pandoc-citeproc || codesign -s "5U2WKE6DES" $(DEST)/bin/pandoc-citeproc
12+ echo "SIGNED" > signed.txt
14+pandoc.pkg: signed.txt
15+ pkgbuild --root pandoc --identifier net.johnmacfarlane.pandoc --version $(VERSION) --ownership recommended $@
17+$(BASE)-macOS.pkg: pandoc.pkg
18+ productbuild --distribution distribution.xml --resources Resources --package-path $< --version $(VERSION) --sign 'Developer ID Installer: John Macfarlane' $@
20+$(BASE)-macOS.zip: signed.txt
21+ ln -s $(DEST) $(BASE)
25+ rm signed.txt $(BASE) pandoc.pkg
30+.PHONY: all clean distclean