diff options
author | Andrew Lewman <andrew@torproject.org> | 2006-08-13 00:32:22 +0000 |
---|---|---|
committer | Andrew Lewman <andrew@torproject.org> | 2006-08-13 00:32:22 +0000 |
commit | 02258203e7cfa5a4715d881b287ae7922fd4d241 (patch) | |
tree | 7def6eeff229d4b35fea8b527b9ee43042c86985 | |
parent | a7f8cd4ab9da2aacc2e5495ff3a1566b16ab11c0 (diff) | |
download | tor-02258203e7cfa5a4715d881b287ae7922fd4d241.tar.gz tor-02258203e7cfa5a4715d881b287ae7922fd4d241.zip |
Backport naming convention of the OSX dmg which now includes the cpu
architecture.
svn:r7040
-rw-r--r-- | contrib/osx/package.sh | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/contrib/osx/package.sh b/contrib/osx/package.sh index 1012163a05..f61bcad3bd 100644 --- a/contrib/osx/package.sh +++ b/contrib/osx/package.sh @@ -25,12 +25,19 @@ 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--$OS-Bundle.dmg" +# Make sure VERSION is set, so we don't name the package +# "Tor--$OS-$ARCH-Bundle.dmg" if [ "XX$VERSION" = 'XX' ]; then echo "VERSION not set." exit 1 fi +if [ -x /usr/bin/arch ]; then + ARCH=`/usr/bin/arch` +else + ARCH="unknown" +fi + ## Determine OSX Version # map version to name if [ -x /usr/bin/sw_vers ]; then @@ -78,6 +85,7 @@ chmod 755 contrib/osx/TorPostflight cp contrib/osx/TorPostflight $BUILD_DIR/tor_resources/postflight cp contrib/osx/addsysuser $BUILD_DIR/tor_resources/addsysuser cp contrib/osx/Tor_Uninstaller.applescript $BUILD_DIR/tor_resources/Tor_Uninstaller.applescript +cp contrib/osx/Tor_Uninstaller.app.tar.gz $BUILD_DIR/tor_resources/Tor_Uninstaller.app.tar.gz cp contrib/osx/uninstall_tor_bundle.sh $BUILD_DIR/tor_resources/uninstall_tor_bundle.sh cp contrib/osx/package_list.txt $BUILD_DIR/tor_resources/package_list.txt cp contrib/osx/tor_logo.gif $BUILD_DIR/tor_resources/background.gif @@ -130,21 +138,21 @@ $PACKAGEMAKER -build \ ### Make Startup Script package -mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor -cp contrib/osx/Tor contrib/osx/StartupParameters.plist \ + mkdir -p $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor + cp contrib/osx/Tor contrib/osx/StartupParameters.plist \ $BUILD_DIR/torstartup_packageroot/Library/StartupItems/Tor -find $BUILD_DIR/torstartup_packageroot -print0 | sudo xargs -0 chown root:wheel -$PACKAGEMAKER -build \ - -p $BUILD_DIR/output/torstartup.pkg \ - -f $BUILD_DIR/torstartup_packageroot \ - -i contrib/osx/TorStartupInfo.plist \ - -d contrib/osx/TorStartupDesc.plist + find $BUILD_DIR/torstartup_packageroot -print0 | sudo xargs -0 chown root:wheel + $PACKAGEMAKER -build \ + -p $BUILD_DIR/output/torstartup.pkg \ + -f $BUILD_DIR/torstartup_packageroot \ + -i contrib/osx/TorStartupInfo.plist \ + -d contrib/osx/TorStartupDesc.plist ### 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-$VERSION-$OS-Bundle.mpkg +MPKG=$BUILD_DIR/output/Tor-$VERSION-$OS-$ARCH-Bundle.mpkg mkdir -p "$MPKG/Contents/Resources" echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo" cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources" @@ -171,10 +179,10 @@ cp LICENSE $BUILD_DIR/output/Tor\ License.txt find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel -mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-Bundle" -rm -f "Tor-$VERSION-$OS-Bundle.dmg" +mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-$ARCH-Bundle" +rm -f "Tor-$VERSION-$OS-$ARCH-Bundle.dmg" USER="`whoami`" -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 hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor-$VERSION-$OS-$ARCH-Bundle" "Tor-$VERSION-$OS-$ARCH-Bundle.dmg" +sudo chown "$USER" "Tor-$VERSION-$OS-$ARCH-Bundle.dmg" sudo rm -rf $BUILD_DIR |