aboutsummaryrefslogtreecommitdiffstats
path: root/www/gitea
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2017-10-29 15:55:33 +0800
committertobik <tobik@FreeBSD.org>2017-10-29 15:55:33 +0800
commit7e366b4983d14952e1d0e62d31464556ad838509 (patch)
treefc2bfeb1136bca0dfe41f22cca59ea634ef2f1b5 /www/gitea
parentac1b5dd897403558a32a25ce1dfd612a19c51bdc (diff)
downloadfreebsd-ports-gnome-7e366b4983d14952e1d0e62d31464556ad838509.tar.gz
freebsd-ports-gnome-7e366b4983d14952e1d0e62d31464556ad838509.tar.zst
freebsd-ports-gnome-7e366b4983d14952e1d0e62d31464556ad838509.zip
www/gitea: Fix rc script on FreeBSD 10.x/11.0
On FreeBSD 10.x/11.0 daemon(8) doesn't have -s,-l,-t, so starting gitea would fail. We partially revert the change from r453018 and use the old behavior on these versions and don't log stdout/stderr to syslog. PR: 223283 Approved by: stb@lassitu.de (maintainer)
Diffstat (limited to 'www/gitea')
-rw-r--r--www/gitea/Makefile12
-rw-r--r--www/gitea/files/gitea.in4
2 files changed, 13 insertions, 3 deletions
diff --git a/www/gitea/Makefile b/www/gitea/Makefile
index 6213bff9b6c0..b75cd2e15ce3 100644
--- a/www/gitea/Makefile
+++ b/www/gitea/Makefile
@@ -4,6 +4,7 @@
PORTNAME= gitea
PORTVERSION= 1.2.2
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= www
MAINTAINER= stb@lassitu.de
@@ -32,7 +33,6 @@ GROUPS= git
OPTIONS_DEFINE= CERT PAM SQLITE
CERT_DESC= Automatic creation of self-signed certificates
PAM_DESC= Authentication using PAM
-SQLITE= Add SQLite as database backend
OPTIONS_DEFAULT= ${OPTIONS_DEFINE}
@@ -40,6 +40,16 @@ CERT_VARS= GO_TAGS+=cert
PAM_VARS= GO_TAGS+=pam
SQLITE_VARS= GO_TAGS+=sqlite
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100513
+DAEMONARGS= -S -l \$${gitea_facility} -s \$${gitea_priority} -t \$${name}
+.else
+DAEMONARGS= -f
+.endif
+
+SUB_LIST+= DAEMONARGS="${DAEMONARGS}"
+
post-patch:
# Gitea releases don't supply the release version number; the
# automatic method to obtain the version number in the Gitea build
diff --git a/www/gitea/files/gitea.in b/www/gitea/files/gitea.in
index 816c03c9dbc0..ae4d844d04ef 100644
--- a/www/gitea/files/gitea.in
+++ b/www/gitea/files/gitea.in
@@ -32,8 +32,8 @@ pidfile="/var/run/${name}.pid"
start_cmd="${name}_start"
gitea_start() {
- /usr/sbin/daemon -l ${gitea_facility} -s ${gitea_priority} \
- -u ${gitea_user} -p ${pidfile} -t "${command}" \
+ /usr/sbin/daemon %%DAEMONARGS%% \
+ -u ${gitea_user} -p ${pidfile} \
/usr/bin/env -i \
"GITEA_WORK_DIR=${gitea_shared}" \
"GITEA_CUSTOM=%%PREFIX%%/etc/${name}" \