# HG changeset patch # User Hans-G?nter Theisgen # Date 1554478483 -3600 # Node ID d7b0fb9b6487324f45f00a1cef6db998d998235f # Parent a5dec5e185695ee3231501ae9305f5f4d305dae6 updated command procedure get-google-earth diff -r a5dec5e18569 -r d7b0fb9b6487 get-google-earth/receipt --- a/get-google-earth/receipt Wed Apr 03 18:28:33 2019 +0200 +++ b/get-google-earth/receipt Fri Apr 05 16:34:43 2019 +0100 @@ -1,15 +1,15 @@ # SliTaz package receipt. PACKAGE="get-google-earth" -VERSION="1.00" +VERSION="1.01" CATEGORY="non-free" +TAGS="map visualization" SHORT_DESC="Get Google Earth." MAINTAINER="pascal.bellard@slitaz.org" LICENSE="BSD" -WEB_SITE="http://earth.google.com/" -TAGS="map visualization" +WEB_SITE="https://google.com/earth/" -DEPENDS="bzip2 xorg-base-fonts" +DEPENDS="" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() @@ -17,4 +17,3 @@ mkdir -p $fs/usr/bin cp stuff/get-google-earth $fs/usr/bin } - diff -r a5dec5e18569 -r d7b0fb9b6487 get-google-earth/stuff/get-google-earth --- a/get-google-earth/stuff/get-google-earth Wed Apr 03 18:28:33 2019 +0200 +++ b/get-google-earth/stuff/get-google-earth Fri Apr 05 16:34:43 2019 +0100 @@ -1,80 +1,194 @@ -#!/bin/sh -e +#!/bin/sh +# +# get-google-earth - create and install SliTaz package google-earth +# +# (C) 2019 SliTaz - GNU General Public License v3. +# Author : unknown +# modified by HGT on 2019-04-05 +# -DEPENDS="mesa" -ROOT="$1" -PACKAGE="google-earth" +# === Initialisations === -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 +PKGS_DB="/var/lib/tazpkg" # packages database directory +PACKAGE="google-earth" # package to create and install +WEB_SITE="https://google.com/earth/" +CATEGORY="non-free" +DEPENDS="libglu-mesa" + +# Declare functions check_root, status, ... +. /lib/libtaz.sh +# and make commandline options (if any) available as variables + +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/google-earth ]; then - [ -n "$ROOT" ] && exit 1 - tazpkg remove google-earth - [ -d /var/lib/tazpkg/installed/google-earth ] && 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 < /dev/null) -$(ls /usr/share/applications/*googleearth*.desktop) -/usr/share/applications/defaults.list -$(ls -d /usr/*/google-earth) -EOT -cat > google-earth-$VERSION/receipt < $PACKAGE/description.txt + +SHORT_DESC="$(sed '/^Description:/!d; s/.*: //' $PACKAGE/meta/control)" +MAINTAINER="$(sed '/^Maintainer:/!d; s/.*: //' $PACKAGE/meta/control)" +VERSION="$( sed '/^Version:/!d; s/.*: //' $PACKAGE/meta/control)" +VERSION=${VERSION%-*} # remove -r* suffix + +mv $PACKAGE $PACKAGE-$VERSION + +cd $PACKAGE-$VERSION + +# Create recipe for SliTaz package +cat > receipt <