forked from opnsense/ports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextcloud.mk
62 lines (48 loc) · 1.99 KB
/
nextcloud.mk
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
# Support for Nextcloud apps
#
# Feature: nextcloud
# Usage: USES=nextcloud
#
# MAINTAINER: [email protected]
.if !defined(_INCLUDE_USES_NEXTCLOUD_MK)
_INCLUDE_USES_NEXTCLOUD_MK= yes
NEXTCLOUD_BASE?= www/nextcloud
NEXTCLOUD_DIR= ${PREFIX}/${NEXTCLOUD_BASE}
NEXTCLOUD_APPSDIR?= ${PREFIX}/${NEXTCLOUD_BASE}/apps-pkg
PKGNAMEPREFIX= nextcloud-
PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX}
WRKSRC?= ${WRKDIR}/${PORTNAME}
.if ${DISTNAME} == ${PORTNAME}
DIST_SUBDIR?= nextcloud/${PORTNAME}-${PORTVERSION}
.else
DIST_SUBDIR?= nextcloud
.endif
MASTER_SITES?= https://github.com/nextcloud-releases/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${PORTVERSION}/
LICENSE?= AGPLv3
RUN_DEPENDS= nextcloud${PHP_PKGNAMESUFFIX}>=${NEXTCLOUD_RUN_DEPENDS}:www/nextcloud@${PHP_FLAVOR}
USES+= php:flavors
NO_BUILD= yes
NO_ARCH= yes
WWWDIR?= ${NEXTCLOUD_APPSDIR}/${PORTNAME}
NEXTCLOUD_APP_PKGMESSAGE= ${WRKDIR}/pkg-message
_PKGMESSAGES+= ${NEXTCLOUD_APP_PKGMESSAGE}
_USES_stage= 899:add-pkg-message
add-pkg-message:
@${ECHO_CMD} "[" > ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "{ type: install" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} " message: <<EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "Run \`occ upgrade\` to create the Nextcloud ${PORTNAME} app database structure" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "}," >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "{ type: upgrade:" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} " message: <<EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "Run \`occ upgrade\` to update the Nextcloud ${PORTNAME} app database structure" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "EOD" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "}" >> ${NEXTCLOUD_APP_PKGMESSAGE}
@${ECHO_CMD} "]" >> ${NEXTCLOUD_APP_PKGMESSAGE}
do-install:
@${MKDIR} ${STAGEDIR}${WWWDIR}
@(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR})
@(cd ${WRKSRC}; ${FIND} . -not -type d) | ${SORT} | \
${SED} -e 's,^\.,${WWWDIR_REL},' >> ${TMPPLIST}
.endif