freebsd-ports/sysutils/etc_os-release/Makefile
Muhammad Moinur Rahman d8b355fa7e sysutils/etc_os-release: Mark DEPRECATED
As this has landed in base of 13 and later this port is no longer
required after the EOL of 12.

Approved by:	portmgr (blanket)
2023-09-30 04:23:02 +02:00

49 lines
1.2 KiB
Makefile

PORTNAME= etc_os-release
PORTVERSION= 0.1
PORTREVISION= 3
CATEGORIES= sysutils kde gnome
MASTER_SITES= #
DISTFILES= #
EXTRACT_ONLY= #
MAINTAINER= tcberner@FreeBSD.org
COMMENT= Operating system identification file
WWW= https://www.freedesktop.org/software/systemd/man/os-release.html
DEPRECATED= No longer required after the EOL of 12
EXPIRATION_DATE= 2023-12-31
NO_ARCH= yes
NO_BUILD= yes
PLIST_FILES= etc/os-release
.if exists(/bin/freebsd-version)
VERSION!= freebsd-version -u
.else
VERSION!= uname -r
.endif
VERSION_ID= ${VERSION:C/^([0-9\.]+).*/\1/}
CONTENTS= 'NAME=FreeBSD\0'$\
'VERSION=${VERSION}\0'$\
'VERSION_ID=${VERSION_ID}\0'$\
'ID=freebsd\0'$\
'ANSI_COLOR="0;31"\0'$\
'PRETTY_NAME="FreeBSD ${VERSION}"\0'$\
'CPE_NAME=cpe:/o:freebsd:freebsd:${VERSION_ID}\0'$\
'HOME_URL=https://freebsd.org/\0'$\
'BUG_REPORT_URL=https://bugs.freebsd.org'
.include <bsd.port.pre.mk>
# FreeBSD base gained /etc/os-release in r354922, which
# corresponds to __FreeBSD_version 1300060
.if ${OSVERSION} >= 1300060
IGNORE= /etc/os-release is present in base
.endif
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc
${ECHO} -e ${CONTENTS} | ${XARGS} -0 -n 1 >> ${STAGEDIR}${PREFIX}/${PLIST_FILES}
.include <bsd.port.post.mk>