aboutsummaryrefslogtreecommitdiffstats
path: root/www/bk2site/Makefile
blob: d7533ee81f864632f45a2d06acbbd081ab4779d2 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ex:ts=8
# Ports collection makefile for:  bk2site
# Date created:                   Wed Dec 06, 2000
# Whom:                           clive
#
# $FreeBSD$
#

PORTNAME=   bk2site
PORTVERSION=    1.1.9
PORTREVISION=   2
CATEGORIES= www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= clive@FreeBSD.org
COMMENT=    Transforms Netscape bookmarks into a Yahoo-like website

.include <bsd.port.pre.mk>
.if exists(${APXS})
RUN_DEPENDS=    ${APXS}:${PORTSDIR}/${APACHE_PORT}

# Specify these directories in relative paths to ${PREFIX}.
.if !exists(${PREFIX}/www) && exists(${PREFIX}/share/apache)
CGIDIR?=    share/apache/cgi-bin
ICONSDIR?=  share/apache/icons
.else
CGIDIR?=    www/cgi-bin/${PORTNAME}
ICONSDIR?=  www/icons/${PORTNAME}
.endif

.else # No apache installed.
CGIDIR?=    share/${PORTNAME}
ICONSDIR?=  share/${PORTNAME}
.endif

MAN1=       bk2site.1

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --prefix="${PREFIX}" --enable-standard-datadir
MAKE_ARGS=  CXXFLAGS="${CXXFLAGS} -Wno-deprecated"

PLIST_SUB=  CGIDIR="${CGIDIR}" ICONSDIR="${ICONSDIR}"

post-patch:
    @${REINPLACE_CMD} -e 's,/etc/bk2site,${PREFIX}/etc/bk2site,' \
    ${WRKSRC}/dot.bk2siterc ${WRKSRC}/search.pl ${WRKSRC}/bk2site.1 \
    ${WRKSRC}/bk2site.html
    @${REINPLACE_CMD} -e 's,/icons/,/icons/bk2site/,' ${WRKSRC}/*
    @${REINPLACE_CMD} -e 's,long int l,time_t l,' ${WRKSRC}/reference.C
    @${REINPLACE_CMD} -e 's,iwebstream::,,' ${WRKSRC}/iwebstream.H
    @${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f

post-install:
    ${MKDIR} ${PREFIX}/etc/${PORTNAME}
    ${MKDIR} ${PREFIX}/${ICONSDIR}
    ${MKDIR} ${PREFIX}/${CGIDIR}
    ${CP} ${WRKSRC}/*.html ${PREFIX}/etc/${PORTNAME}
    ${CP} ${WRKSRC}/*.gif ${PREFIX}/${ICONSDIR}
    ${CP} ${WRKSRC}/*.pl ${PREFIX}/${CGIDIR}
    ${CHMOD} +x ${PREFIX}/${CGIDIR}/*.pl
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>