3LOCALBIN=$HOME/.local/bin
5DIST=`pwd`/macos_package
7RESOURCES=$DIST/Resources
10PANDOC=$DEST/bin/pandoc
11SCRIPTS=$MACOS/macos-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}
17export MACMACOS_DEPLOYMENT_TARGET=10.7
19# echo Removing old files...
24mkdir -p $DEST/share/man/man1
28echo Building pandoc...
30stack install --ghc-options="-O2" --local-bin-path $DEST/bin/ pandoc pandoc-citeproc
33strip $DEST/bin/pandoc-citeproc
35echo Getting man pages...
38# get pandoc-citeproc man page:
39PANDOC_CITEPROC_VERSION=`$DEST/bin/pandoc-citeproc --version | awk '{print $2;exit;}'`
40PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
41curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
42PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
44cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
45cp man/pandoc.1 $DEST/share/man/man1/
47chown -R $ME:staff $DIST
49echo Copying license...
50$PANDOC --data data -t html5 -s COPYING.md -Vpagetitle="License" -o $RESOURCES/license.html
52# Removing executable signing because of a problem that arose in El Capitan
53# "source=obsolete resource envelope"
55#echo Signing pandoc executable...
57#codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc
58# make sure it's valid... returns nonzero exit code if it isn't:
59#spctl --assess --type execute $DEST/bin/pandoc
61echo Creating macOS package...
63VERSION=`$DEST/bin/pandoc --version | awk '{print $2;exit;}'`
66sed -e "s/PANDOCVERSION/$VERSION/" $MACOS/distribution.xml.in > $MACOS/distribution.xml
68pkgbuild --root $ROOT --identifier net.johnmacfarlane.pandoc --version $VERSION --ownership recommended $DIST/pandoc.pkg
69productbuild --distribution $MACOS/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-macOS.pkg
72spctl --assess --type install $BASE-macOS.pkg
74echo "Created $BASE-macOS.pkg"
80zip -r $BASEDIR/$BASE-macOS.zip $BASE
83echo "Created $BASE-macOS.zip"
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