aboutsummaryrefslogtreecommitdiffstats
path: root/www/coppermine/Makefile
blob: 715bbd3670d4f82b690cd46a57b4d210dcfe99c8 (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
# Ports collection makefile for:    coppermine
# Date created:             05 April 2004
# Whom:                 Brooks Davis <brooks@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   coppermine
PORTVERSION=    1.4.14
CATEGORIES= www
MASTER_SITES=   SF
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME=   cpg1414

MAINTAINER= farrokhi@FreeBSD.org
COMMENT=    A web picture gallery script

USE_PHP=    mysql pcre
USE_ZIP=    yes

.if defined (WITH_IMAGEMAGICK)
RUN_DEPENDS+=   ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick
.else
USE_PHP+=   gd
.endif

NO_BUILD=   yes
PKGMESSAGE= ${WRKDIR}/pkg-message
WRKSRC=     ${WRKDIR}/cpg${PORTVERSION:S/.//g}
DOCFILES=   CHANGELOG COPYING README.txt

SUB_FILES+= pkg-message

pre-everything::
    @${ECHO_MSG} ""
    @${ECHO_MSG} "By default, coppermine depends on PHP with GD support."
    @${ECHO_MSG} "You may define WITH_IMAGEMAGICK to depend on ImageMagick instead of GD."
    @${ECHO_MSG} ""

post-extract:
    @${CHMOD} -R o-w ${WRKSRC}

do-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
.endif
    @cd ${WRKSRC} && ${RM} ${DOCFILES}
    -${MKDIR} ${WWWDIR}
    @(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${WWWDIR})
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}

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

.include <bsd.port.mk>