1*bb75b0d5SLexi Winter# SPDX-License-Identifier: ISC 2*bb75b0d5SLexi Winter# 3*bb75b0d5SLexi Winter# Copyright (c) 2026 Lexi Winter <ivy@FreeBSD.org> 4*bb75b0d5SLexi Winter# 5*bb75b0d5SLexi Winter# Permission to use, copy, modify, and distribute this software for any 6*bb75b0d5SLexi Winter# purpose with or without fee is hereby granted, provided that the above 7*bb75b0d5SLexi Winter# copyright notice and this permission notice appear in all copies. 8*bb75b0d5SLexi Winter# 9*bb75b0d5SLexi Winter# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10*bb75b0d5SLexi Winter# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11*bb75b0d5SLexi Winter# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12*bb75b0d5SLexi Winter# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13*bb75b0d5SLexi Winter# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14*bb75b0d5SLexi Winter# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15*bb75b0d5SLexi Winter# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16*bb75b0d5SLexi Winter 17*bb75b0d5SLexi Winter# Variable definitions used by bsd.pkg.mk. All of these may be overridden: 18*bb75b0d5SLexi Winter# 19*bb75b0d5SLexi Winter# PKG_CMD The pkg command. [pkg] 20*bb75b0d5SLexi Winter# PKG_FORMAT The archive format used when creating packages. One of 21*bb75b0d5SLexi Winter# "tzst", "txz", "tbz", "tgz" or "tar". [tzst] 22*bb75b0d5SLexi Winter# PKG_LEVEL The compression level for compressed package formats. 23*bb75b0d5SLexi Winter# The meaning depends on the exact format, or one of the 24*bb75b0d5SLexi Winter# special values "fast" or "best" may be used. [-1] 25*bb75b0d5SLexi Winter# PKG_CTHREADS How many threads to use when creating compressed packages. 26*bb75b0d5SLexi Winter# Set to "0" or "auto" to auto-detect based on the number 27*bb75b0d5SLexi Winter# of CPUs. [0] 28*bb75b0d5SLexi Winter# PKG_ABI_FILE The file used to determine the ABI to use when creating 29*bb75b0d5SLexi Winter# packages. This should refer to the system being built, 30*bb75b0d5SLexi Winter# not the host system. [${WSTAGEDIR}/usr/bin/uname} 31*bb75b0d5SLexi Winter# 32*bb75b0d5SLexi Winter# 33*bb75b0d5SLexi Winter# Package metadata: 34*bb75b0d5SLexi Winter# 35*bb75b0d5SLexi Winter# PKG_NAME_PREFIX The prefix to use for package names. [FreeBSD] 36*bb75b0d5SLexi Winter# PKG_MAINTAINER The package maintainer. [re@FreeBSD.org] 37*bb75b0d5SLexi Winter# PKG_WWW The package website. [https://www.FreeBSD.org] 38*bb75b0d5SLexi Winter# 39*bb75b0d5SLexi Winter# 40*bb75b0d5SLexi Winter# Only if _PKG_NEED_ABI is defined: 41*bb75b0d5SLexi Winter# 42*bb75b0d5SLexi Winter# PKG_ABI The ABI string to use when creating packages. [autodetected] 43*bb75b0d5SLexi Winter# 44*bb75b0d5SLexi Winter.if !target(__<bsd.pkg.pre.mk>__) 45*bb75b0d5SLexi Winter__<bsd.pkg.pre.mk>__: .NOTMAIN 46*bb75b0d5SLexi Winter 47*bb75b0d5SLexi Winter# How we invoke pkg. 48*bb75b0d5SLexi WinterPKG_CMD?= pkg 49*bb75b0d5SLexi WinterPKG_FORMAT?= tzst 50*bb75b0d5SLexi WinterPKG_LEVEL?= -1 51*bb75b0d5SLexi WinterPKG_CLEVEL= ${"${PKG_FORMAT:Mtar}" != "":?:-l ${PKG_LEVEL}} 52*bb75b0d5SLexi WinterPKG_CTHREADS?= 0 53*bb75b0d5SLexi WinterPKG_ABI_FILE?= ${WSTAGEDIR}/usr/bin/uname 54*bb75b0d5SLexi Winter 55*bb75b0d5SLexi Winter# These are used in the generated packages, and can be overridden for 56*bb75b0d5SLexi Winter# downstream builds. 57*bb75b0d5SLexi WinterPKG_NAME_PREFIX?= FreeBSD 58*bb75b0d5SLexi WinterPKG_MAINTAINER?= re@FreeBSD.org 59*bb75b0d5SLexi WinterPKG_WWW?= https://www.FreeBSD.org 60*bb75b0d5SLexi Winter 61*bb75b0d5SLexi Winter# These can be set per-package. 62*bb75b0d5SLexi WinterPKG_LICENSELOGIC?= single 63*bb75b0d5SLexi WinterPKG_LICENSES?= BSD2CLAUSE 64*bb75b0d5SLexi WinterPKG_SETS?= optional optional-jail 65*bb75b0d5SLexi Winter 66*bb75b0d5SLexi Winter# The set annotation may be removed in the future, so don't rely on 67*bb75b0d5SLexi Winter# it being here. 68*bb75b0d5SLexi WinterPKG_ANNOTATIONS+= set 69*bb75b0d5SLexi WinterPKG_ANNOTATIONS.set= ${PKG_SETS:ts,:[*]} 70*bb75b0d5SLexi Winter 71*bb75b0d5SLexi Winter.endif # !target(__<bsd.pkg.pre.mk>__) 72*bb75b0d5SLexi Winter 73*bb75b0d5SLexi Winter# This always needs to be evaluated since something may have previously 74*bb75b0d5SLexi Winter# included us without setting _PKG_NEED_ABI. 75*bb75b0d5SLexi Winter.if defined(_PKG_NEED_ABI) 76*bb75b0d5SLexi Winter 77*bb75b0d5SLexi Winter. if !defined(PKG_ABI) 78*bb75b0d5SLexi WinterPKG_ABI!= ${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI 79*bb75b0d5SLexi Winter. endif 80*bb75b0d5SLexi Winter 81*bb75b0d5SLexi Winter# Usually SRCRELDATE comes from Makefile.inc1, but if it's missing, 82*bb75b0d5SLexi Winter# find it ourselves. 83*bb75b0d5SLexi Winter. if !defined(PKG_OSVERSION) 84*bb75b0d5SLexi Winter. if defined(SRCRELDATE) 85*bb75b0d5SLexi WinterPKG_OSVERSION= ${SRCRELDATE} 86*bb75b0d5SLexi Winter. else 87*bb75b0d5SLexi WinterPKG_OSVERSION!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ 88*bb75b0d5SLexi Winter ${SRCTOP}/sys/sys/param.h 89*bb75b0d5SLexi Winter. endif 90*bb75b0d5SLexi Winter. endif 91*bb75b0d5SLexi Winter 92*bb75b0d5SLexi Winter.endif # defined(_PKG_NEED_ABI) 93