aboutsummaryrefslogtreecommitdiffstats
path: root/www/serendipity/Makefile
blob: cde980b8e9d2f0e154cca46098862c4ed41b300b (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
# Created by: babak@farrokhi.net
# $FreeBSD$

PORTNAME=   serendipity
PORTVERSION=    1.7
CATEGORIES= www
MASTER_SITES=   SF/php-blog/${PORTNAME}/${PORTVERSION}

MAINTAINER= miwi@FreeBSD.org
COMMENT=    PHP based weblog software

RUN_DEPENDS=    ${LOCALBASE}/share/pear/File/Archive.php:${PORTSDIR}/archivers/pear-File_Archive

WRKSRC=     ${WRKDIR}/${PORTNAME}
NO_BUILD=   YES
SERENDIPITY?=   www/${PORTNAME}
PLIST_SUB+= SERENDIPITY=${SERENDIPITY}
USE_PHP=    session pcre gd openssl mbstring iconv zlib xml
SUB_LIST+=  SERENDIPITY=${SERENDIPITY}
SUB_FILES=  pkg-message
USE_BZIP2=  YES

OPTIONS_DEFINE= MYSQL PGSQL SQLITE MAGICK
OPTIONS_DEFAULT=    MYSQL MAGICK

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MMYSQL}
USE_PHP+=   mysql
. endif

.if ${PORT_OPTIONS:MPGSQL}
USE_PHP+=   pgsql
.endif

.if ${PORT_OPTIONS:MSQLITE}
USE_PHP+=   sqlite
.endif

.if ${PORT_OPTIONS:MMAGICK}
RUN_DEPENDS+=   convert:${PORTSDIR}/graphics/ImageMagick
.endif

do-install:
    @-${MKDIR} ${PREFIX}/${SERENDIPITY}
    @${CHMOD} 755 ${PREFIX}/${SERENDIPITY}
    @(cd ${WRKSRC} && ${CP} -R * ${PREFIX}/${SERENDIPITY}/ )
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${PREFIX}/${SERENDIPITY}

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

.include <bsd.port.mk>