svn commit: r500363 - in head/sysutils: . etc_os-release

Tobias C. Berner tcberner at FreeBSD.org
Sun Apr 28 19:22:23 UTC 2019


Author: tcberner
Date: Sun Apr 28 19:22:21 2019
New Revision: 500363
URL: https://svnweb.freebsd.org/changeset/ports/500363

Log:
  New port: sysutils/etc_os-release
  
  Modern Linux systems provide /etc/os-release containing information
  about the installed operating system. For example Qt reads said file
  to get that information.
  
  For more information on the file, see:
  	https://www.freedesktop.org/software/systemd/man/os-release.html
  
  Reviewed by:	adridg, danfe, kwm
  Differential Revision:	https://reviews.freebsd.org/D19866

Added:
  head/sysutils/etc_os-release/
  head/sysutils/etc_os-release/Makefile   (contents, props changed)
  head/sysutils/etc_os-release/pkg-descr   (contents, props changed)
Modified:
  head/sysutils/Makefile

Modified: head/sysutils/Makefile
==============================================================================
--- head/sysutils/Makefile	Sun Apr 28 19:08:18 2019	(r500362)
+++ head/sysutils/Makefile	Sun Apr 28 19:22:21 2019	(r500363)
@@ -301,6 +301,7 @@
     SUBDIR += env4801
     SUBDIR += envconsul
     SUBDIR += epazote
+    SUBDIR += etc_os-release
     SUBDIR += etcmerge
     SUBDIR += etcupdate
     SUBDIR += eventlog

Added: head/sysutils/etc_os-release/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/etc_os-release/Makefile	Sun Apr 28 19:22:21 2019	(r500363)
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+PORTNAME=	etc_os-release
+PORTVERSION=	0.1
+CATEGORIES=	sysutils kde gnome
+MASTER_SITES=	#
+DISTFILES=	#
+EXTRACT_ONLY=	#
+
+MAINTAINER=	tcberner at FreeBSD.org
+COMMENT=	Operating system identification file
+
+NO_BUILD=	yes
+
+PLIST_FILES=	etc/os-release
+
+VERSION!=	freebsd-version -u
+VERSION_ID=	${VERSION:C/^([0-9\.]+).*/\1/}
+
+CONTENTS=	'NAME=FreeBSD\0'$\
+		'VERSION=${VERSION}\0'$\
+		'ID=${VERSION_ID}\0'$\
+		'VERSION_ID=freebsd\0'$\
+		'ANSI_COLIR="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'
+
+do-install:
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc
+	${ECHO} -e ${CONTENTS} | ${XARGS} -0 -n 1 >> ${STAGEDIR}${PREFIX}/${PLIST_FILES}
+
+.include <bsd.port.mk>

Added: head/sysutils/etc_os-release/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/etc_os-release/pkg-descr	Sun Apr 28 19:22:21 2019	(r500363)
@@ -0,0 +1,4 @@
+This package installs /usr/local/etc/os-release file which contains version and
+other information about installed operating system.
+
+WWW: https://www.freedesktop.org/software/systemd/man/os-release.html


More information about the svn-ports-all mailing list