get-scripts annotate bitcoin @ rev 57

Update litecoin tarball name
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Apr 23 22:23:17 2016 +0200 (2016-04-23)
parents 2cdf3e534506
children 62d94e6800db
rev   line source
pascal@34 1 SHORT_DESC="New digital currency for instant payments to anyone, anywhere."
pascal@40 2 LICENSE="MIT"
pascal@34 3 # end of get.list data
pascal@0 4 WEB_SITE="http://$PACKAGE.org/"
pascal@0 5 MAINTAINER="somebody@$PACKAGE.org"
pascal@0 6 DEPENDS="libQtGui libQtNetwork bzlib"
pascal@0 7
pascal@0 8 # Download tarball
pascal@7 9 case "$PACKAGE" in
pascal@7 10 bitcoin)
pascal@7 11 WGET_URL=$(wget --no-check-certificate -O - $WEB_SITE/en/download | sed \
pascal@36 12 '/linux32.tar/!d;s/.*href="\([^"]*\).*/\1/;s|/download$||') ;;
pascal@7 13 litecoin)
pascal@7 14 WGET_URL=$(wget --no-check-certificate -O - $WEB_SITE | sed \
pascal@57 15 '/linux32.tar/!d;s/.*href="\([^"]*\).*/\1/;q') ;;
pascal@7 16 esac
pascal@0 17 case "$WGET_URL" in
pascal@0 18 ftp*|http*);;
pascal@0 19 *) WGET_URL=$WEB_SITE$WGET_URL;;
pascal@0 20 esac
pascal@0 21 TARBALL="$(basename $WGET_URL)"
pascal@36 22 VERSION="$(echo $TARBALL | sed 's/.*coin-\(.*\)-linux.*tar.*/\1/')"
pascal@46 23 [ "$1" == "--get-version" ] && echo $VERSION && exit
pascal@0 24 wget --no-check-certificate -O $TARBALL "$WGET_URL"
pascal@0 25
pascal@0 26 [ -f $TARBALL ] || abort_package "Could not download $TARBALL from $WGET_URL. Exiting."
pascal@0 27
pascal@0 28 mkdir -p $PACKAGE-$VERSION/fs/usr/bin
pascal@7 29 busybox tar xf $TARBALL
pascal@0 30
pascal@51 31 [ -d $PACKAGE-$VERSION/lib ] && for i in bin lib include ; do
pascal@51 32 mv $PACKAGE-$VERSION/$i $PACKAGE-$VERSION/fs/usr
pascal@51 33 done
pascal@36 34 [ -d $PACKAGE-$VERSION-linux/bin/32 ] &&
pascal@0 35 mv $PACKAGE-$VERSION-linux/bin/32/* $PACKAGE-$VERSION/fs/usr/bin
pascal@0 36 rm -rf $PACKAGE-$VERSION-linux
pascal@0 37
pascal@0 38 # extracted pkg can be removed: Save RAM
pascal@0 39 rm -f $TARBALL
pascal@0 40
pascal@0 41 cd $PACKAGE-$VERSION/fs
pascal@0 42
pascal@0 43 # Create menu
pascal@0 44 mkdir -p usr/share/applications
pascal@0 45 cat > usr/share/applications/$PACKAGE.desktop <<EOT
pascal@0 46 [Desktop Entry]
al@48 47 Type=Application
pascal@0 48 Name=$PACKAGE
al@48 49 Comment=$SHORT_DESC
pascal@0 50 Exec=/usr/bin/$PACKAGE-qt
al@48 51 Icon=stock_certificate
pascal@0 52 Terminal=false
al@48 53 Categories=Office;Finance;
pascal@0 54 EOT
pascal@0 55 cd ../..