aboutsummaryrefslogtreecommitdiffstats
path: root/www/wcol/Makefile
blob: 2b64c54d5f7b641d69b292f939093b95248ae3b7 (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
# New ports collection makefile for:    wcolEpre
# Version required: 990110_150126
# Date created:     17 July 1998
# Whom:         Shigeyuki FUKUSHIMA <shige@FreeBSD.org>
#
# $FreeBSD$
#

DISTNAME=   wcolEpre.990110_150126
PKGNAME=    wcolEpre-1999.01.10
CATEGORIES= www
MASTER_SITES=   http://shika.aist-nara.ac.jp/products/DEST/Wcol/

MAINTAINER= shige@FreeBSD.org

WRKSRC=     ${WRKDIR}/${DISTNAME}/src

GNU_CONFIGURE=  yes

# startup script
WCOL_STARTUP=   wcol.sh.sample
STARTUP_SCRIPT= ${PREFIX}/etc/rc.d/wcol.sh

# wcol pooldir
DEFAULT_POOLDIR?=   /var/spool/wcol
MAKE_ENV+=      DEFAULT_POOLDIR=${DEFAULT_POOLDIR}

# wcol sample configuration file
WCOL_CONF_DIST=     ${WRKSRC}/wcol.conf-dist-FreeBSD
WCOL_CONF=      ${PREFIX}/etc/wcol.conf.sample

pre-patch:
    @${RM} -f ${WRKSRC}/../admin/killwcol.in
    @${MV} -f ${WRKSRC}/../admin/killwcol ${WRKSRC}/../admin/killwcol.in

pre-configure:
    @(cd ${WRKSRC} ; \
      ${RM} -f ${WCOL_CONF_DIST} ; \
      ${CAT} wcol.conf-dist | \
      ${SED} -e "s;@@DEFAULT_POOLDIR@@;${DEFAULT_POOLDIR};g" \
        > ${WCOL_CONF_DIST} ; \
      ${RM} -f ${WCOL_STARTUP} ; \
      ${CAT} ${FILESDIR}/${WCOL_STARTUP} | \
      ${SED} -e "s;@@DEFAULT_POOLDIR@@;${DEFAULT_POOLDIR};g" \
             -e "s;@@PREFIX@@;${PREFIX};g" \
        > ${WRKSRC}/${WCOL_STARTUP} ; \
    )
    

post-install:
    @if [ ! -d ${DEFAULT_POOLDIR} ]; then \
      ${ECHO} "Making wcol pool directory." ; \
      ${MKDIR} ${DEFAULT_POOLDIR} ; \
    fi
    @${ECHO} "Installing sample configuration file."
    @${INSTALL_DATA} ${WCOL_CONF_DIST} ${WCOL_CONF}
    @${ECHO} "Installing ${STARTUP_SCRIPT} startup file."
    @${INSTALL_SCRIPT} ${WRKSRC}/wcol.sh.sample ${STARTUP_SCRIPT}

.include <bsd.port.mk>