blob: 280cfaf360953ec014fd9572eac2b077e2b704d8 (
plain)
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
|
# $FreeBSD$
PORTNAME= calendarserver
PORTVERSION= 8.0
PORTREVISION= 1
CATEGORIES= www python
MASTER_SITES= http://www.lechner-rau.de/downloads/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= CalendarServer-${PORTVERSION}
MAINTAINER= axel.rau@chaos1.de
COMMENT= Calendar and Contacts Server from Apple (RFC 4791, RFC 6352)
LICENSE= APACHE20
FETCH_DEPENDS= svn:devel/subversion
BUILD_DEPENDS= ${FETCH_DEPENDS}
RUN_DEPENDS= memcached:databases/memcached \
${PYTHON_PKGNAMEPREFIX}calendar>=0.15423:devel/py-calendar \
${PYTHON_PKGNAMEPREFIX}PyGreSQL>=4.1:databases/py-PyGreSQL \
${PYTHON_PKGNAMEPREFIX}pycrypto>=2.6.1:security/py-pycrypto \
${PYTHON_PKGNAMEPREFIX}dateutil>=2.4.2:devel/py-dateutil \
${PYTHON_PKGNAMEPREFIX}openssl>=0.14:security/py-openssl \
${PYTHON_PKGNAMEPREFIX}pg8000>=1.10.2:databases/py-pg8000 \
${PYTHON_PKGNAMEPREFIX}psutil>=3.4.2:sysutils/py-psutil \
${PYTHON_PKGNAMEPREFIX}pytz>=2016.1:devel/py-pytz \
${PYTHON_PKGNAMEPREFIX}service_identity>=14.0.0:security/py-service_identity \
${PYTHON_PKGNAMEPREFIX}setproctitle>=1.1.9:devel/py-setproctitle \
${PYTHON_PKGNAMEPREFIX}sqlite3>=2.7:databases/py-sqlite3 \
${PYTHON_PKGNAMEPREFIX}sqlparse>=0.1:databases/py-sqlparse \
${PYTHON_PKGNAMEPREFIX}twext>=0.15423:devel/py-twext \
${PYTHON_PKGNAMEPREFIX}twisted>=15.4.0:devel/py-twisted \
${PYTHON_PKGNAMEPREFIX}xattr>=0.7.5:devel/py-xattr \
${PYTHON_PKGNAMEPREFIX}zope.interface>=4.1.3:devel/py-zope.interface
USES= pgsql:9.1+ python:2.7
USE_PYTHON= autoplist distutils
SUB_FILES= pkg-message
SUB_LIST+= USER=${USERS}
USE_RC_SUBR= caldavd
SUB_LIST+= PYTHON_CMD=${PYTHON_CMD}
SVN_REPOSITORY_URL= http://svn.calendarserver.org/repository/calendarserver
SVN_TAG1= CalendarServer/tags/release/${DISTNAME}
SVN_CMD1= svn export
ETCDIR= ${PREFIX}/etc/caldavd
SHAREDIR= ${PREFIX}/share/caldavd
DBDIR= /var/db/caldavd
LOGDIR= /var/log/caldavd
RUNDIR= /var/run/caldavd
PLIST_SUB= USER=${USERS} GROUP=${GROUPS} \
ETCDIR=${ETCDIR} \
DBDIR=${DBDIR} \
LOGDIR=${LOGDIR} \
RUNDIR=${RUNDIR}
CALDAVD_USER= caldavd
USERS= ${CALDAVD_USER}
GROUPS= ${CALDAVD_USER}
maint-gen-distfile:
@if [ ! -f "${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}" ] ; then \
${MKDIR} ${WRKDIR} ; cd ${WRKDIR} ; ${RM} -R ${WRKDIR}/${DISTNAME} ; \
${ECHO_MSG} "=> Checking out CalendarServer from svn.calendarserver.org/..."; \
${SVN_CMD1} ${SVN_REPOSITORY_URL}/${SVN_TAG1} > /dev/null ; \
${ECHO_MSG} "=> Creating tar archive ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}"; \
cd ${WRKDIR} ; tar -czf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ${DISTNAME} ; \
${RM} -R ${WRKDIR}/${DISTNAME} ; \
else \
${ECHO_MSG} "===> ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} found." ; \
fi
post-patch:
@${REINPLACE_CMD} -e 's|"{}.a1+unknown".format(base_version)|"8.0"|' ${WRKSRC}/setup.py
@${REINPLACE_CMD} -e 's|"/etc/caldavd/caldavd.plist"|"${ETCDIR}/caldavd.plist"|g' ${WRKSRC}/twistedcaldav/stdconfig.py
@${REINPLACE_CMD} -e 's|/etc/caldavd|${ETCDIR}|g' ${WRKSRC}/conf/caldavd.plist
@${REINPLACE_CMD} -e 's|/var/run|/var/run/caldavd|g' ${WRKSRC}/conf/caldavd.plist
post-install:
${MKDIR} ${STAGEDIR}${DBDIR}/Data/Documents
${MKDIR} ${STAGEDIR}${DBDIR}/Documents
${MKDIR} ${STAGEDIR}${ETCDIR}/auth
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
(cd ${WRKSRC}/doc && \
for i in `ls |${GREP} -v '.8'`; do \
${MKDIR} ${STAGEDIR}${DOCSDIR}/$${i} && \
${INSTALL_MAN} ${WRKSRC}/doc/$${i}/* \
${STAGEDIR}${DOCSDIR}/$${i}; \
done)
${CP} -p ${WRKSRC}/txdav/common/datastore/sql_schema/current.sql \
${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/doc/*.8 ${STAGEDIR}${PREFIX}/man/man8
${MKDIR} ${STAGEDIR}${LOGDIR}
${MKDIR} ${STAGEDIR}${RUNDIR}
.include <bsd.port.mk>
|