git.iko.soy/typeable/pandoc
on master help sign in
Add new distribution-creating Makefile to macos directory.
commit4d3ade03472f9bcbfb778c27c74f3c492b8e91e8 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 22 Mar 2020, 10:26 (7 years ago) parent667af84
1 file changed+30
macos/Makefile+30
macos/Makefilenew file+30
@@ -0,0 +1,30 @@
1+VERSION=$(shell cat version.txt)
2+BASE=pandoc-$(VERSION)
3+DEST=pandoc/usr/local
4+ALL=$(BASE)-macOS.pkg $(BASE)-macOS.zip
5+
6+all: $(ALL)
7+
8+signed.txt: $(DEST)
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
13+
14+pandoc.pkg: signed.txt
15+ pkgbuild --root pandoc --identifier net.johnmacfarlane.pandoc --version $(VERSION) --ownership recommended $@
16+
17+$(BASE)-macOS.pkg: pandoc.pkg
18+ productbuild --distribution distribution.xml --resources Resources --package-path $< --version $(VERSION) --sign 'Developer ID Installer: John Macfarlane' $@
19+
20+$(BASE)-macOS.zip: signed.txt
21+ ln -s $(DEST) $(BASE)
22+ zip -r $@ $(BASE)
23+
24+clean:
25+ rm signed.txt $(BASE) pandoc.pkg
26+
27+distclean: clean
28+ rm $(ALL)
29+
30+.PHONY: all clean distclean