View | Details | Raw Unified | Return to bug 259194 | Differences between
and this patch

Collapse All | Expand All

(-)b/net-p2p/radarr/Makefile (-17 / +24 lines)
Lines 1-41 Link Here
1
PORTNAME=	radarr
1
PORTNAME=	radarr
2
PORTVERSION=	3.2.2.5080
2
PORTVERSION=	3.2.2.5080
3
DISTVERSIONPREFIX=v
3
PORTREVISION=	1
4
PORTREVISION=	0
5
CATEGORIES=	net-p2p
4
CATEGORIES=	net-p2p
6
MASTER_SITES=	https://github.com/Radarr/Radarr/releases/download/v${PORTVERSION}/
5
MASTER_SITES=	https://github.com/Radarr/Radarr/releases/download/v${PORTVERSION}/
7
DISTNAME=	Radarr.master.${PORTVERSION}.linux
6
DISTNAME=	Radarr.master.${PORTVERSION}.freebsd-core-x64
8
7
9
MAINTAINER=	feld@FreeBSD.org
8
MAINTAINER=	feld@FreeBSD.org
10
COMMENT=	Movie Library Manager for Usenet and BitTorrent users
9
COMMENT=	Movie Library Manager for Usenet/BitTorrent running under dotNET
11
10
12
LICENSE=	GPLv3
11
LICENSE=	GPLv3
13
12
14
LIB_DEPENDS=	libcurl.so:ftp/curl
13
ONLY_FOR_ARCHS=	amd64
15
RUN_DEPENDS=	mediainfo>0:multimedia/mediainfo \
16
		sqlite3>0:databases/sqlite3 \
17
		mono6.8>0:lang/mono6.8
18
14
19
USE_RC_SUBR=	radarr
15
RUN_DEPENDS=	ca_root_nss>0:security/ca_root_nss \
16
		icu>0:devel/icu \
17
		libiconv>0:converters/libiconv \
18
		libinotify>0:devel/libinotify \
19
		libunwind>0:devel/libunwind \
20
		mediainfo>0:multimedia/mediainfo \
21
		openssl>0:security/openssl \
22
		sqlite3>0:databases/sqlite3
20
23
21
NO_ARCH=	YES
24
USE_RC_SUBR=	${PORTNAME}
22
NO_BUILD=	YES
25
DATADIR=	${PREFIX}/${PORTNAME}${PKGNAMESUFFIX}
23
26
24
WRKSRC=	${WRKDIR}/Radarr
27
NO_BUILD=	YES
25
28
26
USERS=	radarr
29
SUB_FILES=	${PORTNAME} pkg-message
27
GROUPS=	radarr
30
SUB_LIST=	DATADIR=${DATADIR} \
31
		GROUPS=${GROUPS} \
32
		PORTNAME=${PORTNAME} \
33
		USERS=${USERS}
28
34
29
OPTIONS_DEFINE=	X11
35
USERS=		radarr
36
GROUPS=		radarr
30
37
31
# Permits image resizing
38
WRKSRC=		${WRKDIR}/Radarr
32
X11_LIB_DEPENDS+=libgdiplus.so:x11-toolkits/libgdiplus
33
39
34
.include <bsd.port.options.mk>
40
.include <bsd.port.options.mk>
35
41
36
do-install:
42
do-install:
37
	${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}
43
	${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}
38
	cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}
44
	cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}
45
	@${FIND} -s ${STAGEDIR}/${DATADIR} -name "Radarr" -exec ${CHMOD} 744 {} +
