get-scripts annotate bitcoin @ rev 48
bitcoin/litecoin, dropbox, firefox-official, opera: change .desktop files
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Jun 05 01:05:48 2015 +0300 (2015-06-05) |
parents | b2a3c2ad2631 |
children | 69d59307db4d |
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@7 | 15 '/linux.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@36 | 31 [ -d $PACKAGE-$VERSION-linux/bin/32 ] && |
pascal@0 | 32 mv $PACKAGE-$VERSION-linux/bin/32/* $PACKAGE-$VERSION/fs/usr/bin |
pascal@0 | 33 rm -rf $PACKAGE-$VERSION-linux |
pascal@0 | 34 |
pascal@0 | 35 # extracted pkg can be removed: Save RAM |
pascal@0 | 36 rm -f $TARBALL |
pascal@0 | 37 |
pascal@0 | 38 cd $PACKAGE-$VERSION/fs |
pascal@0 | 39 |
pascal@0 | 40 # Create menu |
pascal@0 | 41 mkdir -p usr/share/applications |
pascal@0 | 42 cat > usr/share/applications/$PACKAGE.desktop <<EOT |
pascal@0 | 43 [Desktop Entry] |
al@48 | 44 Type=Application |
pascal@0 | 45 Name=$PACKAGE |
al@48 | 46 Comment=$SHORT_DESC |
pascal@0 | 47 Exec=/usr/bin/$PACKAGE-qt |
al@48 | 48 Icon=stock_certificate |
pascal@0 | 49 Terminal=false |
al@48 | 50 Categories=Office;Finance; |
pascal@0 | 51 EOT |
pascal@0 | 52 cd ../.. |
pascal@2 | 53 set +e |