get-scripts annotate litecoin @ rev 2

Add dropbox
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Feb 16 18:12:54 2014 +0000 (2014-02-16)
parents 82a491ecdeb5
children 8b66f6a75a05
rev   line source
pascal@0 1 WEB_SITE="http://$PACKAGE.org/"
pascal@0 2 SHORT_DESC="New digital currency for instant payments to anyone, anywhere."
pascal@0 3 MAINTAINER="somebody@$PACKAGE.org"
pascal@0 4 DEPENDS="libQtGui libQtNetwork bzlib"
pascal@0 5
pascal@0 6 # Download tarball
pascal@0 7 WGET_URL=$(wget --no-check-certificate -O - $WEB_SITE | sed '/linux.tar/!d;;s/.*href="\([^"]*\).*/\1/;q')
pascal@0 8 case "$WGET_URL" in
pascal@0 9 ftp*|http*);;
pascal@0 10 *) WGET_URL=$WEB_SITE$WGET_URL;;
pascal@0 11 esac
pascal@0 12 TARBALL="$(basename $WGET_URL)"
pascal@0 13 VERSION="$(echo $TARBALL | sed 's/.*coin-\(.*\)-linux.tar.*/\1/')"
pascal@0 14 wget --no-check-certificate -O $TARBALL "$WGET_URL"
pascal@0 15
pascal@0 16 [ -f $TARBALL ] || abort_package "Could not download $TARBALL from $WGET_URL. Exiting."
pascal@0 17
pascal@0 18 mkdir -p $PACKAGE-$VERSION/fs/usr/bin
pascal@0 19 busybox tar xf $TARBALL
pascal@0 20
pascal@0 21 mv $PACKAGE-$VERSION-linux/bin/32/* $PACKAGE-$VERSION/fs/usr/bin
pascal@0 22 rm -rf $PACKAGE-$VERSION-linux
pascal@0 23
pascal@0 24 # extracted pkg can be removed: Save RAM
pascal@0 25 rm -f $TARBALL
pascal@0 26
pascal@0 27 cd $PACKAGE-$VERSION/fs
pascal@0 28
pascal@0 29 # Create menu
pascal@0 30 mkdir -p usr/share/applications
pascal@0 31 cat > usr/share/applications/$PACKAGE.desktop <<EOT
pascal@0 32 [Desktop Entry]
pascal@0 33 Version=1.0
pascal@0 34 Encoding=UTF-8
pascal@0 35 Name=$PACKAGE
pascal@0 36 Exec=/usr/bin/$PACKAGE-qt
pascal@0 37 Icon=stock_certificate.png
pascal@0 38 Terminal=false
pascal@0 39 Categories=Application
pascal@0 40 Comment=$SHORT_DESC
pascal@0 41 Type=Application
pascal@0 42 Categories=Office;
pascal@0 43 EOT
pascal@0 44 cd ../..
pascal@2 45 set +e