#
# DISTRO_COMPAT_REPOS
#

if [ "$DISTRO_COMPAT_VERSION" = "" ] ; then
	[ -f ./DISTRO_SPECS ] && . ./DISTRO_SPECS
fi

case "$DISTRO_TARGETARCH" in
	x86)    DBIN_ARCH=i386  ;;
	x86_64) DBIN_ARCH=amd64 ;;
	arm)    DBIN_ARCH=armhf ;;
esac

#----------------------
#PKG_DOCS_DISTRO_COMPAT - where to download the compat-distro pkgs databases from
#---------------------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the database file.
#   3 - name of db file when local and after being processed into standard format

PKG_DOCS_DISTRO_COMPAT="
z|https://http.us.debian.org/debian/dists/${DISTRO_COMPAT_VERSION}/main/binary-${DBIN_ARCH}/Packages.xz|Packages-debian-${DISTRO_COMPAT_VERSION}-main
z|https://http.us.debian.org/debian/dists/${DISTRO_COMPAT_VERSION}/non-free/binary-${DBIN_ARCH}/Packages.xz|Packages-debian-${DISTRO_COMPAT_VERSION}-non-free
z|https://http.us.debian.org/debian/dists/${DISTRO_COMPAT_VERSION}/non-free-firmware/binary-${DBIN_ARCH}/Packages.xz|Packages-debian-${DISTRO_COMPAT_VERSION}-non-free-firmware
z|https://http.us.debian.org/debian/dists/${DISTRO_COMPAT_VERSION}/contrib/binary-${DBIN_ARCH}/Packages.xz|Packages-debian-${DISTRO_COMPAT_VERSION}-contrib
"

#-------------------
#REPOS_DISTRO_COMPAT - hardcode the compat-distro repos in here...
#-------------------
# 1|2|3
#   1 - domain. for testing the url.
#   2 - full URI of the repo
#   3 - name of db-file(s) associated with that repo. it may have glob wildcards.

REPOS_DISTRO_COMPAT="
z|https://http.us.debian.org/debian|Packages-debian-${DISTRO_COMPAT_VERSION}-*
z|https://mirrors.kernel.org/debian|Packages-debian-${DISTRO_COMPAT_VERSION}-*
z|https://ftp.de.debian.org/debian|Packages-debian-${DISTRO_COMPAT_VERSION}-*
"


#---------------
# fix variables
#---------------
PKG_DOCS_DISTRO_COMPAT="$(echo $PKG_DOCS_DISTRO_COMPAT)"
REPOS_DISTRO_COMPAT="$(echo $REPOS_DISTRO_COMPAT)"
