aboutsummaryrefslogtreecommitdiff
path: root/www/xaraya/Makefile
blob: e13a30277b14cf7a1788657ac741a0e3092a17c9 (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
70
71
72
73
74
75
76
77
78
79
# New ports collection makefile for:	xaraya
# Date created:		2005-07-10
# Whom:			Vsevolod Stakhov <vsevolod@highsecure.ru>
#
# $FreeBSD$
#
# Try to specify WITH_PGSQL to use pgsql php extension. Mysql
# extension would be used by default.

PORTNAME=	xaraya
PORTVERSION=	1.0.0r3
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	${PORTNAME}-1.0.0-rc3-base

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Framework to create fully dynamic Content Mangement Solutions

.if defined(WITH_PGSQL)
USE_PHP=	pgsql
.else
USE_PHP=	mysql
.endif
IGNORE_WITH_PHP=	5
NO_BUILD=	yes
WRKSRC=		${WRKDIR}/${PORTNAME}-1.0.0-rc3

# May user to override this
XARAYADIR?=	www/xaraya

pre-install:
	@${RM} -f ${TMPPLIST}

do-install:
	${MKDIR} ${PREFIX}/${XARAYADIR}
	${CP} -r ${WRKSRC}/html/* ${PREFIX}/${XARAYADIR}
.if !defined(NOTOOLS)
	${MKDIR} ${DATADIR}
	${CP} -r ${WRKSRC}/tools ${DATADIR}
.endif
	${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${XARAYADIR}
.if !defined(NOPORTDOCS)
	${MKDIR} ${DOCSDIR}
	${CP} -r ${WRKSRC}/docs/* ${DOCSDIR}
	${CP} ${WRKSRC}/INSTALL.txt ${WRKSRC}/LICENSE.txt \
		${WRKSRC}/CREDITS.txt ${DOCSDIR}
.endif

# Create plist
post-install:
	@${FIND} ${PREFIX}/${XARAYADIR} ! -type d -and ! -name install.php \
		-and ! -name upgrade.php | ${SED} -e \
		's,^${PREFIX}/,,' >> ${TMPPLIST}
	@${FIND} ${PREFIX}/${XARAYADIR} -type f -and '(' -name install.php \
		-or -name upgrade.php ')' | ${SED} -e \
		's,^${PREFIX}/\(.*\),@unexec rm -f %D/\1 >/dev/null 2>\&1 || true,' >> ${TMPPLIST}
	@${FIND} ${PREFIX}/${XARAYADIR} -type d -and -path "*var*" | \
		${SED} -e 's,^${PREFIX}/\(.*\),@unexec rmdir %D/\1 >/dev/null 2>\&1 || true,' | \
		${SORT} -r >> ${TMPPLIST}
	@${FIND} ${PREFIX}/${XARAYADIR} -type d -and ! -path "*var*" | \
		${SED} -e 's,^${PREFIX}/,@dirrm ,' | \
		${SORT} -r >> ${TMPPLIST}
.if !defined(NOPORTDOCS)
	@${FIND} ${DOCSDIR} ! -type d | ${SED} -e \
		's,^${PREFIX}/,,' >> ${TMPPLIST}
	@${FIND} ${DOCSDIR} -type d | ${SED} -e \
		's,^${PREFIX}/,@dirrm ,' | \
		${SORT} -r >> ${TMPPLIST}
.endif
.if !defined(NOTOOLS)
	@${FIND} ${DATADIR} ! -type d | ${SED} -e \
		's,^${PREFIX}/,,' >> ${TMPPLIST}
	@${FIND} ${DATADIR} -type d | ${SED} -e \
		's,^${PREFIX}/,@dirrm ,' | \
		${SORT} -r >> ${TMPPLIST}
.endif

.include <bsd.port.mk>