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

Collapse All | Expand All

(-)sabnzbdplus/Makefile (-24 / +9 lines)
Lines 16-27 Link Here
16
		${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \
16
		${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \
17
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3
17
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3
18
18
19
USES=		gettext python
19
USES=		gettext python:2.5-2.7
20
20
21
NO_BUILD=	yes
21
NO_BUILD=	yes
22
WRKSRC=		${WRKDIR}/SABnzbd-${PORTVERSION}
22
WRKSRC=		${WRKDIR}/SABnzbd-${PORTVERSION}
23
PLIST_SUB=	PORTNAME=${PORTNAME}
23
PLIST_SUB=	PORTNAME=${PORTNAME}
24
SUB_LIST+=	PORTNAME=${PORTNAME} PYTHON_CMD=${PYTHON_CMD}
24
SUB_LIST=	PORTNAME=${PORTNAME} PYTHON_CMD=${PYTHON_CMD}
25
SUB_FILES=	pkg-message
25
SUB_FILES=	pkg-message
26
USE_RC_SUBR=	sabnzbd
26
USE_RC_SUBR=	sabnzbd
27
27
Lines 44-73 Link Here
44
44
45
.include <bsd.port.pre.mk>
45
.include <bsd.port.pre.mk>
46
46
47
.if ${PORT_OPTIONS:MPAR2CMDLINE}
47
PAR2CMDLINE_RUN_DEPENDS=	par2repair:${PORTSDIR}/archivers/par2cmdline-tbb
48
RUN_DEPENDS+=	par2repair:${PORTSDIR}/archivers/par2cmdline-tbb
48
FEEDPARSER_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}feedparser>=0:${PORTSDIR}/textproc/py-feedparser
49
.endif
49
YENC_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}yenc>=0:${PORTSDIR}/news/py-yenc
50
50
OPENSSL_RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}openssl>=0:${PORTSDIR}/security/py-openssl
51
.if ${PORT_OPTIONS:MFEEDPARSER}
51
UNRAR_RUN_DEPENDS=	unrar:${PORTSDIR}/archivers/unrar
52
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}feedparser>=0:${PORTSDIR}/textproc/py-feedparser
53
.endif
54
55
.if ${PORT_OPTIONS:MYENC}
56
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}yenc>=0:${PORTSDIR}/news/py-yenc
57
.endif
58
59
.if ${PORT_OPTIONS:MOPENSSL}
60
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}openssl>=0:${PORTSDIR}/security/py-openssl
61
.endif
62
63
.if ${PORT_OPTIONS:MUNRAR}
64
RUN_DEPENDS+=	unrar:${PORTSDIR}/archivers/unrar
65
.endif
66
52
67
post-patch:
53
post-patch:
68
	@${REINPLACE_CMD} -e "s:/usr/bin/python:${PYTHON_CMD}:g" \
54
	@${REINPLACE_CMD} -e "s:/usr/bin/python:${PYTHON_CMD}:g" \
69
		 ${WRKSRC}/SABnzbd.py
55
		 ${WRKSRC}/SABnzbd.py
70
	@${REINPLACE_CMD} -e "s:%%PREFIX%%:'${DATADIR}':g" \
56
	@${REINPLACE_CMD} -e "s:%%DATADIR%%:'${DATADIR}':g" \
71
		 ${WRKSRC}/SABnzbd.py
57
		 ${WRKSRC}/SABnzbd.py
72
58
73
# the NO_BUILD option stops execution after configure. This should really be
59
# the NO_BUILD option stops execution after configure. This should really be
Lines 77-83 Link Here
77
	${INSTALL} -d ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
63
	${INSTALL} -d ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
78
	cd ${WRKSRC}/sabnzbd && ${COPYTREE_SHARE} \* ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
64
	cd ${WRKSRC}/sabnzbd && ${COPYTREE_SHARE} \* ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/sabnzbd
79
	${INSTALL} -d ${STAGEDIR}${DATADIR}
65
	${INSTALL} -d ${STAGEDIR}${DATADIR}
80
	${INSTALL} -d ${STAGEDIR}${PREFIX}/sabnzbd
