summaryrefslogtreecommitdiff
path: root/acct-user/vdr
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
commit93a93e9a3b53c1a73142a305ea1f8136846942ee (patch)
treeb9791a06ab3284e27b568412c59316c66240c682 /acct-user/vdr
parent2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff)
gentoo resync : 22.12.2021
Diffstat (limited to 'acct-user/vdr')
-rw-r--r--acct-user/vdr/Manifest2
-rw-r--r--acct-user/vdr/metadata.xml23
-rw-r--r--acct-user/vdr/vdr-0.ebuild62
3 files changed, 87 insertions, 0 deletions
diff --git a/acct-user/vdr/Manifest b/acct-user/vdr/Manifest
new file mode 100644
index 000000000000..0e7f0848f82c
--- /dev/null
+++ b/acct-user/vdr/Manifest
@@ -0,0 +1,2 @@
+EBUILD vdr-0.ebuild 1949 BLAKE2B 4d724c7f96d41240af0fe4f19d9f27ee7ec0cdc061099084d26d30e1dd2e3b7484c9333b843bbc087d4b58b06a11b2bd05977767646900e8b9714189afe29b7a SHA512 f1df714e80706a0414ca938774bf96aab2a8c50d2c38737ff6efe61553dbfc60d55aad8f955d4fb2aa3c502f8ae10a615ddd42a498c90830a5cc42989109aed2
+MISC metadata.xml 1005 BLAKE2B cd363066d9d4e25d5b5a4d70805a8d5f06efc2cd1ddacc1cb92878d14b274c9e3f8ff60147c7148538cb41a4182b694a80aa24805507db4d92800941acb590d8 SHA512 fe67b020f0fc4546e1f8f1f9018247da78a77240032e10acc823c9a9248f1f99b8073c17ab0bf1b6970727d3b6f3dcd551c48f8ccf1d0e5346e47ecfe79b9a90
diff --git a/acct-user/vdr/metadata.xml b/acct-user/vdr/metadata.xml
new file mode 100644
index 000000000000..b0a6246a09bb
--- /dev/null
+++ b/acct-user/vdr/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>martin.dummer@gmx.net</email>
+ <name>Martin Dummer</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+ <use>
+ <flag name="graphlcd">Prepare group membership for <pkg>media-plugins/vdr-graphlcd</pkg>.</flag>
+ <flag name="legacy-homedir">Keep old home directory /var/vdr of an existing installation. When
+ this useflag is cleared, the home directory is switched to FHS conformant /var/lib/vdr</flag>
+ <flag name="remote">Prepare group membership for <pkg>media-plugins/vdr-remote</pkg>.</flag>
+ <flag name="serial">Prepare group membership for <pkg>media-plugins/vdr-serial</pkg>.</flag>
+ </use>
+</pkgmetadata>
diff --git a/acct-user/vdr/vdr-0.ebuild b/acct-user/vdr/vdr-0.ebuild
new file mode 100644
index 000000000000..55986b2ff78d
--- /dev/null
+++ b/acct-user/vdr/vdr-0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit acct-user user-info
+
+ACCT_USER_ID=452
+ACCT_USER_HOME=/var/lib/vdr
+ACCT_USER_GROUPS=( vdr audio cdrom video )
+
+DESCRIPTION="VDR (VideoDiskRecorder) service user"
+IUSE="graphlcd legacy-homedir remote serial systemd"
+
+acct-user_add_deps
+
+pkg_setup() {
+ # if user wants to preserve his existing vdr installation,
+ # he can set USE=legacy-homedir
+ use legacy-homedir && ACCT_USER_HOME=/var/vdr
+
+ # media-plugins/vdr-graphlcd
+ use graphlcd && ACCT_USER_GROUPS+=( lp usb )
+
+ # media-plugins/vdr-remote, _only_ when systemd is installed
+ if use remote; then
+ if use systemd; then
+ ACCT_USER_GROUPS+=( input )
+ else
+ einfo "use-flag remote has no effect on systemd systems"
+ fi
+ fi
+
+ # media-plugins/vdr-serial: add group to access /dev/ttyS*
+ # on systemd systems: add "dialout"
+ # non-systemd systems: add "uucp"
+ if use serial; then
+ if use systemd; then
+ ACCT_USER_GROUPS+=( dialout )
+ else
+ ACCT_USER_GROUPS+=( uucp )
+ fi
+ fi
+}
+
+pkg_preinst() {
+ # if useflag legacy-homedir is _not_ set, check if user vdr exists and what his homedir is
+ if ! use legacy-homedir; then
+ local EXISTING_HOME=$(egethome vdr)
+ if [[ "${EXISTING_HOME}" = "/var/vdr" ]]; then
+ ewarn "The user \"vdr\" exists on this system, his current home directory is \"/var/vdr\""
+ ewarn "The new default home directory for user vdr is \"/var/lib/vdr\""
+ ewarn "You have three options to continue:"
+ ewarn " - set USE=legacy-homedir for ${CATEGORY}/${PN} to continue to use /var/vdr"
+ ewarn " - move /var/vdr to /var/lib/vdr manually and repeat to install ${CATEGORY}/${PN}"
+ ewarn " - move /var/vdr to /var/vdr.old or anywhere else (to keep it as your backup), repeat to"
+ ewarn " install ${CATEGORY}/${PN} and let the installation create a fresh /var/lib/vdr"
+ ewarn "the emerge will stop here."
+ die "user action required"
+ fi
+ fi
+}