aboutsummaryrefslogtreecommitdiffstats
path: root/www/gallery2/Makefile
blob: 0efb6aabc14a0e65da815466f7e2c503eb2a4551 (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
# New ports collection makefile for:   gallery2
# Date created:                29 Aug 2005
# Whom:                        Alex Varju <freebsd-ports@varju.ca>
#
# $FreeBSD$
#

PORTNAME=   gallery2
PORTVERSION=    2.0.1
CATEGORIES= www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= gallery
DISTNAME=   gallery-2.0.1-full
DIST_SUBDIR=    gallery2

MAINTAINER= freebsd-ports@varju.ca
COMMENT=    Gallery is a web based photo album written using PHP

RUN_DEPENDS=    giftopnm:${PORTSDIR}/graphics/netpbm \
        jhead:${PORTSDIR}/graphics/jhead \
        unzip:${PORTSDIR}/archivers/unzip \
        convert:${PORTSDIR}/graphics/ImageMagick

USE_PHP=    pcre session mysql
WANT_PHP_WEB=   yes

WRKSRC=     ${WRKDIR}/${DIST_SUBDIR}
NO_BUILD=   yes
PKGMESSAGE= ${WRKDIR}/pkg-message
CPIOARGS=   --quiet -pdum -R
PLIST_SUB+= GALLERY2DIR=${GALLERY2DIR}

pre-fetch:
.if !defined(GALLERY2DIR)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Define GALLERY2DIR to override default of '${GALLERY2DIR}'."
    @${ECHO_MSG} ""
.endif

GALLERY2DIR?=   www/data/gallery2
WWWOWN?=    www
WWWGRP?=    www

post-configure:
    @ ${SED} -e 's#%%PREFIX%%#${PREFIX}#g' \
      -e 's#%%GALLERY2DIR%%#${GALLERY2DIR}#g' pkg-message > ${PKGMESSAGE}

do-install:
    @ ${MKDIR} -m 0755 ${PREFIX}/${GALLERY2DIR}
    @ cd ${WRKSRC} && ${FIND} * -print | ${CPIO} ${CPIOARGS} ${WWWOWN}:${WWWGRP} ${PREFIX}/${GALLERY2DIR}
    @ ${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/${GALLERY2DIR}

post-install:
.if !defined(BATCH)
    @ ${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.mk>