aboutsummaryrefslogtreecommitdiffstats
path: root/www/lilurl/Makefile
blob: 1d7fda397416965946483850dbb1806f120261b7 (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
# Created by: chinsan <chinsan.tw@gmail.com>
# $FreeBSD$

PORTNAME=   lilurl
PORTVERSION=    0.1.1
CATEGORIES= www
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}.tar.gz

MAINTAINER= ports@FreeBSD.org
COMMENT=    Simple PHP/MySQL script for generating lil? URLs

USE_PHP=    mysql pcre
NO_BUILD=   yes
WANT_PHP_WEB=   yes

WRKSRC=     ${WRKDIR}/${PORTNAME}
LILURL_DIR?=    www/lilurl
PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES=  pkg-message
PLIST=      ${WRKDIR}/pkg-plist

.include <bsd.port.pre.mk>

post-extract:
    @${MV} ${WRKSRC}/includes/conf.php ${WRKSRC}/includes/conf.php.sample

pre-install:
    @cd ${WRKSRC} && ${FIND} -s . -type f | \
        ${SED} -e 's|^./||;s|^|${LILURL_DIR}/|' > ${PLIST} \
        && ${FIND} -d * -type d | \
        ${SED} -e 's|^|@dirrm ${LILURL_DIR}/|' >> ${PLIST} \
        && ${ECHO_CMD} @dirrm ${LILURL_DIR} >> ${PLIST}

do-install:
    @${MKDIR} ${STAGEDIR}${PREFIX}/${LILURL_DIR}
    @${CP} -R ${WRKSRC}/ ${STAGEDIR}${PREFIX}/${LILURL_DIR}
    @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${PREFIX}/${LILURL_DIR}

post-install:
    @${SED} -e 's,%%PREFIX%%,${PREFIX},; s,%%LILURL_DIR%%,${LILURL_DIR},g' \
        ${PKGMESSAGE}

.include <bsd.port.post.mk>