pkgbase: Add PKG_NAME_PREFIX, PKG_MAINTAINER and PKG_WWW

This is useful for downstream users to customize the packages.
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D26019
This commit is contained in:
Emmanuel Vadot 2020-08-11 08:42:24 +00:00
parent b453d3d239
commit 82087d4b68
17 changed files with 61 additions and 45 deletions

View File

@ -552,6 +552,13 @@ SOURCE_DATE_EPOCH= ${TIMEEPOCHNOW:gmtime}
SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP} SOURCE_DATE_EPOCH= ${PKG_TIMESTAMP}
.endif .endif
PKG_NAME_PREFIX?= FreeBSD
PKG_MAINTAINER?= re@FreeBSD.org
PKG_WWW?= https://www.FreeBSD.org
.export PKG_NAME_PREFIX
.export PKG_MAINTAINER
.export PKG_WWW
.if !defined(_MKSHOWCONFIG) .if !defined(_MKSHOWCONFIG)
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \
-m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE -m ${.CURDIR}/share/mk MK_AUTO_OBJ=no -V CPUTYPE
@ -1906,6 +1913,9 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
-e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
-e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
-e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \
-e "s/%PKG_WWW%/${PKG_WWW}/" \
${SRCDIR}/release/packages/kernel.ucl \ ${SRCDIR}/release/packages/kernel.ucl \
> ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
awk -F\" ' \ awk -F\" ' \
@ -1939,6 +1949,9 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
-e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \
-e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
-e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \
-e "s/%PKG_WWW%/${PKG_WWW}/" \
${SRCDIR}/release/packages/kernel.ucl \ ${SRCDIR}/release/packages/kernel.ucl \
> ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ > ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
awk -F\" ' \ awk -F\" ' \

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ GPLv2 ] licenses = [ GPLv2 ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = %PKG_MAINTAINER%
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ BSD2CLAUSE ] licenses = [ BSD2CLAUSE ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ NCSA ] licenses = [ NCSA ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ GPLv2 ] licenses = [ GPLv2 ]

View File

@ -146,6 +146,9 @@ EOF
-e "s/%COMMENT%/${comment}/" \ -e "s/%COMMENT%/${comment}/" \
-e "s/%DESC%/${desc}/" \ -e "s/%DESC%/${desc}/" \
-e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \ -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \
-e "s/%PKG_NAME_PREFIX%/${PKG_NAME_PREFIX}/" \
-e "s/%PKG_WWW%/${PKG_WWW}/" \
-e "s/%PKG_MAINTAINER%/${PKG_MAINTAINER}/" \
${uclfile} ${uclfile}
return 0 return 0
} }

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ GPLv2 ] licenses = [ GPLv2 ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
vital = true vital = true
licenselogic = "single" licenselogic = "single"

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ BSD2CLAUSE ] licenses = [ BSD2CLAUSE ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ NCSA ] licenses = [ NCSA ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ NCSA ] licenses = [ NCSA ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
vital = true vital = true
licenselogic = "single" licenselogic = "single"

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ ISCL ] licenses = [ ISCL ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ APACHE20 ] licenses = [ APACHE20 ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ BSD2CLAUSE ] licenses = [ BSD2CLAUSE ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT%" comment = "%COMMENT%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
licenselogic = "single" licenselogic = "single"
licenses = [ BSD4CLAUSE ] licenses = [ BSD4CLAUSE ]

View File

@ -2,13 +2,13 @@
# $FreeBSD$ # $FreeBSD$
# #
name = "FreeBSD-%PKGNAME%" name = "%PKG_NAME_PREFIX%-%PKGNAME%"
origin = "base" origin = "base"
version = "%VERSION%" version = "%VERSION%"
comment = "%COMMENT% %VCS_REVISION%" comment = "%COMMENT% %VCS_REVISION%"
categories = [ base ] categories = [ base ]
maintainer = "re@FreeBSD.org" maintainer = "%PKG_MAINTAINER%"
www = "https://www.FreeBSD.org" www = "%PKG_WWW%"
prefix = "/" prefix = "/"
vital = true vital = true
licenselogic = "single" licenselogic = "single"