aboutsummaryrefslogtreecommitdiffstats
path: root/news/sabnzbdplus/Makefile
blob: 8ad2b7c0a27d7bf1c6e648aac03f4088201e7531 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# $FreeBSD$

PORTNAME=   sabnzbdplus
PORTVERSION=    0.7.13
PORTREVISION=   1
CATEGORIES= news
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
DISTNAME=   SABnzbd-${PORTVERSION}-src

MAINTAINER= feld@feld.me
COMMENT=    A web-interface based binary newsgrabber in python, with nzb support

LICENSE=    GPLv2 GPLv3 PSFL CHERRYPY CONFIGOBJ FEEDPARSER GNTP JSON KRONOS LISTQUOTE MSGFMT PYNEWSLEECHER RARFILE RSSLIB SSMTPLIB
LICENSE_COMB=   multi

RUN_DEPENDS=    cheetah:${PORTSDIR}/devel/py-cheetah \
        ${PYTHON_SITELIBDIR}/pythonutils/configobj.py:${PORTSDIR}/devel/py-utils \
        ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3

LICENSE_NAME_CHERRYPY=  CherryPy License
LICENSE_FILE_CHERRYPY=  ${WRKSRC}/licenses/License-CherryPy.txt
LICENSE_PERMS_CHERRYPY= auto-accept

LICENSE_NAME_CONFIGOBJ= configobj License
LICENSE_FILE_CONFIGOBJ= ${WRKSRC}/licenses/License-configobj.txt
LICENSE_PERMS_CONFIGOBJ=    auto-accept

LICENSE_NAME_FEEDPARSER=    feedparser License
LICENSE_FILE_FEEDPARSER=    ${WRKSRC}/licenses/License-feedparser.txt
LICENSE_PERMS_FEEDPARSER=   auto-accept

LICENSE_NAME_GNTP=  gntp License
LICENSE_FILE_GNTP=  ${WRKSRC}/licenses/License-gntp.txt
LICENSE_PERMS_GNTP= auto-accept

LICENSE_NAME_JSON=  json License
LICENSE_FILE_JSON=  ${WRKSRC}/licenses/License-json.txt
LICENSE_PERMS_JSON= auto-accept

LICENSE_NAME_KRONOS=    kronos License
LICENSE_FILE_KRONOS=    ${WRKSRC}/licenses/License-kronos.txt
LICENSE_PERMS_KRONOS=   auto-accept

LICENSE_NAME_LISTQUOTE= listquote License
LICENSE_FILE_LISTQUOTE= ${WRKSRC}/licenses/License-listquote.txt
LICENSE_PERMS_LISTQUOTE=    auto-accept

LICENSE_NAME_MSGFMT=    msgfmt License
LICENSE_FILE_MSGFMT=    ${WRKSRC}/licenses/License-msgfmt.txt
LICENSE_PERMS_MSGFMT=   auto-accept

LICENSE_NAME_PYNEWSLEECHER= pynewsleecher License
LICENSE_FILE_PYNEWSLEECHER= ${WRKSRC}/licenses/License-pynewsleecher.txt
LICENSE_PERMS_PYNEWSLEECHER=    auto-accept

LICENSE_NAME_RARFILE=   rarfile License
LICENSE_FILE_RARFILE=   ${WRKSRC}/licenses/License-rarfile.txt
LICENSE_PERMS_RARFILE=  auto-accept

LICENSE_NAME_RSSLIB=    rsslib License
LICENSE_FILE_RSSLIB=    ${WRKSRC}/licenses/License-rsslib.txt
LICENSE_PERMS_RSSLIB=   auto-accept

LICENSE_NAME_SSMTPLIB=  ssmtplib License
LICENSE_FILE_SSMTPLIB=  ${WRKSRC}/licenses/License-ssmtplib.txt
LICENSE_PERMS_SSMTPLIB= auto-accept

USE_PYTHON= 2.5+
USES=       gettext

NO_BUILD=   yes
WRKSRC=     ${WRKDIR}/SABnzbd-${PORTVERSION}
PLIST_SUB=  PORTNAME=${PORTNAME}
SUB_LIST+=  PORTNAME=${PORTNAME}
SUB_FILES=  pkg-message
USE_RC_SUBR=    sabnzbd
CONFLICTS_INSTALL=  sabzndb-0.*

PORTDOCS=   ABOUT.txt \
        CHANGELOG.txt \
        COPYRIGHT.txt \
        INSTALL.txt \
        ISSUES.txt \
        README.txt

USERS=      _sabnzbd
GROUPS=     _sabnzbd

OPTIONS_DEFINE= PAR2CMDLINE UNRAR FEEDPARSER YENC OPENSSL
OPTIONS_DEFAULT=    PAR2CMDLINE UNRAR FEEDPARSER YENC OPENSSL
PAR2CMDLINE_DESC=   Required for postprocessing of par files
UNRAR_DESC= Often required for unpacking many downloads
FEEDPARSER_DESC=    rss-feed support
YENC_DESC=  yenc support

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MPAR2CMDLINE}
RUN_DEPENDS+=   par2repair:${PORTSDIR}/archivers/par2cmdline-tbb
.endif

.if ${PORT_OPTIONS:MFEEDPARSER}
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/OpenSSL/SSL.so:${PORTSDIR}/security/py-openssl
.endif

.if ${PORT_OPTIONS:MYENC}
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/_yenc.so:${PORTSDIR}/news/py-yenc
.endif

.if ${PORT_OPTIONS:MOPENSSL}
RUN_DEPENDS+=   ${PYTHON_SITELIBDIR}/feedparser.py:${PORTSDIR}/textproc/py-feedparser
.endif

.if ${PORT_OPTIONS:MUNRAR}
RUN_DEPENDS+=   unrar:${PORTSDIR}/archivers/unrar
.endif

post-patch:
    @${REINPLACE_CMD} -e "s:/usr/bin/python:${PYTHON_CMD}:g" \
         ${WRKSRC}/SABnzbd.py
    @${REINPLACE_CMD} -e "s:%%PREFIX%%:'${DATADIR}':g" \
         ${WRKSRC}/SABnzbd.py

# the NO_BUILD option stops execution after configure. This should really be
# post-build
do-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/SABnzbd.py ${PREFIX}/bin
    ${INSTALL} -d ${PYTHONPREFIX_SITELIBDIR}/sabnzbd
    cd ${WRKSRC}/sabnzbd && ${COPYTREE_SHARE} \* ${PYTHONPREFIX_SITELIBDIR}/sabnzbd
    ${INSTALL} -d ${DATADIR}
.for i in cherrypy gntp interfaces locale po tools util
    ${MKDIR} ${DATADIR}/${i}
    cd ${WRKSRC}/${i} && ${COPYTREE_SHARE} \* ${DATADIR}/${i}
.endfor

post-install:
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
.for i in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
    ${MKDIR} ${PREFIX}/sabnzbd
    ${CHOWN} _sabnzbd:_sabnzbd ${PREFIX}/sabnzbd
    @${CAT} ${WRKDIR}/pkg-message

.include <bsd.port.post.mk>