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