get-scripts annotate bitcoin @ rev 73
opera: update URL
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 27 14:58:46 2017 +0200 (2017-09-27) |
parents | 2cb082503ef7 |
children | ebbc906a623e |
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@63 | 26 [ -f $TARBALL ] || abort_package |
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 ../.. |