3LOCALBIN=$HOME/.local/bin
4DIST=`pwd`/macos_package
6RESOURCES=$DIST/Resources
10SCRIPTS=$MACOS/macos-resources
12PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
13DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
14DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane}
16export MACMACOS_DEPLOYMENT_TARGET=10.7
18# echo Removing old files...
23mkdir -p $DEST/share/man/man1
27echo Building pandoc...
29stack install --ghc-options="-O2" --stack-yaml=stack.pkg.yaml --local-bin-path $DEST/bin/ pandoc pandoc-citeproc
32strip $DEST/bin/pandoc-citeproc
34echo Getting man pages...
37# get pandoc-citeproc man page:
38PANDOC_CITEPROC_VERSION=`$DEST/bin/pandoc-citeproc --version | awk '{print $2;exit;}'`
39PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
40curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
41PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
43cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
44cp man/pandoc.1 $DEST/share/man/man1/
46chown -R $ME:staff $DIST
48echo Copying license...
49$PANDOC --data data -t html5 -s COPYING.md -Vpagetitle="License" -o $RESOURCES/license.html
51# Removing executable signing because of a problem that arose in El Capitan
52# "source=obsolete resource envelope"
54#echo Signing pandoc executable...
56#codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc
57# make sure it's valid... returns nonzero exit code if it isn't:
58#spctl --assess --type execute $DEST/bin/pandoc
60echo Creating macOS package...
62VERSION=`$DEST/bin/pandoc --version | awk '{print $2;exit;}'`
65sed -e "s/PANDOCVERSION/$VERSION/" $MACOS/distribution.xml.in > $MACOS/distribution.xml
67pkgbuild --root $ROOT --identifier net.johnmacfarlane.pandoc --version $VERSION --ownership recommended $DIST/pandoc.pkg
68productbuild --distribution $MACOS/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-macOS.pkg
71spctl --assess --type install $BASE-macOS.pkg
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