aboutsummaryrefslogblamecommitdiff
path: root/sysutils/etc_os-release/Makefile
blob: 060bbea7e00bffdd804e7d7085a77ca85cd4dbe5 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                              
                 






                                                    
                                                                                
 


                                                      
                   



                              
                                
                                  


                        



                                              

                                              
                                       




                                                                   






                                                       



                                                                                        
                           
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>