39
46
40
post-install:
47
post-install:
41
	@${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \
48
	@${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \
(-)b/net-p2p/radarr/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1633614457
1
TIMESTAMP = 1634327998
2
SHA256 (Radarr.master.3.2.2.5080.linux.tar.gz) = 347e1add0751151ecfe9c4b76cb4694f97a78cb98356c8bd91d58755b77a8ed8
2
SHA256 (Radarr.master.3.2.2.5080.freebsd-core-x64.tar.gz) = d55f19c2f9291cf182193f11b26932771323aecb2cb78273e5930d3292f55d7f
3
SIZE (Radarr.master.3.2.2.5080.linux.tar.gz) = 20982296
3
SIZE (Radarr.master.3.2.2.5080.freebsd-core-x64.tar.gz) = 47045006
(-)b/net-p2p/radarr/files/pkg-message.in (+33 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
5
%%PORTNAME%% relies on Microsoft dotNET5+ SDK to be built
6
Microsoft does not have an official version of dotNET for FreeBSD
7
8
This package was built with an UNOFFICIAL UNSUPPORTED version of dotNET
9
If this is something that you do not want, remove this package with
10
"pkg remove %%PORTNAME%%"
11
12
This package installs a service file.
13
Enable it with "sysrc %%PORTNAME%%_enable=TRUE"
14
Start it with "service %%PORTNAME%% start".
15
16
The service file uses daemon to restart %%PORTNAME%% if it crashes.
17
The service file will also change the permissions so that the updater works.
18
If this behavior is unwanted you will need to edit the RC file manually and
19
remove the daemon and/or the permissions changes.
20
21
If you are running this in a jail please set "allow_mlock=1" or similar
22
for this jail otherwise the program will fail to start
23
24
Finally, while the built-in updater will update %%PORTNAME%% it has side-effects:
25
it breaks the ability of pkg to check for corruption in %%PORTNAME%% files
26
it breaks the ability of pkg to determine if it has removed files correctly
27
during "pkg remove %%PORTNAME%%" and also
28
it breaks the fundamental understanding that updates should be handled only
29
by the system that put the files there in the first place.
30
31
EOM
32
}
33
]
(-)b/net-p2p/radarr/files/radarr.in (-28 / +33 lines)
Lines 1-42 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
3
# Author: Mark Felder <feld@FreeBSD.org>
4
2
5
# PROVIDE: radarr
3
# PROVIDE: %%PORTNAME%%
6
# REQUIRE: LOGIN
4
# REQUIRE: LOGIN network
7
# KEYWORD: shutdown
5
# KEYWORD: shutdown
8
6
#
9
# Add the following lines to /etc/rc.conf to enable radarr:
7
# Add the following lines to /etc/rc.conf or use sysrc to enable %%PORTNAME%%
10
# radarr_enable="YES"
8
# ${%%PORTNAME%%_enable="YES"}
9
# Optionaly there are some other parameters
10
# ${%%PORTNAME%%_user="%%USERS%%"}
11
# ${%%PORTNAME%%_group="%%GROUPS%%"}
12
# This stores %%PORTNAME%% data (e.g., databases, configs, logs)
13
# ${%%PORTNAME%%_data_dir="/var/db/%%PORTNAME%%"}
14
# This stores the PID files that daemon will use
15
# ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"}
11
16
12
. /etc/rc.subr
17
. /etc/rc.subr
13
18
name=%%PORTNAME%%
14
name="radarr"
19
rcvar=%%PORTNAME%%_enable
15
rcvar=radarr_enable
16
17
load_rc_config $name
20
load_rc_config $name
18
21
19
: ${radarr_enable="NO"}
22
: ${%%PORTNAME%%_enable:=NO}
20
: ${radarr_user:="radarr"}
23
: ${%%PORTNAME%%_user:="%%USERS%%"}
21
: ${radarr_data_dir:="%%PREFIX%%/radarr"}
24
: ${%%PORTNAME%%_group:="%%GROUPS%%"}
25
: ${%%PORTNAME%%_exec_dir:="%%DATADIR%%"}
26
: ${%%PORTNAME%%_data_dir:="/var/db/%%PORTNAME%%"}
27
: ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"}
22
28
23
pidfile="${radarr_data_dir}/radarr.pid"
29
pidfile="${%%PORTNAME%%_pid_dir}/${name}_daemon.pid"
24
procname="%%PREFIX%%/bin/mono"
30
pidfile_child="${%%PORTNAME%%_pid_dir}/${name}_child.pid"
25
command="/usr/sbin/daemon"
31
command="/usr/sbin/daemon"
26
command_args="-f ${procname} %%DATADIR%%/Radarr.exe --nobrowser --data=${radarr_data_dir}"
27
start_precmd=radarr_precmd
28
32
29
radarr_precmd()
30
{
31
	export XDG_CONFIG_HOME=${radarr_data_dir}
32
33
33
	if [ ! -d ${radarr_data_dir} ]; then
34
start_precmd=${name}_precmd
34
		install -d -o ${radarr_user} ${radarr_data_dir}
35
%%PORTNAME%%_precmd() {
35
	fi
36
    if [ ! -d ${%%PORTNAME%%_data_dir} ]; then
37
        install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_data_dir}
38
    fi
39
    if [ ! -d ${%%PORTNAME%%_pid_dir} ]; then
40
        install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_pid_dir}
41
    fi
42
43
    chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_exec_dir}
36
44
37
	# Unwritable pids allow the service to start, but fails to work
45
    rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${%%PORTNAME%%_exec_dir}/Radarr --data=${%%PORTNAME%%_data_dir} --nobrowser >> /dev/null 2>&1 ${rc_flags}"
38
	# Rare, but if you are debugging as root and accidentally start the service...
39
	/bin/rm -f ${pidfile}
40
}
46
}
41
47
42
run_rc_command "$1"
48
run_rc_command "$1"
43
- 

Return to bug 259194