get-scripts view bitcoin @ rev 36

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