git.iko.soy/typeable/pandoc
on commonmark-hs-new help sign in
36 lines 1.2 kB history raw
1VERSION=$(shell cat version.txt)
2BASE=pandoc-$(VERSION)
3DEST=pandoc/usr/local
4ALL=$(BASE)-macOS.pkg $(BASE)-macOS.zip
6all: $(ALL) notarize
8signed.txt: $(DEST)
9 chmod +x $(DEST)/bin/pandoc $(DEST)/bin/pandoc-citeproc
10 codesign --force --options runtime -s "5U2WKE6DES" $(DEST)/bin/pandoc
11 codesign --force --options runtime -s "5U2WKE6DES" $(DEST)/bin/pandoc-citeproc
12 echo "SIGNED" > signed.txt
14pandoc.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)
22 zip -r $@ $(BASE)
24gon.hcl: version.txt
25 echo "notarize {\n path = \"$(BASE)-macOS.pkg\"\n bundle_id = \"org.pandoc.pandoc\"\n staple = true\n}\napple_id {\n username = \"jgm@berkeley.edu\"\n password = \"@env:AC_PASSWORD\"\n}" > $@
27notarize: gon.hcl $(BASE)-macOS.pkg
28 gon -log-level=warn ./gon.hcl
30clean:
31 rm signed.txt $(BASE) pandoc.pkg gon.hcl
33distclean: clean
34 rm $(ALL)
36.PHONY: all clean distclean