summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acct-user/git/git-0.ebuild29
-rw-r--r--acct-user/git/metadata.xml15
2 files changed, 44 insertions, 0 deletions
diff --git a/acct-user/git/git-0.ebuild b/acct-user/git/git-0.ebuild
new file mode 100644
index 000000000000..384b3bd703e6
--- /dev/null
+++ b/acct-user/git/git-0.ebuild
@@ -0,0 +1,29 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit acct-user
+
+DESCRIPTION="Git repository hosting user"
+
+IUSE="gitea gitolite"
+REQUIRED_USE="^^ ( gitea gitolite )"
+
+ACCT_USER_ID=196
+ACCT_USER_HOME_OWNER=git:git
+ACCT_USER_HOME_PERMS=750
+ACCT_USER_SHELL=/bin/sh
+ACCT_USER_GROUPS=( git )
+
+acct-user_add_deps
+
+pkg_setup() {
+ if use gitea; then
+ ACCT_USER_HOME=/var/lib/gitea
+ elif use gitolite; then
+ ACCT_USER_HOME=/var/lib/gitolite
+ else
+ die "Incorrect USE flag combination"
+ fi
+}
diff --git a/acct-user/git/metadata.xml b/acct-user/git/metadata.xml
new file mode 100644
index 000000000000..159d766b8251
--- /dev/null
+++ b/acct-user/git/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <use>
+ <flag name="gitea">Set home directory for git hosting
+ via <pkg>www-apps/gitea</pkg>.</flag>
+ <flag name="gitolite">Set home directory for git hosting
+ via <pkg>dev-vcs/gitolite</pkg>
+ or <pkg>dev-vcs/gitolite-gentoo</pkg>.</flag>
+ </use>
+</pkgmetadata>