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