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

PORTNAME=   davical
PORTVERSION=    1.1.2
CATEGORIES?=    www

MAINTAINER= maurice@castro.aus.net
COMMENT=    A simple CalDAV server using a postgres backend

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

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

USE_GITHUB= yes
GH_ACCOUNT= DAViCal
GH_TAGNAME= r${DISTVERSION}
GH_COMMIT=  cc8e6a0
NO_BUILD=   yes
USE_PGSQL=  yes
USE_PHP=    gettext iconv pcre pdo pdo_pgsql pgsql xml calendar
USES=       shebangfix
SHEBANG_FILES=  scripts/sync-remote-caldav.php

SUB_FILES=  pkg-message httpd-davical.conf

OPTIONS_DEFINE= DOCS

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

do-install:
.for dirs in htdocs inc config
    ${MKDIR} ${STAGEDIR}${WWWDIR}/${dirs}
.endfor
    cd ${WRKSRC}/htdocs && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/htdocs
    cd ${WRKSRC}/inc && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/inc "! -name always.php.in"
    ${CP} -p ${WRKSRC}/config/example-config.php ${STAGEDIR}${WWWDIR}/config/config.php.sample

post-install:
.for docdirs in config docs scripts dba
    ${MKDIR} ${STAGEDIR}${DOCSDIR}/${docdirs}
    cd ${WRKSRC}/${docdirs} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${docdirs}
.endfor
    ${INSTALL_DATA} ${WRKDIR}/httpd-davical.conf ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/INSTALL ${STAGEDIR}${DOCSDIR}
    ${CHMOD} a+x ${STAGEDIR}${DOCSDIR}/dba/update-davical-database

.include <bsd.port.mk>