aboutsummaryrefslogtreecommitdiffstats
path: root/print/pcal/Makefile
blob: eb10d0fba3fe2b3898b5f79d46730e9845967f53 (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
# Created by: mwest@uct.ac.za
# $FreeBSD$

PORTNAME=   pcal
PORTVERSION=    4.11.0
CATEGORIES= print
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= ports@FreeBSD.org
COMMENT=    PostScript calendar program

USES=       shebangfix gmake

MAKE_ENV=   HOST_CC="${CC}"
ALL_TARGET=

PORTDOCS=   ReadMe.txt pcal.html pcalw.html
SHEBANG_FILES=  html/pcal.pl

WWWSERVER!= hostname

OPTIONS_DEFINE= DOCS EXAMPLES

post-patch:
    @${REINPLACE_CMD} -e \
        's|@@PREFIX@@|${PREFIX}|g' ${WRKSRC}/html/pcal.cgi
    @${REINPLACE_CMD} -e \
        's|@@PREFIX@@|${PREFIX}|g' ${WRKSRC}/html/pcal.pl
    @${REINPLACE_CMD} -e \
        's|@@WWWSERVER@@|${WWWSERVER}|g' ${WRKSRC}/html/pcal.html
    @${REINPLACE_CMD} -e \
        's|@@WWWSERVER@@|${WWWSERVER}|g' ${WRKSRC}/html/pcalw.html

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/exec/pcal ${STAGEDIR}${PREFIX}/bin
    ${INSTALL_SCRIPT} ${WRKSRC}/html/pcal.cgi ${STAGEDIR}${PREFIX}/libexec
    ${INSTALL_SCRIPT} ${WRKSRC}/html/pcal.pl ${STAGEDIR}${PREFIX}/libexec
    ${INSTALL_MAN} ${WRKSRC}/doc/pcal.man \
        ${STAGEDIR}${MANPREFIX}/man/man1/pcal.1
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/ReadMe.txt ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/html/pcal.html ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/html/pcalw.html ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>