# The host name of a Koji instance used for building RPMs. All koji-related
# makefile rules depend on this value being set. Undefined by default.
KOJI_HOST =

# Command (and optionally extra arguments) used to call Koji.
# FIXME: Merge KOJI_HOST into this or find a case where we care about
# KOJI_HOST by itself and delete this FIXME.
KOJI_CMD = koji

# Koji tag used when building packages.
KOJI_TAG = dist-clear

# The gitolite user name for the gitolite instance running at
# GITOLITE_BASE_URL. Undefined by default.
GITOLITE_USER =

# The base URL for a gitolite instance, used for managing git repos. Typically
# you would reference GITOLITE_USER (e.g. $(GITOLITE_USER)@$(GIT_SERVER) ).
# Undefined by default.
GITOLITE_BASE_URL =

# The base URL for a cgit instance for serving gitolite managed repos.
# Typically it will live on the same server as gitolite. Undefined by default.
CGIT_BASE_URL =

# Location of upstream tarball cache used by 'make build', 'make sources', etc.
SOURCES_URL =

# Additional curl options to use when downloading files from SOURCES_URL
SOURCES_CURL_OPTS =

# Location where package repos are hosted.
PKG_BASE_URL = https://github.com/clearlinux-pkgs

# Location where project repos are hosted.
PRJ_BASE_URL = https://github.com/clearlinux

# Project repos that are integral to the common tooling.
PROJ_PKGS = autospec clr-bundles common

# Clear Linux download mirror to use
DOWNLOAD_MIRROR = https://cdn.download.clearlinux.org

# Additional curl options to use when downloading files from DOWNLOAD_MIRROR
MIRROR_CURL_OPTS =

# Location of release content from latest Clear Linux release
LATEST_RELEASE = $(DOWNLOAD_MIRROR)/current

# Location of source RPMs from the latest Clear Linux release
LATEST_SRPMS = $(LATEST_RELEASE)/source/SRPMS

# File containing the list of packages in the distribution.
PACKAGES_FILE = $(TOPLVL)/projects/common/packages

# Configuration file for autospec.
AUTOSPEC_CONF = $(TOPLVL)/projects/common/conf/autospec.conf

# Set this variable to any non-empty value to use the package mappings stored
# in "pkg-mapping" for cloning/pulling package repos.
USE_PACKAGE_MAPPING = yes

# Package manager config file. Default to the in-tree copy of dnf.conf.
PM_CONF = $(TOPLVL)/projects/common/conf/dnf.conf

# Mock configuration file. Default to the in-tree copy.
MOCK_CONF = $(TOPLVL)/projects/common/conf/clear.cfg


# Include any site local configuration variables. These variables may override
# the definitions given above.
-include $(TOPLVL)/projects/common/Makefile.config.site_local


# Define some rules for validating the configuration
.PHONY: kojidef
# Add as a prereq to check for proper configuration of koji-related rules
kojidef:
ifeq ($(strip $(KOJI_HOST)),)
	@echo "Error: KOJI_HOST variable undefined. Cannot run this rule." >&2
	@exit 1
endif
