aboutsummaryrefslogtreecommitdiffstats
path: root/www/yanopaste/Makefile
blob: 548ed58d39a9636987d78c75eca3456ec4f89204 (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
# Created by: Martin Wilke <miwi@FreeBSD.org>
# $FreeBSD$

PORTNAME=   yanopaste
PORTVERSION=    1.3.0
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER= miwi@FreeBSD.org
COMMENT=    Yet Another Nopaste

NO_BUILD=   yes
USE_PHP=    xsl session xmlwriter xmlreader
SUB_FILES=  pkg-message
WWWDIR?=    ${PREFIX}/www/${PORTNAME}

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

post-patch:
    ${FIND} ${WRKSRC} -name .svn -type d | ${XARGS} ${RM} -rf

do-install:
    @${MKDIR} ${WWWDIR}
    ${CP} -R ${WRKSRC}/ ${WWWDIR}
    @${TOUCH} ${WWWDIR}/config.php
    @${CHOWN} ${WWWOWN} ${WWWDIR}/config.php
    @${CAT} ${PKGMESSAGE}

create-plist:
    @${FIND} -s ${WRKSRC}/${file} -not -type d \
        | ${SED} -e 's,^${WRKSRC},%%WWWDIR%%,' > ${PLIST}
    @${ECHO_CMD} '@exec touch %D/%%WWWDIR%%/config.php;chown ${WWWOWN} %D/%%WWWDIR%%/config.php' >> ${PLIST}
    @${ECHO_CMD} '@unexec if [ ! -s %D/%%WWWDIR%%/config.php ];then rm -f %D/%%WWWDIR%%/config.php;fi' >> ${PLIST}
    @${FIND} -ds ${WRKSRC}/${file} -type d \
    | ${SED} -e 's,^${WRKSRC},@dirrm %%WWWDIR%%,' >> ${PLIST}

.include <bsd.port.post.mk>