get-scripts view bitcoin @ rev 41

list CATEGORY, VERSION, LICENSE (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 03 11:41:50 2015 +0200 (2015-05-03)
parents 4e2636029105
children b2a3c2ad2631
line source
1 SHORT_DESC="New digital currency for instant payments to anyone, anywhere."
2 LICENSE="MIT"
3 # end of get.list data
4 WEB_SITE="http://$PACKAGE.org/"
5 MAINTAINER="somebody@$PACKAGE.org"
6 DEPENDS="libQtGui libQtNetwork bzlib"
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