aboutsummaryrefslogtreecommitdiffstats
path: root/www/gallery3/Makefile
blob: 565ce8cce83cd36d12420f06ab325dd6cf672857 (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
59
60
61
62
63
64
# New ports collection makefile for:   gallery
# Date created:                09 Sep 2001
# Whom:                        Jamie Hermans <jamie@hermans.ca>
#
# $FreeBSD$
#

PORTNAME=   gallery
PORTVERSION=    1.4.0.2
CATEGORIES= www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME=   ${PORTNAME}-${PORTVERSION:C/\.[0-9]\.([0-9]+)$/-pl\1/}

MAINTAINER= jamie@hermans.ca
COMMENT=    Gallery is a slick web based photo album written using PHP

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

WANT_PHP_WEB=   yes

WRKSRC=     ${WRKDIR}/${PORTNAME}
NO_BUILD=   yes
PKGMESSAGE= ${WRKDIR}/pkg-message
DOCFILES=   AUTHORS ChangeLog README UPGRADING
EXCEPTFILES=    ${DOCFILES} LICENSE.txt
CPIO=       cpio --quiet -pdum -R
PLIST_SUB=  GALLERYDIR=${GALLERYDIR}

.include <bsd.port.pre.mk>
.include "${.CURDIR}/../../lang/php4/bsd.php.mk"

pre-fetch:
.if !defined(GALLERYDIR)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Define GALLERYDIR to override default of 'www/data/gallery'."
    @${ECHO_MSG} ""
.endif

GALLERYDIR?=    www/data/gallery
WWWOWN?=    www
WWWGRP?=    www

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

do-install:
    @ ${MKDIR} -m 0755 ${PREFIX}/${GALLERYDIR}
    @ cd ${WRKSRC} && ${FIND} * -name \*.bat ${EXCEPTFILES:S/^/-o -name /} \
      -o -print | ${CPIO} ${WWWOWN}:${WWWGRP} ${PREFIX}/${GALLERYDIR}

post-install:
.if !defined(NOPORTDOCS)
    @ ${MKDIR} ${DOCSDIR}
    @ cd ${WRKSRC} && ${INSTALL_DATA} ${DOCFILES} ${DOCSDIR}
.endif
.if !defined(BATCH)
    @ ${CAT} ${PKGMESSAGE}
.endif

.include <bsd.port.post.mk>