blob: ac0f988db3809eabaa410092636ed57f50498be0 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# New ports collection makefile for: lifetype
# Date created: Wed Jan 11 09:37:54 CST 2006
# Whom: clsung
#
# $FreeBSD$
#
PORTNAME= lifetype
PORTVERSION= 1.2.1
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= lifetype
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
${CONTRIBE_VERSION}__all_plugins${EXTRACT_SUFX} \
${CONTRIBE_VERSION}__all_templates${EXTRACT_SUFX}
MAINTAINER= clsung@FreeBSD.org
COMMENT= A PHP and MySQL based blogging platform
IGNOREFILES= ${CONTRIBE_VERSION}__all_plugins${EXTRACT_SUFX} \
${CONTRIBE_VERSION}__all_templates${EXTRACT_SUFX}
CONTRIBE_VERSION=1.2
NO_BUILD= YES
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST= ${WRKDIR}/pkg-plist
PLOGDIR?= ${WWWDOCROOT}/${PLOGURL}
PLOGURL?= lifetype
USE_PHP= ctype mysql pcre session xml
USE_ZIP= YES
WANT_PHP_WEB= YES
WWWDOCROOT?= www
OPTIONS= BIG5 "With Big5 chinese template fix" off \
GD "With GD Support" on \
IMAGICK "With ImageMagick Support" off
.include <bsd.port.pre.mk>
.if !defined(WITHOUT_GD)
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/gd.so:${PORTSDIR}/${gd_DEPENDS}
.endif
.if defined(WITH_IMAGICK)
RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/imagick.so:${PORTSDIR}/${imagick_DEPENDS}
.endif
.if defined(WITHOUT_GD) && !defined(WITH_IMAGICK)
pre-patch:
@${ECHO_CMD} "Without GD or ImageMagick support. No thumbnails will be generated at all."
.endif
post-extract:
.for x in plugins templates
cd ${WRKSRC}/${x} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/${CONTRIBE_VERSION}__all_${x}${EXTRACT_SUFX}
.endfor
.if defined(WITH_BIG5)
post-patch:
${FIND} ${WRKSRC}/templates -name "*.template" | \
${XARGS} ${REINPLACE_CMD} -e 's/|capitalize//g' -e 's/%b/%B/g'
${FIND} ${WRKSRC}/templates -name "*.template.bak" -delete
.endif
pre-install:
@${RM} -f ${PLIST}
@cd ${WRKSRC} && ${FIND} -s . -type f | \
${SED} -e 's|^./||;s|^|${PLOGDIR}/|' > ${PLIST} \
&& ${ECHO_CMD} "@unexec ${RM} -fr %D/${PLOGDIR}/tmp/* 2>/dev/null || ${TRUE}" >> ${PLIST} \
&& ${FIND} -d * -type d | \
${SED} -e 's|^|@dirrm ${PLOGDIR}/|' >> ${PLIST} \
&& ${ECHO_CMD} @dirrm ${PLOGDIR} >> ${PLIST}
do-install:
@${MKDIR} ${TARGETDIR}/${PLOGDIR}
@${CP} -R ${WRKSRC}/ ${TARGETDIR}/${PLOGDIR}
@${CHOWN} -R ${WWWOWN}:${WWWGRP} ${TARGETDIR}/${PLOGDIR}
post-install:
@${SED} -e 's|%%PLOGURL%%|${PLOGURL}|' pkg-message > ${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|