summaryrefslogtreecommitdiff
path: root/make_osx_package.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-09-14 16:02:02 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-09-14 16:02:02 -0700
commit08b67f77308c09be4e0cfda7d0d4c1dd413deb5c (patch)
treed2492d8bd2c37f1740f5ca7e911d88a37e28447f /make_osx_package.sh
parent479cefa4c2c934c1cdd56a1511bbe08a48940555 (diff)
Updated make_osx_package.sh.
Diffstat (limited to 'make_osx_package.sh')
-rwxr-xr-xmake_osx_package.sh30
1 files changed, 18 insertions, 12 deletions
diff --git a/make_osx_package.sh b/make_osx_package.sh
index 0c84951c2..b73e0e4dd 100755
--- a/make_osx_package.sh
+++ b/make_osx_package.sh
@@ -1,6 +1,7 @@
#!/bin/sh -e
DIST=`pwd`/osx_package
+TMP=`pwd`/cabaltmp
VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
RESOURCES=$DIST/Resources
ROOT=$DIST/pandoc
@@ -10,24 +11,29 @@ ICU=/usr/local/Cellar/icu4c/51.1
ME=jgm
CODESIGNID="Developer ID Application: John Macfarlane"
PACKAGEMAKER=/Applications/PackageMaker.app/Contents/MacOS/PackageMaker
+EXES="pandoc pandoc-citeproc biblio2yaml"
echo Removing old files...
rm -rf $DIST
mkdir -p $RESOURCES
-# echo Updating database
-# cabal update
+echo Updating database
+cabal update
echo Building pandoc...
-cabal-dev install hsb2hs
-
-cabal-dev install --reinstall -v1 --prefix $ROOT/tmp --flags="embed_data_files unicode_collation" --extra-lib-dirs=$ICU/lib --extra-include-dirs=$ICU/include pandoc-citeproc
-cabal-dev install -v1 --prefix $ROOT/tmp --flags="embed_data_files"
-
-mkdir -p $ROOT/usr/local/share
-cp -r $ROOT/tmp/bin $ROOT/usr/local/
-cp -r $ROOT/tmp/share/man $ROOT/usr/local/share/
-rm -rf $ROOT/tmp
+cabal sandbox init
+cabal install -v1 --prefix $TMP --flags="embed_data_files unicode_collation" --extra-lib-dirs=$ICU/lib --extra-include-dirs=$ICU/include pandoc-citeproc
+cabal install -v1 --prefix $TMP --flags="embed_data_files"
+
+mkdir -p $ROOT/usr/local/bin
+mkdir -p $ROOT/usr/local/share/man/man1
+mkdir -p $ROOT/usr/local/share/man/man5
+for f in $EXES; do
+ cp $TMP/bin/$f $ROOT/usr/local/bin/;
+ cp $TMP/share/man/man1/$f.1 $ROOT/usr/local/share/man/man1/
+done
+cp $TMP/share/man/man5/pandoc_markdown.5 $ROOT/usr/local/share/man/man5/
+# rm -rf $TMP
chown -R $ME:staff $DIST
# gzip $ROOT/usr/local/share/man/man?/*.*
@@ -35,7 +41,7 @@ chown -R $ME:staff $DIST
chmod +r $ROOT/usr/local/share/man/man?/*.*
echo Copying license...
-dist/build/pandoc/pandoc --data data -t rtf -s COPYING -o $RESOURCES/License.rtf
+$TMP/bin/pandoc --data data -t rtf -s COPYING -o $RESOURCES/License.rtf
echo Signing pandoc executable...