aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/tautulli/Makefile
blob: 705d0fa64ad2bca2475288b9518811e95929dd71 (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
# Created by: Mark Felder <feld@FreeBSD.org>
# $FreeBSD$

PORTNAME=   tautulli
PORTVERSION=    2.1.32
DISTVERSIONPREFIX=v
CATEGORIES= multimedia python

MAINTAINER= christer.edwards@gmail.com
COMMENT=    Monitoring, analytics, and notifications for Plex Media Server

LICENSE=    GPLv3
LICENSE_FILE=   ${WRKSRC}/LICENSE

RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
        ${PYTHON_PKGNAMEPREFIX}openssl>0:security/py-openssl@${PY_FLAVOR} \
        ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss

USES=       python:2.7 shebangfix
USE_GITHUB= yes
USE_RC_SUBR=    ${PORTNAME}

SHEBANG_FILES=  Tautulli.py
SUB_LIST=   PYTHON_CMD=${PYTHON_CMD}
python_OLD_CMD= /bin/sh
GH_ACCOUNT= Tautulli
GH_PROJECT= Tautulli

NO_BUILD=   yes
NO_ARCH=    yes
PORTDOCS=   API.md CHANGELOG.md README.md

USERS=      tautulli
GROUPS=     tautulli

OPTIONS_DEFINE= DOCS

post-patch:
    ${FIND} ${WRKSRC} -name '*.orig' -delete

do-install:
    ${MKDIR} ${STAGEDIR}${WWWDIR}/data ${STAGEDIR}${WWWDIR}/lib \
        ${STAGEDIR}${WWWDIR}/plexpy
    cd ${WRKSRC} && ${COPYTREE_SHARE} "data lib plexpy" ${STAGEDIR}${WWWDIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/Tautulli.py ${STAGEDIR}${WWWDIR}

post-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
    ${RLN} ${STAGEDIR}${DOCSDIR}/CHANGELOG.md ${STAGEDIR}${WWWDIR}/CHANGELOG.md

post-install:
    ${FIND} -s ${STAGEDIR}${WWWDIR} -type d -empty -delete
    ${FIND} -s ${STAGEDIR} -not -type d | ${SORT} | \
        ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}

.include <bsd.port.mk>