Simplified osx package script.
Now compatible with OSX 10.3. Also, license works.
This commit is contained in:
parent
4919b49f1c
commit
5c12221948
1 changed files with 8 additions and 33 deletions
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue