3LOCALBIN=$HOME/.local/bin
4DIST=`pwd`/macos_package
6VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
7RESOURCES=$DIST/Resources
10PANDOC=$DEST/bin/pandoc
11SCRIPTS=$MACOS/macos-resources
14PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
15DEVELOPER_ID_APPLICATION=${DEVELOPER_ID_APPLICATION:-Developer ID Application: John Macfarlane}
16DEVELOPER_ID_INSTALLER=${DEVELOPER_ID_INSTALLER:-Developer ID Installer: John Macfarlane}
18export MACMACOS_DEPLOYMENT_TARGET=10.7
20# echo Removing old files...
25mkdir -p $DEST/share/man/man1
29echo Building pandoc...
31stack install --stack-yaml=stack.pkg.yaml --local-bin-path $DEST/bin/ pandoc pandoc-citeproc
33echo Getting man pages...
36# get pandoc-citeproc man page:
37PANDOC_CITEPROC_VERSION=`pandoc-citeproc --version | awk '{print $2;}'`
38PANDOC_CITEPROC_TARBALL=https://hackage.haskell.org/package/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}.tar.gz
39curl ${PANDOC_CITEPROC_TARBALL} | tar xzC $DIST
40PANDOC_CITEPROC_PATH=$DIST/pandoc-citeproc-${PANDOC_CITEPROC_VERSION}
42cp $PANDOC_CITEPROC_PATH/man/man1/pandoc-citeproc.1 $DEST/share/man/man1/
43cp man/pandoc.1 $DEST/share/man/man1/
45chown -R $ME:staff $DIST
47echo Copying license...
48$PANDOC --data data -t html5 -s COPYING.md -Vpagetitle="License" -o $RESOURCES/license.html
50# Removing executable signing because of a problem that arose in El Capitan
51# "source=obsolete resource envelope"
53#echo Signing pandoc executable...
55#codesign --force --sign "${DEVELOPER_ID_APPLICATION}" $DEST/bin/pandoc
56# make sure it's valid... returns nonzero exit code if it isn't:
57#spctl --assess --type execute $DEST/bin/pandoc
59echo Creating MacOS package...
61sed -e "s/PANDOCVERSION/$VERSION/" $MACOS/distribution.xml.in > $MACOS/distribution.xml
63pkgbuild --root $ROOT --identifier net.johnmacfarlane.pandoc --version $VERSION --ownership recommended $DIST/pandoc.pkg
64productbuild --distribution $MACOS/distribution.xml --resources $DIST/Resources --package-path $DIST --version $VERSION --sign "${DEVELOPER_ID_INSTALLER}" $BASE-MacOS.pkg
67spctl --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