get-scripts view 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
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 '/linux32.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 [ "$1" == "--get-version" ] && echo $VERSION && exit
24 wget --no-check-certificate -O $TARBALL "$WGET_URL"
26 [ -f $TARBALL ] || abort_package
28 mkdir -p $PACKAGE-$VERSION/fs/usr/bin
29 busybox tar xf $TARBALL
31 [ -d $PACKAGE-$VERSION/lib ] && for i in bin lib include ; do
32 mv $PACKAGE-$VERSION/$i $PACKAGE-$VERSION/fs/usr
33 done
34 [ -d $PACKAGE-$VERSION-linux/bin/32 ] &&
35 mv $PACKAGE-$VERSION-linux/bin/32/* $PACKAGE-$VERSION/fs/usr/bin
36 rm -rf $PACKAGE-$VERSION-linux
38 # extracted pkg can be removed: Save RAM
39 rm -f $TARBALL
41 cd $PACKAGE-$VERSION/fs
43 # Create menu
44 mkdir -p usr/share/applications
45 cat > usr/share/applications/$PACKAGE.desktop <<EOT
46 [Desktop Entry]
47 Type=Application
48 Name=$PACKAGE
49 Comment=$SHORT_DESC
50 Exec=/usr/bin/$PACKAGE-qt
51 Icon=stock_certificate
52 Terminal=false
53 Categories=Office;Finance;
54 EOT
55 cd ../..