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