wok diff get-dropbox/stuff/get-dropbox @ rev 3294
Update: Separate out gcj in h8/300 tools for smaller package sizes
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Thu Jun 04 10:46:22 2009 +0000 (2009-06-04) |
parents | |
children | 32959e7975fc |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-dropbox/stuff/get-dropbox Thu Jun 04 10:46:22 2009 +0000 1.3 @@ -0,0 +1,84 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +# Get and install Dropbox for Linux 1.7 + 1.8 +PACKAGE="dropbox" 1.9 +VERSION="0.6.487" 1.10 +TARBALL="$PACKAGE-lnx.x86-$VERSION.tar.gz" 1.11 +URL="http://dl.getdropbox.com/u/17/$TARBALL" 1.12 +CUR_DIR=$(pwd) 1.13 +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ 1.14 +ROOT="$1" 1.15 + 1.16 +# Check if we are root 1.17 +if test $(id -u) != 0 ; then 1.18 + echo -e "\nYou must be root to run `basename $0`." 1.19 + echo -e "Please type 'su' and root password to become super-user.\n" 1.20 + exit 1 1.21 +fi 1.22 + 1.23 +# Avoid reinstall 1.24 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 1.25 + echo -e "\n$PACKAGE package is already installed.\n" 1.26 + exit 1 1.27 +fi 1.28 + 1.29 +# Create a TEMP_DIR 1.30 +mkdir $TEMP_DIR 1.31 +cd $TEMP_DIR 1.32 + 1.33 +# Download the file 1.34 +wget $URL 1.35 + 1.36 +tar xzf $TARBALL 1.37 +mkdir -p $PACKAGE-$VERSION/fs/usr/lib \ 1.38 + $PACKAGE-$VERSION/fs/usr/bin \ 1.39 + $PACKAGE-$VERSION/fs/usr/share/applications 1.40 + 1.41 +mv $TEMP_DIR/.dropbox-dist $PACKAGE-$VERSION/fs/usr/lib/dropbox 1.42 +strip $PACKAGE-$VERSION/fs/usr/lib/dropbox 2>/dev/null 1.43 + 1.44 +# Custom Dropboxd 1.45 +cat > $PACKAGE-$VERSION/fs/usr/lib/dropbox/dropboxd << "EOT" 1.46 +#!/bin/sh 1.47 +PAR=/usr/lib/dropbox 1.48 +LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH exec $PAR/dropbox $@ 1.49 +EOT 1.50 + 1.51 +# Desktop file 1.52 +cat > $PACKAGE-$VERSION/fs/usr/share/applications/dropbox.desktop << EOT 1.53 +[Desktop Entry] 1.54 +Type=Application 1.55 +Name=Dropbox Storage 1.56 +Exec=dropboxd 1.57 +Icon=dropbox.png 1.58 +Terminal=false 1.59 +Categories=Network 1.60 +EOT 1.61 + 1.62 +# Symling to have Dropbox in PATH and fake nautilus 1.63 +cd $PACKAGE-$VERSION/fs/usr/bin 1.64 +rm -f dropboxd nautilus 1.65 +ln -s ../lib/dropbox/dropboxd . 1.66 +ln -s /usr/bin/pcmanfm nautilus 1.67 + 1.68 +cd $TEMP_DIR 1.69 + 1.70 +cat > $PACKAGE-$VERSION/receipt << EOT 1.71 +PACKAGE="$PACKAGE" 1.72 +VERSION="$VERSION" 1.73 +CATEGORY="non-free" 1.74 +SHORT_DESC="Dropbox daemon and client fro online storage." 1.75 +DEPENDS="python" 1.76 +WEB_SITE="http://www.getdropbox.com/" 1.77 +EOT 1.78 + 1.79 +# Pack 1.80 +tazpkg pack $PACKAGE-$VERSION 1.81 + 1.82 +# Install pseudo package 1.83 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 1.84 + 1.85 +# Clean 1.86 +cd $CUR_DIR 1.87 +rm -rf $TEMP_DIR