#!/bin/sh
#
# Entropy Server QA executable hook.
# This file doesn't strictly need to be a shell script, but just an executable
# file (r-xr-xr-x) and (mandatory) owned by root:root.
# Please rename this file by stripping the .example part
#
# It is used by Entropy Server QA routines to perform package metadata
# validation.
# Metadata is export in environmental variables form, and include:
#
# REPOSITORY_ID = repository identifier
# PKG_ID = package identifier
# PKG_ATOM = package atom
# PKG_NAME = package name
# PKG_VERSION = package version
# PKG_TAG = package version tag
# PKG_DESCRIPTION = package description
# PKG_CATEGORY = package category
# PKG_CHOST = package CHOST
# PKG_CFLAGS = package CFLAGS
# PKG_CXXFLAGS = package CXXFLAGS
# PKG_HOMEPAGE = package homepage
# PKG_LICENSE = package license
# PKG_BRANCH = package license
# PKG_DOWNLOAD = package relative download URL
# PKG_KEYWORDS = package keywords, space separated
# PKG_MD5 = package file md5 hash
# PKG_SLOT = package slot
# PKG_ETPAPI = package Entropy API
# PKG_DATE = package creation date (in unix time)
# PKG_SIZE = package size, in bytes
# PKG_REVISION = package entropy revision
# PKG_DEPS = list (\n separated) of package dependencies and conflicts
# PKG_NEEDED_LIBS = list (\n separated) of SONAMES required by package,
#    including ELF class, so each item will look like this:
#     <soname>|<elfclass>
# PKG_PROVIDED_LIBS = list (\n separated) of SONAMES provided by package,
#    note: elf class and path are also provided,
#    so each item will look like this:
#     <soname>|<path of soname>|<elfclass>
#
# The executable must return 0 for success, 1 for warning, 2 for critical error

echo "packages.server.qa.exec.example file"
echo
echo "REPOSITORY_ID = ${REPOSITORY_ID}"
echo "PKG_ID = ${PKG_ID}"
echo "PKG_ATOM = ${PKG_ATOM}"
echo "PKG_NAME = ${PKG_NAME}"
echo "PKG_VERSION = ${PKG_VERSION}"
echo "PKG_TAG = ${PKG_TAG}"
echo "PKG_DESCRIPTION = ${PKG_DESCRIPTION}"
echo "PKG_CATEGORY = ${PKG_CATEGORY}"
echo "PKG_CHOST = ${PKG_CHOST}"
echo "PKG_CFLAGS = ${PKG_CFLAGS}"
echo "PKG_CXXFLAGS = ${PKG_CXXFLAGS}"
echo "PKG_HOMEPAGE = ${PKG_HOMEPAGE}"
echo "PKG_LICENSE = ${PKG_LICENSE}"
echo "PKG_BRANCH = ${PKG_BRANCH}"
echo "PKG_DOWNLOAD = ${PKG_DOWNLOAD}"
echo "PKG_KEYWORDS = ${PKG_KEYWORDS}"
echo "PKG_MD5 = ${PKG_MD5}"
echo "PKG_SLOT = ${PKG_SLOT}"
echo "PKG_ETPAPI = ${PKG_ETPAPI}"
echo "PKG_DATE = ${PKG_DATE}"
echo "PKG_SIZE = ${PKG_SIZE}"
echo "PKG_REVISION = ${PKG_REVISION}"
echo "PKG_DEPS = ${PKG_DEPS}"
echo "PKG_NEEDED_LIBS = ${PKG_NEEDED_LIBS}"
echo "PKG_PROVIDED_LIBS = ${PKG_PROVIDED_LIBS}"
echo

exit 0