summaryrefslogtreecommitdiff
path: root/graphics/php-jpgraph/Makefile
blob: 5d31a491e7297d5843e03a0f5cc8d64ccdffaf7d (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
# $NetBSD: Makefile,v 1.15 2008/04/07 17:49:55 joerg Exp $

DISTNAME=	jpgraph-1.18
PKGNAME=	${PHP_PKG_PREFIX}-${DISTNAME}
CATEGORIES=	graphics www
MASTER_SITES=	http://members.chello.se/jpgraph/jpgdownloads/

MAINTAINER=	adrianp@NetBSD.org
HOMEPAGE=	http://www.aditus.nu/jpgraph/index.php
COMMENT=	Object Oriented class library for PHP

CONFLICTS=	php-jgraph-[0-9]*

DEPENDS+=	${PHP_PKG_PREFIX}-gd>=4.3.1:../../graphics/php-gd

PKG_DESTDIR_SUPPORT=	user-destdir

NO_CONFIGURE=	YES
NO_BUILD=	YES

EXDIR=		${PREFIX}/share/examples/php-jpgraph
PJDIR=		${PREFIX}/share/php-jpgraph
PJCONFFILE=	${PKG_SYSCONFDIR}/jpg-config.inc
CONF_FILES=	${EXDIR}/jpg-config.inc ${PKG_SYSCONFDIR}/jpg-config.inc

PKG_SYSCONFSUBDIR?=	php-jpgraph

MESSAGE_SUBST+=	PJCONFFILE=${PJCONFFILE} PJDIR=${PJDIR} EXDIR=${EXDIR}

do-install:
	${INSTALL_DATA_DIR} ${DESTDIR}${EXDIR}
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/php-jpgraph
	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/php-jpgraph/html
	${INSTALL_DATA_DIR} ${DESTDIR}${PJDIR}

	${INSTALL_SCRIPT} ${WRKSRC}/src/Examples/*.php ${DESTDIR}${EXDIR}
	${INSTALL_DATA} ${WRKSRC}/src/Examples/*.png ${DESTDIR}${EXDIR}
	${INSTALL_DATA} ${WRKSRC}/src/Examples/*.gif ${DESTDIR}${EXDIR}
	${INSTALL_DATA} ${WRKSRC}/src/Examples/*.jpg ${DESTDIR}${EXDIR}

	${RM} -f ${DESTDIR}${PJDIR}/jpg-config.inc

	${INSTALL_SCRIPT} ${WRKSRC}/src/*.php ${DESTDIR}${PJDIR}
	${INSTALL_DATA} ${WRKSRC}/src/*.inc ${DESTDIR}${PJDIR}
	${INSTALL_DATA} ${WRKSRC}/src/*.dat ${DESTDIR}${PJDIR}

	${MV} -f ${DESTDIR}${PJDIR}/jpg-config.inc ${DESTDIR}${EXDIR}
	${LN} -sf ${PJCONFFILE} ${DESTDIR}${PJDIR}/jpg-config.inc

	for f in README QPL.txt; do \
		${INSTALL_DATA} ${WRKSRC}/$$f \
			${DESTDIR}${PREFIX}/share/doc/php-jpgraph; \
	done
	cd ${WRKSRC}/docs && ${PAX} -rw . \
		${DESTDIR}${PREFIX}/share/doc/php-jpgraph/html
	${FIND} ${DESTDIR}${PREFIX}/share/doc/php-jpgraph/html -type d |
	${XARGS} ${CHMOD} ${PKGDIRMODE}

.include "../../lang/php/phpversion.mk"
.include "../../mk/bsd.pkg.mk"