aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/watchfolder/Makefile
blob: f2a816a26f0fd05ea87e941093c6ee9900a461d4 (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: Emanuel Haupt <ehaupt@critical.ch>
# $FreeBSD$

PORTNAME=   watchfolder
PORTVERSION=    0.3.3
PORTREVISION=   1
CATEGORIES= sysutils
MASTER_SITES=   CRITICAL

MAINTAINER= ehaupt@FreeBSD.org
COMMENT=    Watch folders for new files and process them

LICENSE=    GPLv2

WRKSRC=     ${WRKDIR}/watchd-${PORTVERSION}
USE_RC_SUBR=    watchd

OPTIONS_DEFINE= DOCS

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

post-patch:
    @${REINPLACE_CMD} -e 's|gcc $$(OPT)|${CC} ${CFLAGS}|' \
        ${WRKSRC}/Makefile
    @${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
        ${WRKSRC}/README ${WRKSRC}/watchd.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/watchd ${PREFIX}/bin
    ${INSTALL_DATA} ${WRKSRC}/watchd.conf ${PREFIX}/etc/watchd.conf.sample
    [ -f ${PREFIX}/etc/watchd.conf ] || \
        ${INSTALL_DATA} ${WRKSRC}/watchd.conf ${PREFIX}/etc
.if ${PORT_OPTIONS:MDOCS}
    ${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/doc/watchfolder.pdf ${DOCSDIR}
.endif

.include <bsd.port.mk>