summaryrefslogtreecommitdiff
path: root/www/e107/Makefile
blob: d90a8cb30400399b03aca85f2b811913f44cb8cf (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
# Created by: Wen Heping <wenheping@gmail.com>
# $FreeBSD$

PORTNAME=	e107
PORTVERSION=	1.0.3
CATEGORIES=	www
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20v${PORTVERSION}
DISTNAME=	${PORTNAME}_${PORTVERSION}_full

MAINTAINER=	wen@FreeBSD.org
COMMENT=	A content management system written in PHP

USE_PHP=	mysql xml
WRKSRC=		${WRKDIR}/e107

.include <bsd.port.pre.mk>

NO_BUILD=	yes
PLIST=		${WRKDIR}/plist
SUB_FILES=	pkg-message
SUB_LIST=	E107DIR=${E107DIR}
E107DIR=	www/e107

post-extract:
	@cd ${WRKDIR} && ${MKDIR} ${WRKSRC}
	@cd ${WRKDIR} && ${MV} *.php ${WRKSRC}
	@cd ${WRKDIR} && ${MV} e107_* ${WRKSRC}
	@cd ${WRKDIR} && ${MV} e107.htaccess ${WRKSRC}
	@cd ${WRKDIR} && ${MV} favicon.ico ${WRKSRC}
	@cd ${WRKDIR} && ${MV} e107.robots.txt ${WRKSRC}

pre-install:
	@${FIND} -s -d ${WRKSRC} -type f | ${SED} "s#${WRKSRC}#${E107DIR}#g" >${PLIST}
	@${FIND} -s -d ${WRKSRC} -type d | ${SED} "s#${WRKSRC}#@dirrm ${E107DIR}#g" >> ${PLIST}

do-install:
	@cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR}
	@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
	@${CHMOD} -R 755 ${WWWDIR}

	@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}' \
		>> ${TMPPLIST}
	@${ECHO_CMD} '@exec ${CHMOD} -R 755 ${WWWDIR}' \
		>> ${TMPPLIST}

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>