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