# HG changeset patch # User Hans-G?nter Theisgen # Date 1580279554 -3600 # Node ID 0467021a493531d54a37919ac7ea97e2ee5a4467 # Parent 666b1da48c974e30aac94cee10d1bcebb505b0fa updated get-bitcoin (1.00 -> 1.01) diff -r 666b1da48c97 -r 0467021a4935 get-bitcoin/receipt --- a/get-bitcoin/receipt Tue Jan 28 15:57:03 2020 +0100 +++ b/get-bitcoin/receipt Wed Jan 29 07:32:34 2020 +0100 @@ -1,17 +1,16 @@ # SliTaz package receipt. PACKAGE="get-bitcoin" -VERSION="1.00" +VERSION="1.01" CATEGORY="misc" SHORT_DESC="Get digital currency tool for instant payments to anyone, anywhere." MAINTAINER="pascal.bellard@slitaz.org" -LICENSE="BSD" +LICENSE="GPLv3" WEB_SITE="http://bitcoin.org/" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/bin - cp $stuff/get-bitcoin $fs/usr/bin + cp $stuff/get-bitcoin $fs/usr/bin } - diff -r 666b1da48c97 -r 0467021a4935 get-bitcoin/stuff/get-bitcoin --- a/get-bitcoin/stuff/get-bitcoin Tue Jan 28 15:57:03 2020 +0100 +++ b/get-bitcoin/stuff/get-bitcoin Wed Jan 29 07:32:34 2020 +0100 @@ -1,53 +1,136 @@ -#!/bin/sh -e +#!/bin/sh +# +# get-bitcoin - create and install SliTaz package bitcoin +# +# (C) 2020 SliTaz - GNU General Public License v3. +# Author : unknown +# modified by HGT on 2020-01-29 +# -PACKAGE="$(basename $0 | sed 's/get-//')" +# === Initialisations === + +PKGS_DB="/var/lib/tazpkg" # packages database directory +PACKAGE="bitcoin" CATEGORY="misc" -WEB_SITE="http://$PACKAGE.org/" SHORT_DESC="New digital currency for instant payments to anyone, anywhere." MAINTAINER="somebody@$PACKAGE.org" +WEB_SITE="https://bitcoin.org/" DEPENDS="libQtGui bzlib" -ROOT="$1" -[ -d "$ROOT" ] || ROOT="" +# Declare functions check_root, status, ... +. /lib/libtaz.sh +# and make commandline options (if any) available as variables -if test $(id -u) != 0 ; then - echo -e "\nYou must be root to run `basename $0`." - echo -e "Please type 'su' and root password to become super-user.\n" - exit 0 +is_installed() +{ + if [ -d $ROOT$PKGS_DB/installed/$PACKAGE ] + then #package is deemed to be installed + return 0 + else + return 1 + fi +} + +# Show commandline options, if requested by --help +if [ "$help" == "yes" ] + then + echo "Commandline options: + $0 + --version= + --root= + --install=yes|no + --keep=no|yes + --tmpdir=" + exit fi -if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then - [ -n "$ROOT" ] && exit 1 - tazpkg remove $PACKAGE - [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 +# Check for system administrator privileges +check_root + +title "Package $PACKAGE will be build as SliTaz package and installed" + +# Fetch latest version, unless version is set by option --version +[ -z "$version" ] && version="latest" + +# Install SliTaz package, unless inhibited by option --install=no +[ -z "$install" ] && install="yes" + +# Delete SliTaz package file $PACKAGE-$VERSION.tazpkg after installation, +# unless option --keep=yes is given +[ -z "$keep" ] && keep="no" + +# Directory for temporary files +[ -z "$tempdir" ] && TMP_DIR="/tmp/get-$PACKAGE" + +# Logging file (unused by now) +LOG=$TMP_DIR/get-$PACKAGE.log + +cat < $PACKAGE-$VERSION/receipt < receipt <