aboutsummaryrefslogtreecommitdiffstats
path: root/www/nanoblogger/Makefile
blob: 63f6bec59e042e880680bf9ca1e5c83dfc0927e0 (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
# Created by: ijliao
# $FreeBSD$

PORTNAME=   nanoblogger
PORTVERSION=    3.4.2
PORTREVISION=   1
CATEGORIES= www
MASTER_SITES=   http://nanoblogger.sourceforge.net/downloads/

MAINTAINER= tobias.rehbein@web.de
COMMENT=    Small weblog engine written in Bash for the command line

LICENSE=    GPLv2

RUN_DEPENDS=    bash:shells/bash

NO_BUILD=   yes

SUB_FILES=  pkg-message

OPTIONS_DEFINE= DOCS

post-patch:
    @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/nb
    @${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" ${WRKSRC}/nb
    @${REINPLACE_CMD} -e "s,%%DATADIR%%,${DATADIR},g" ${WRKSRC}/nb
    @${REINPLACE_CMD} -e "s,%%DOCSDIR%%,${DOCSDIR},g" ${WRKSRC}/nb
    @${RM} ${WRKSRC}/plugins/page/format/*.orig
    @${RM} ${WRKSRC}/plugins/entry/format/*.orig

do-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/nb ${STAGEDIR}${PREFIX}/bin
    @${INSTALL_DATA} ${WRKSRC}/nb.conf ${STAGEDIR}${PREFIX}/etc/nb.conf.sample
    @${MKDIR} ${STAGEDIR}${DATADIR}
.for data in default lang lib moods plugins
    @${MKDIR} ${STAGEDIR}${DATADIR}/${data} && \
        ( cd ${WRKSRC}/${data} && \
            ${COPYTREE_SHARE} \* ${STAGEDIR}${DATADIR}/${data} "! -name *.orig" )
.endfor
    @${CP} ${WRKSRC}/welcome-to-nb.txt ${STAGEDIR}${DATADIR}

post-install-DOCS-on:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for doc in COPYING ChangeLog README TODO copyright
    @${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
.endfor
    @${MKDIR} ${STAGEDIR}${DOCSDIR}/html
    @${INSTALL_DATA} ${WRKSRC}/docs/nanoblogger.html ${STAGEDIR}${DOCSDIR}/html

.include <bsd.port.mk>