aboutsummaryrefslogtreecommitdiffstats
path: root/www/davical/Makefile
blob: dc887b7a6d9bdc1bbd31cb6f3c4ef416a39418ba (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
# Created by: Maurice Castro <maurice@castro.aus.net>
# $FreeBSD$

PORTNAME=   davical
DISTVERSIONPREFIX=  r
DISTVERSION=    1.1.6
CATEGORIES?=    www
MASTER_SITES=   https://gitlab.com/${PORTNAME}-project/${PORTNAME}/repository/archive.tar.gz?ref=${DISTVERSIONPREFIX}${PORTVERSION}&dummy=/

MAINTAINER= lbdm@privacychain.ch
COMMENT=    Simple CalDAV server using a postgres backend

LICENSE=    GPLv2 LGPL21
LICENSE_COMB=   multi
LICENSE_FILE=   ${WRKSRC}/COPYING

RUN_DEPENDS=    p5-DBI>=0:databases/p5-DBI \
        p5-YAML>=0:textproc/p5-YAML \
        p5-DBD-Pg>=0:databases/p5-DBD-Pg \
        ${LOCALBASE}/bin/pwgen:sysutils/pwgen \
        php-libawl>=0.54:devel/php-libawl

WRKSRC=     ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${PORTVERSION}-3ba605288fb0fc0a4f2abce09874f8dab5ffdfb8

NO_BUILD=   yes
USES=       pgsql php shebangfix
USE_PHP=    calendar curl gettext iconv pcre pdo pdo_pgsql pgsql xml
SHEBANG_FILES=  scripts/sync-remote-caldav.php
SUB_FILES=  pkg-message httpd-davical.conf
PORTDOCS=   README INSTALL davical_en_user_guide.odt phpdoc.ini \
        translation.rst
PORTEXAMPLES=   config

OPTIONS_DEFINE= DOCS EXAMPLES

post-extract:
    ${FIND} ${WRKSRC} -name .gitignore -delete

do-install:
    ${MKDIR} ${STAGEDIR}${WWWDIR}/htdocs \
        ${STAGEDIR}${WWWDIR}/inc \
        ${STAGEDIR}${WWWDIR}/config \
        ${STAGEDIR}${EXAMPLESDIR} \
        ${STAGEDIR}${DATADIR} \
        ${STAGEDIR}${DOCSDIR}
    # WWWDIR
    (cd ${WRKSRC}/htdocs && \
        ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/htdocs)
    (cd ${WRKSRC}/inc && ${COPYTREE_SHARE} . \
        ${STAGEDIR}${WWWDIR}/inc "! -name always.php.in")
    ${INSTALL_DATA} ${WRKSRC}/config/example-config.php \
        ${STAGEDIR}${WWWDIR}/config/config.php.sample
    # DATADIR
    (cd ${WRKSRC} && ${COPYTREE_SHARE} scripts ${STAGEDIR}${DATADIR})
    (cd ${WRKSRC} && ${COPYTREE_SHARE} dba ${STAGEDIR}${DATADIR} \
        "! -name update-davical-database")
    ${INSTALL_DATA} ${WRKDIR}/httpd-davical.conf ${STAGEDIR}${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/dba/update-davical-database \
        ${STAGEDIR}${DATADIR}/dba
    # DOCSDIR
    (cd ${WRKSRC}/docs && \
        ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
    ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/INSTALL ${STAGEDIR}${DOCSDIR}
    # EXAMPLESDIR
    (cd ${WRKSRC} && \
        ${COPYTREE_SHARE} config ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>