summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2006-02-20 05:20:27 +0000
committerAndrew Lewman <andrew@torproject.org>2006-02-20 05:20:27 +0000
commit666eda1f1b500ae17d7643eaacfb86e07c6e87ab (patch)
tree4fbe318fab3079b33e4b27c12159ac012f405712
parent3bef5fff3f315af9ecd350081c78796b147b2021 (diff)
downloadtor-666eda1f1b500ae17d7643eaacfb86e07c6e87ab.tar.gz
tor-666eda1f1b500ae17d7643eaacfb86e07c6e87ab.zip
Convert make dist-osx to new file output naming scheme
svn:r6055
-rw-r--r--contrib/osx/package.sh33
1 files changed, 26 insertions, 7 deletions
diff --git a/contrib/osx/package.sh b/contrib/osx/package.sh
index 7c1f651693..b1f867babd 100644
--- a/contrib/osx/package.sh
+++ b/contrib/osx/package.sh
@@ -25,12 +25,31 @@ PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.3.zip
# http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html
# man packagemaker
-# Make sure VERSION is set, so we don't name the package "Tor Bundle.dmg"
+# Make sure VERSION is set, so we don't name the package "Tor--$OS-Bundle.dmg"
if [ "XX$VERSION" = 'XX' ]; then
echo "VERSION not set."
exit 1
fi
+## Determine OSX Version
+# map version to name
+if [ -x /usr/bin/sw_vers ]; then
+# This is poor, yet functional. We don't care about the 3rd number in
+# the OS version
+ OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
+ case "$OSVER" in
+ "10.5") OS="leopard";;
+ "10.4") OS="tiger";;
+ "10.3") OS="panther";;
+ "10.2") OS="jaguar";;
+ "10.1") OS="puma";;
+ "10.0") OS="cheetah";;
+ *) OS="unknown";;
+ esac
+else
+ OS="unknown"
+fi
+
# Where will we put our temporary files?
BUILD_DIR=/tmp/tor-osx-$$
# Path to PackageMaker app.
@@ -104,7 +123,7 @@ $PACKAGEMAKER -build \
### Assemble the metapackage. Packagemaker won't buld metapackages from
# the command line, so we need to do it by hand.
-MPKG=$BUILD_DIR/output/Tor\ Bundle.mpkg
+MPKG=$BUILD_DIR/output/Tor-$VERSION-$OS-Bundle.mpkg
mkdir -p "$MPKG/Contents/Resources"
echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo"
cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources"
@@ -130,7 +149,7 @@ cp LICENSE $BUILD_DIR/output/Tor\ License.txt
DOC=$BUILD_DIR/output/Documents
mkdir $DOC
-cp doc/tor-doc.html doc/tor-doc.css $DOC
+cp doc/tor-doc.html doc/tor-doc.css doc/tor-doc-osx.html $DOC
cp AUTHORS $DOC/AUTHORS.txt
groff doc/tor.1 -T ps -m man | pstopdf - $DOC/tor-reference.pdf
groff doc/tor-resolve.1 -T ps -m man | pstopdf - $DOC/tor-resolve.pdf
@@ -144,10 +163,10 @@ cp ChangeLog $DOC/Advanced/ChangeLog.txt
find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel
-mv $BUILD_DIR/output "$BUILD_DIR/Tor $VERSION Bundle"
-rm -f "Tor $VERSION Bundle.dmg"
+mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-Bundle"
+rm -f "Tor-$VERSION-$OS-Bundle.dmg"
USER="`whoami`"
-sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor $VERSION Bundle" "Tor $VERSION Bundle.dmg"
-sudo chown "$USER" "Tor $VERSION Bundle.dmg"
+sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor-$VERSION-$OS-Bundle" "Tor-$VERSION-$OS-Bundle.dmg"
+sudo chown "$USER" "Tor-$VERSION-$OS-Bundle.dmg"
sudo rm -rf $BUILD_DIR