aboutsummaryrefslogtreecommitdiff
path: root/make_osx_package.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-28 16:38:56 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-28 16:38:56 -0700
commit5c12221948cff8fa2a255323cd40f9e2e2ae3652 (patch)
tree0791e6e7687d7c25aefd85107736625217d0c91f /make_osx_package.sh
parent4919b49f1ccf41c81b54295fcee486a51d2a4a77 (diff)
downloadpandoc-5c12221948cff8fa2a255323cd40f9e2e2ae3652.tar.gz
Simplified osx package script.
Now compatible with OSX 10.3. Also, license works.
Diffstat (limited to 'make_osx_package.sh')
-rwxr-xr-xmake_osx_package.sh41
1 files changed, 8 insertions, 33 deletions
diff --git a/make_osx_package.sh b/make_osx_package.sh
index fd31c2ecb..c50ad6a83 100755
--- a/make_osx_package.sh
+++ b/make_osx_package.sh
@@ -1,9 +1,9 @@
#!/bin/sh -e
-DIST=`pwd`/osx
+DIST=osx
VERSION=$(grep -e '^Version' pandoc.cabal | awk '{print $2}')
RESOURCES=$DIST/Resources
-ROOT=$DIST/Package_Root
+ROOT=$DIST/pandoc
BASE=pandoc-$VERSION
PREFIX=$ROOT/usr/local
@@ -11,36 +11,12 @@ echo Removing old files...
rm -rf $DIST
mkdir -p $RESOURCES
-echo Creating Info.plist...
-
-cat > "$DIST/Info.plist" <<EOF
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<pkg-info version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleIdentifier</key>
- <string>net.johnmacfarlane.pandoc</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>pandoc</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>$VERSION</string>
- <key>CFBundleVersion</key>
- <string>$VERSION</string>
-</dict>
-</pkg-info>
-EOF
-
echo Building pandoc...
runghc Setup.hs configure --user --prefix=/usr/local --flags="executable -library highlighting"
runghc Setup.hs build
runghc Setup.hs copy --destdir=$ROOT
+echo Copying license...
cp COPYING $RESOURCES/License.txt
PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
@@ -48,12 +24,10 @@ PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/P
echo Creating OSX package...
$PACKAGEMAKER \
- --title "pandoc" \
- --info "$DIST/Info.plist" \
- --root "$ROOT" \
- --resources "$RESOURCES" \
- --target "10.5" \
- --version "$VERSION" \
+ --root $ROOT \
+ --id net.johnmacfarlane.pandoc \
+ --resources $RESOURCES \
+ --version $VERSION \
--no-relocate \
--out $BASE.pkg
@@ -63,4 +37,5 @@ hdiutil create "$BASE.dmg" \
-format UDZO -ov \
-volname "pandoc $VERSION" \
-srcfolder $BASE.pkg
+hdiutil internet-enable "$BASE.dmg"