81
.for i in cherrypy gntp interfaces locale po tools util
66
.for i in cherrypy gntp interfaces locale po tools util
82
	${MKDIR} ${STAGEDIR}${DATADIR}/${i}
67
	${MKDIR} ${STAGEDIR}${DATADIR}/${i}
83
	cd ${WRKSRC}/${i} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/${i}
68
	cd ${WRKSRC}/${i} && ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/${i}
Lines 86-92 Link Here
86
.if ${PORT_OPTIONS:MDOCS}
71
.if ${PORT_OPTIONS:MDOCS}
87
	${MKDIR} ${STAGEDIR}${DOCSDIR}
72
	${MKDIR} ${STAGEDIR}${DOCSDIR}
88
.for i in ${PORTDOCS}
73
.for i in ${PORTDOCS}
89
	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
74
	${INSTALL_MAN} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
90
.endfor
75
.endfor
91
.endif
76
.endif
92
77
(-)sabnzbdplus/files/patch-SABnzbd.py (-2 / +2 lines)
Lines 6-12 Link Here
6
 
6
 
7
+# Force python to load the patched version of cherrypy included with the port,
7
+# Force python to load the patched version of cherrypy included with the port,
8
+# instead of any version that may be installed otherwise.
8
+# instead of any version that may be installed otherwise.
9
+sys.path.insert(0,%%PREFIX%%)
9
+sys.path.insert(0,%%DATADIR%%)
10
 import cherrypy
10
 import cherrypy
11
 if not cherrypy.__version__.startswith("3.2"):
11
 if not cherrypy.__version__.startswith("3.2"):
12
     print "Sorry, requires Python module Cherrypy 3.2 (use the included version)"
12
     print "Sorry, requires Python module Cherrypy 3.2 (use the included version)"
Lines 15-21 Link Here
15
     sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME))
15
     sabnzbd.MY_FULLNAME = os.path.normpath(os.path.abspath(sabnzbd.MY_FULLNAME))
16
     sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME)
16
     sabnzbd.MY_NAME = os.path.basename(sabnzbd.MY_FULLNAME)
17
-    sabnzbd.DIR_PROG = os.path.dirname(sabnzbd.MY_FULLNAME)
17
-    sabnzbd.DIR_PROG = os.path.dirname(sabnzbd.MY_FULLNAME)
18
+    sabnzbd.DIR_PROG = %%PREFIX%%
18
+    sabnzbd.DIR_PROG = %%DATADIR%%
19
     sabnzbd.DIR_INTERFACES = real_path(sabnzbd.DIR_PROG, DEF_INTERFACES)
19
     sabnzbd.DIR_INTERFACES = real_path(sabnzbd.DIR_PROG, DEF_INTERFACES)
20
     sabnzbd.DIR_LANGUAGE = real_path(sabnzbd.DIR_PROG, DEF_LANGUAGE)
20
     sabnzbd.DIR_LANGUAGE = real_path(sabnzbd.DIR_PROG, DEF_LANGUAGE)
21
     org_dir = os.getcwd()
21
     org_dir = os.getcwd()
(-)sabnzbdplus/files/sabnzbd.in (-1 lines)
Lines 46-52 Link Here
46
46
47
sabnzbd_prestart()
47
sabnzbd_prestart()
48
{
48
{
49
	PATH=${PATH}:/usr/local/bin:/usr/local/sbin
50
	for sabdir in ${sabnzbd_conf_dir} ${pidfile%/*}; do
49
	for sabdir in ${sabnzbd_conf_dir} ${pidfile%/*}; do
51
		if [ ! -d "${sabdir}" ]; then
50
		if [ ! -d "${sabdir}" ]; then
52
			install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${sabdir}
51
			install -d -o ${sabnzbd_user} -g ${sabnzbd_group} ${sabdir}
(-)sabnzbdplus/pkg-plist (-1 lines)
Lines 422-425 Link Here
422
%%DATADIR%%/util/apireg.py
422
%%DATADIR%%/util/apireg.py
423
%%DATADIR%%/util/mailslot.py
423
%%DATADIR%%/util/mailslot.py
424
%%DATADIR%%/util/pystone.py
424
%%DATADIR%%/util/pystone.py
425
@dir(_sabnzbd,_sabnzbd,755) sabnzbd

Return to bug 207583