#!/bin/bash shopt -s extglob nullglob PKG_NAME=$1 shift if [[ ${PKG_NAME} == */* ]]; then PKG_PARENT="${PKG_NAME%%/*}" PKG_NAME="${PKG_NAME#*/}" fi export PKG_NAME PKG_PARENT export PKG_BASE=$(realpath "$(dirname "$0")") . "${PKG_BASE}/helper.sh" if [[ -n $2 ]]; then PKG_VRSN=$2 fi cat <= 1.14.25-8)" fi if [[ -e ${PKG_FILE_PREDEPENDS} ]]; then if [[ ${comma+@} == @ ]]; then echo -n "," else echo -n "Pre-Depends:" comma= fi echo -n " $(cat "${PKG_FILE_PREDEPENDS}")" fi if [[ ${comma+@} == @ ]]; then echo fi fi if [[ ! -e ${PKG_FILE_DEPENDS_} ]]; then . "${PKG_BASE}/autodeps.sh" unset comma for dep in "${PKG_DEPS[@]}"; do if [[ ${dep} == _* ]]; then continue fi if [[ ${comma+@} == @ ]]; then echo -n "," else echo -n "Depends:" comma= fi echo -n " $(basename "${dep}" .dep)" ver=${PKG_DATA}/_metadata/${dep%.dep}.ver if [[ -e "${ver}" ]]; then echo -n " (>= $(cat "${ver}"))" fi done if [[ -e ${PKG_FILE_DEPENDS} ]]; then if [[ ${comma+@} == @ ]]; then echo -n "," else echo -n "Depends:" comma= fi echo -n " $(cat "${PKG_FILE_DEPENDS}" | sed -e s/%MYVERSION%/${PKG_VRSN%-*}/g)" fi if [[ -e ${PKG_FILE_DEPENDS_ARCH} ]]; then if [[ ${comma+@} == @ ]]; then echo -n "," else echo -n "Depends:" comma= fi echo -n " $(cat "${PKG_FILE_DEPENDS_ARCH}" | sed -e s/%MYVERSION%/${PKG_VRSN%-*}/g)" fi if [[ ${comma+@} == @ ]]; then echo fi elif [[ -s ${PKG_DATA}/_metadata/depends_ ]]; then echo "Depends: $(cat "${PKG_DATA}/_metadata/depends_")" fi if [[ -e ${PKG_FILE_REPLACES} ]]; then cat <&2 exit 1; fi cat <