git.iko.soy/typeable/pandoc
on rc/test4 help sign in
35 lines 1.1 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
10 codesign --force --options runtime -s "5U2WKE6DES" $(DEST)/bin/pandoc
11 echo "SIGNED" > signed.txt
13pandoc.pkg: signed.txt
14 pkgbuild --root pandoc --identifier net.johnmacfarlane.pandoc --version $(VERSION) --ownership recommended $@
16$(BASE)-macOS.pkg: pandoc.pkg
17 productbuild --distribution distribution.xml --resources Resources --package-path $< --version $(VERSION) --sign 'Developer ID Installer: John Macfarlane' $@
19$(BASE)-macOS.zip: signed.txt
20 ln -s $(DEST) $(BASE)
21 zip -r $@ $(BASE)
23gon.hcl: version.txt
24 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}" > $@
26notarize: gon.hcl $(BASE)-macOS.pkg
27 gon -log-level=warn ./gon.hcl
29clean:
30 rm signed.txt $(BASE) pandoc.pkg gon.hcl
32distclean: clean
33 rm $(ALL)
35.PHONY: all clean distclean