summaryrefslogtreecommitdiff
path: root/textproc/simplehtmldom/Makefile
blob: b52de74a27483704411346e1383f5474ab896465 (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
# Created by: Joe Horn <joehorn@gmail.com>
# $FreeBSD$

PORTNAME=		simplehtmldom
DISTVERSION=		1.5
PORTEPOCH=		1
CATEGORIES=		textproc www
MASTER_SITES=		SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}
DISTNAME=		${PORTNAME}_${DISTVERSION:S/./_/g}

MAINTAINER=		joehorn@gmail.com
COMMENT=		PHP Simple HTML DOM Parser

WRKSRC=			${WRKDIR}

USE_ZIP=		YES
NO_BUILD=		YES

USE_PHP=		pcre

DEFAULT_PHP_VER=	5

SUB_FILES+=		pkg-message
SUB_LIST+=		DATADIR=${DATADIR} PREFIX=${PREFIX}

.include <bsd.port.pre.mk>

post-extract:
	@${FIND} ${WRKSRC} -name .svn -type d | ${XARGS} ${RM} -rf

do-install:
	@${MKDIR} ${DATADIR} ${DATADIR}/app ${DATADIR}/testcase
	@${ECHO_CMD} "=> Installing programs to ${DATADIR}"
	@${INSTALL} -c -m 644 ${WRKSRC}/simple_html_dom.php ${DATADIR}
	@${INSTALL} -c -m 644 ${WRKSRC}/change_log.txt ${DATADIR}
	@cd ${WRKSRC}/app && ${FIND} . -type d \
		-exec ${MKDIR} ${DATADIR}/app/{} \;
	@cd ${WRKSRC}/app && ${FIND} . -type f \
		-exec ${INSTALL} -c -m 644 "{}" "${DATADIR}/app/{}" \;
	@cd ${WRKSRC}/testcase && ${FIND} . -type d \
		-exec ${MKDIR} ${DATADIR}/testcase/{} \;
	@cd ${WRKSRC}/testcase && ${FIND} . -type f \
		-exec ${INSTALL} -c -m 644 "{}" "${DATADIR}/testcase/{}" \;
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	@${ECHO_CMD} "=> Installing manuals to ${DOCSDIR}"
	@cd ${WRKSRC}/manual && ${FIND} . -type d \
		-exec ${MKDIR} ${DOCSDIR}/{} \;
	@cd ${WRKSRC}/manual && ${FIND} . -type f \
		-exec ${INSTALL} -c -m 644 "{}" "${DOCSDIR}/{}" \;
.endif
.if !defined(NOPORTEXAMPLES)
	@${MKDIR} ${EXAMPLESDIR}
	@${ECHO_CMD} "=> Installing examples to ${EXAMPLESDIR}"
	@cd ${WRKSRC}/example && ${FIND} . -type d \
		-exec ${MKDIR} ${EXAMPLESDIR}/{} \;
	@cd ${WRKSRC}/example && ${FIND} . -type f \
		-exec ${INSTALL} -c -m 644 "{}" "${EXAMPLESDIR}/{}" \;
.endif

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

.include <bsd.port.post.mk>