get-scripts annotate dropbox @ rev 2
Add dropbox
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Feb 16 18:12:54 2014 +0000 (2014-02-16) |
parents | |
children | 552ec1a3614c |
rev | line source |
---|---|
pascal@2 | 1 WEB_SITE="http://www.dropbox.com" |
pascal@2 | 2 SHORT_DESC="Dropbox daemon and client for online storage." |
pascal@2 | 3 DEPENDS="python" |
pascal@2 | 4 SUGGESTED="ntlmaps" |
pascal@2 | 5 PLATFORM="lnx.x86" # or lnx.x86_64 |
pascal@2 | 6 TARBALL=$PACKAGE-$PLATFORM.tar.gz |
pascal@2 | 7 URL="$WEB_SITE/download/?plat=$PLATFORM" |
pascal@2 | 8 |
pascal@2 | 9 # Download the file |
pascal@2 | 10 wget --no-check-certificate -O $TARBALL $URL |
pascal@2 | 11 |
pascal@2 | 12 [ -f $TARBALL ] || abort_package "Could not download $TARBALL. Exiting." |
pascal@2 | 13 |
pascal@2 | 14 tar xzf $TARBALL |
pascal@2 | 15 # extracted pkg can be removed: Save RAM |
pascal@2 | 16 rm -f $TARBALL |
pascal@2 | 17 VERSION="$(cat $TMP_DIR/.dropbox-dist/VERSION)" |
pascal@2 | 18 |
pascal@2 | 19 mkdir -p $PACKAGE-$VERSION/fs/usr/lib \ |
pascal@2 | 20 $PACKAGE-$VERSION/fs/usr/bin \ |
pascal@2 | 21 $PACKAGE-$VERSION/fs/usr/share/applications \ |
pascal@2 | 22 $PACKAGE-$VERSION/fs/usr/share/pixmaps |
pascal@2 | 23 |
pascal@2 | 24 mv $TMP_DIR/.dropbox-dist $PACKAGE-$VERSION/fs/usr/lib/dropbox |
pascal@2 | 25 |
pascal@2 | 26 # Custom Dropboxd |
pascal@2 | 27 cat > $PACKAGE-$VERSION/fs/usr/lib/dropbox/dropboxd << "EOT" |
pascal@2 | 28 #!/bin/sh |
pascal@2 | 29 PAR=/usr/lib/dropbox |
pascal@2 | 30 LD_LIBRARY_PATH=$PAR:$LD_LIBRARY_PATH exec $PAR/dropbox $@ |
pascal@2 | 31 EOT |
pascal@2 | 32 |
pascal@2 | 33 # Desktop file |
pascal@2 | 34 cat > $PACKAGE-$VERSION/fs/usr/share/applications/dropbox.desktop << EOT |
pascal@2 | 35 [Desktop Entry] |
pascal@2 | 36 Type=Application |
pascal@2 | 37 Name=Dropbox Storage |
pascal@2 | 38 Exec=dropboxd |
pascal@2 | 39 Icon=dropbox |
pascal@2 | 40 Terminal=false |
pascal@2 | 41 Categories=Network |
pascal@2 | 42 EOT |
pascal@2 | 43 |
pascal@2 | 44 # Symlink to have Dropbox in PATH and fake nautilus |
pascal@2 | 45 cd $PACKAGE-$VERSION/fs/usr/bin |
pascal@2 | 46 rm -f dropboxd nautilus |
pascal@2 | 47 ln -s ../lib/dropbox/dropboxd . |
pascal@2 | 48 ln -s /usr/bin/pcmanfm nautilus |
pascal@2 | 49 cd .. |
pascal@2 | 50 ln $(find lib | sed '/logo\.png$/!d;q') share/pixmaps/dropbox.png |
pascal@2 | 51 |
pascal@2 | 52 cd $TMP_DIR |
pascal@2 | 53 set +e |