# HG changeset patch # User Hans-G?nter Theisgen # Date 1581414224 -3600 # Node ID 4668ebef1dbfdf384e9fa35b85a71c4b52688e73 # Parent 950cf198f5a1a451e9c135bf93c67e10ec678dc6 modified get-litecoin diff -r 950cf198f5a1 -r 4668ebef1dbf get-litecoin/receipt --- a/get-litecoin/receipt Tue Feb 11 09:52:23 2020 +0100 +++ b/get-litecoin/receipt Tue Feb 11 10:43:44 2020 +0100 @@ -1,17 +1,16 @@ # SliTaz package receipt. PACKAGE="get-litecoin" -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" -WEB_SITE="http://litecoin.org/" +WEB_SITE="https://litecoin.org/" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr/bin - cp $stuff/get-litecoin $fs/usr/bin + cp $stuff/get-litecoin $fs/usr/bin } - diff -r 950cf198f5a1 -r 4668ebef1dbf get-litecoin/stuff/get-litecoin --- a/get-litecoin/stuff/get-litecoin Tue Feb 11 09:52:23 2020 +0100 +++ b/get-litecoin/stuff/get-litecoin Tue Feb 11 10:43:44 2020 +0100 @@ -1,56 +1,150 @@ -#!/bin/sh -e +#!/bin/sh +# +# get-litecoin - create and install SliTaz package litecoin +# +# (C) 2020 SliTaz - GNU General Public License v3. +# Author : Pascal Bellard +# modified by HGT on 2020-02-11 +# -PACKAGE="$(basename $0 | sed 's/get-//')" +# === Initialisations === + +PKGS_DB="/var/lib/tazpkg" # packages database directory +PACKAGE="litecoin" 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://litecoin.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 +TMP_DIR="$tmpdir" +[ -z "$tmpdir" ] && TMP_DIR="/tmp/get-$PACKAGE" + +# Logging file (unused by now) +LOG="$logfile" +[ -z "$logfile" ] && LOG=$TMP_DIR/get-$PACKAGE.log + +cat < usr/share/applications/$PACKAGE.desktop < $PACKAGE-$VERSION/receipt <