3LOCALBIN=$HOME/.local/bin
5VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
6RESOURCES=$DIST/Resources
10SCRIPTS=$OSX/osx-resources
13PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
14DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
15DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane}
17# We need this for hsb2hs:
19export MACOSX_DEPLOYMENT_TARGET=10.7
21# echo Removing old files...
26which hsb2hs || stack install --stack-yaml=stack.hsb2hs.yaml
28echo Building pandoc...
30stack install --stack-yaml=osx/stack.yaml --local-bin-path . pandoc pandoc-citeproc
32echo Getting man pages...
35# get pandoc-citeproc man page:
36PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'`
37PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
38curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
39PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
42mkdir -p $DEST/share/man/man1
43for f in pandoc pandoc-citeproc; do
46cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
47cp man/pandoc.1 $DEST/share/man/man1/
49chown -R $ME:staff $DIST
51echo Copying license...
52osx/pandoc --data data -t html5 -s COPYING -o $RESOURCES/license.html
54# Removing executable signing because of a problem that arose in El Capitan
55# "source=obsolete resource envelope"
57#echo Signing pandoc executable...
59#codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc
60# make sure it's valid... returns nonzero exit code if it isn't:
61#spctl --assess --type execute $DEST/bin/pandoc
63echo Creating OSX package...
64# remove old package first
67sed -e "s/PANDOCVERSION/$VERSION/" osx/distribution.xml.in > osx/distribution.xml
69pkgbuild --root $DIST/pandoc --identifier net.johnmacfarlane.pandoc --version 1.13 --ownership recommended $DIST/pandoc.pkg
70productbuild --distribution osx/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-osx.pkg
73spctl --assess --type install $BASE-osx.pkg
76rm -r $DIST osx/pandoc osx/pandoc-citeproc
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list