diff --git a/tools/pkginfo b/tools/pkginfo new file mode 100755 index 00000000000..bcdd6648466 --- /dev/null +++ b/tools/pkginfo @@ -0,0 +1,27 @@ +#!/bin/bash + +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv) + +STRIP=no +if [ "$1" = "--strip" -o "$1" = "-s" ]; then + shift + STRIP=yes +fi + +. config/options "$1" + +shift + +echo "PROJECT=${PROJECT}, DEVICE=${DEVICE}, ARCH=${ARCH}" + +for v in PKG_NAME PKG_VERSION PKG_SITE PKG_URL PKG_DIR \ + PKG_NEED_UNPACK PKG_DEPENDS_UNPACK \ + PKG_DEPENDS_BOOTSTRAP PKG_DEPENDS_INIT PKG_DEPENDS_HOST PKG_DEPENDS_TARGET \ + PKG_IS_ADDON PKG_IS_KERNEL_PKG $@; do + if [ "${STRIP}" = "yes" ]; then + echo "${v}=\"${!v}\"" | sed "s#${ROOT}/##g" + else + echo "${v}=\"${!v}\"" + fi +done