aboutsummaryrefslogtreecommitdiffstats
path: root/shells/wapsh/Makefile
blob: f82da143f9cb4aea494257d0225276f0e2ce01fc (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# New ports collection makefile for:   wapsh
# Date created:        13 January 2001
# Whom:                George Reid <greid@ukug.uk.freebsd.org>
#
# $FreeBSD$
#

PORTNAME=       wapsh
PORTVERSION=        1.0
PORTREVISION=       1
CATEGORIES=     shells
MASTER_SITES=       http://www.exolution.de/wapsh/
DISTNAME=       ${PORTNAME}_${PORTVERSION}

MAINTAINER=     ports@FreeBSD.org
COMMENT=        A system to allow remote shell logins via a WAP phone or web browser

#RUN_DEPENDS=       ${LOCALBASE}/sbin/httpd:${PORTSDIR}/www/apache13 \
#           ${LOCALBASE}/libexec/apache/libphp3.so:${PORTSDIR}/www/mod_php3

WRKSRC=         ${WRKDIR}/${DISTNAME:S/_/-/}

USERGUIDEDOCS=      Image10.jpg Image11.jpg Image12.jpg Image13.jpg \
            Image14.jpg Image15.jpg Image16.jpg Image17.jpg \
            Image18.jpg Image19.jpg Image20.jpg Image21.jpg \
            Image22.jpg Image23.jpg Image24.jpg Image25.gif \
            Image26.jpg Image27.jpg Image28.jpg Image29.jpg \
            Image30.jpg Image31.jpg Image32.jpg Image33.jpg \
            Image34.jpg Image35.jpg Image36.jpg Image37.jpg \
            Image38.jpg Image39.jpg Image4.gif Image40.jpg \
            Image41.jpg Image42.jpg Image43.jpg Image44.jpg \
            Image45.jpg Image46.jpg Image47.jpg Image48.jpg \
            Image49.jpg Image5.gif Image50.gif Image51.jpg \
            Image52.jpg Image53.gif Image54.jpg Image55.jpg \
            Image56.jpg Image6.jpg Image7.jpg Image8.jpg \
            Image9.jpg index.html

HTDOCS=         command.php command_html.inc command_wml.inc \
            common.inc common_html.inc common_wml.inc \
            controls_wml.php displayfuncs.inc getloginhosts.inc \
            history_edit_wml.php history_html.php history_wml.php \
            login_html.php login_wml.php scroll_wml.php \
            shortcuts_wml.php

post-patch:
    @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/htshd/htshd.c > ${WRKDIR}/foo && \
        ${MV} ${WRKDIR}/foo ${WRKSRC}/htshd/htshd.c

do-build:
    (cd ${WRKSRC}/htshd && ${CC} ${CFLAGS} -o htshd htshd.c -lcrypt \
        -lutil -DUSE_DEV_RANDOM=1 -DHAVE_SETENV)

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/htshd/htshd ${PREFIX}/sbin

    ${MKDIR} ${PREFIX}/etc/wapsh
.for C in htsh_profile htshd.conf loginhosts
    ${INSTALL_DATA} ${WRKSRC}/sample/$C ${PREFIX}/etc/wapsh/$C.dist
    if [ ! -e ${PREFIX}/etc/wapsh/$C ]; then \
        ${CP} ${PREFIX}/etc/wapsh/$C.dist \
            ${PREFIX}/etc/wapsh/$C; \
    fi
.endfor

    ${MKDIR} ${PREFIX}/share/wapsh/htdocs
.for H in ${HTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/htdocs/$H ${PREFIX}/share/wapsh/htdocs
.endfor

.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}/admin_guide
    ${MKDIR} ${DOCSDIR}/implementation_notes
    ${MKDIR} ${DOCSDIR}/user_guide
.for B in Image1.jpg Image2.jpg Image3.jpg index.html qpl.html
    ${INSTALL_DATA} ${WRKSRC}/docs/html/$B ${DOCSDIR}
.endfor
    ${INSTALL_DATA} ${WRKSRC}/docs/html/admin_guide/index.html \
        ${DOCSDIR}/admin_guide
.for I in index.html image57.gif
    ${INSTALL_DATA} ${WRKSRC}/docs/html/implementation_notes/$I \
        ${DOCSDIR}/implementation_notes
.endfor
.for U in ${USERGUIDEDOCS}
    ${INSTALL_DATA} ${WRKSRC}/docs/html/user_guide/$U \
        ${DOCSDIR}/user_guide
.endfor
.endif #if !defined(NOPORTDOCS)

post-install:
    @${ECHO} "updating /etc/services"
    @${CP} /etc/services /etc/services.bak
    @(${GREP} -v ^htsh /etc/services.bak; ${ECHO_CMD} "htsh     3001/tcp    # htsh/wapsh server") > /etc/services
    @if [ ! -f ${PREFIX}/etc/rc.d/htshd.sh ]; then \
        ${ECHO} "===>   Installing ${PREFIX}/etc/rc.d/htshd.sh startup file."; \
        ${INSTALL_SCRIPT} ${FILESDIR}/htshd.sh ${PREFIX}/etc/rc.d/htshd.sh; \
    fi
    @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGMESSAGE}

.include <bsd.port.mk>