libwrap2netbsd revision 1.2
11.1Smrg#! /bin/sh
21.1Smrg#
31.2Smrg#	$NetBSD: libwrap2netbsd,v 1.2 1996/11/28 04:32:33 mrg Exp $
41.1Smrg#
51.1Smrg# Copyright (c) 1996 Matthew R. Green
61.1Smrg# All rights reserved.
71.1Smrg#
81.1Smrg# Redistribution and use in source and binary forms, with or without
91.1Smrg# modification, are permitted provided that the following conditions
101.1Smrg# are met:
111.1Smrg# 1. Redistributions of source code must retain the above copyright
121.1Smrg#    notice, this list of conditions and the following disclaimer.
131.1Smrg# 2. Redistributions in binary form must reproduce the above copyright
141.1Smrg#    notice, this list of conditions and the following disclaimer in the
151.1Smrg#    documentation and/or other materials provided with the distribution.
161.1Smrg# 3. All advertising materials mentioning features or use of this software
171.1Smrg#    must display the following acknowledgement:
181.1Smrg#      This product includes software developed by Matthew R. Green for
191.1Smrg#      the NetBSD Project.
201.1Smrg# 4. The name of the author may not be used to endorse or promote products
211.1Smrg#    derived from this software without specific prior written permission.
221.1Smrg#
231.1Smrg# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
241.1Smrg# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
251.1Smrg# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
261.1Smrg# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
271.1Smrg# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
281.1Smrg# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
291.1Smrg# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
301.1Smrg# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
311.1Smrg# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Smrg# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Smrg# SUCH DAMAGE.
341.1Smrg
351.1Smrg# libwarp2netbsd:  convert a libwarp tcp_wrappers source tree into a
361.1Smrg# netbsd libwrap source tree, ready for importing.
371.1Smrg
381.1Smrgif [ $# -ne 2 ]; then echo "libwrap2netbsd src dest"; exit 1; fi
391.1Smrg
401.1Smrgr=$1
411.1Smrgd=$2/libwrap
421.1Smrg
431.1Smrg
441.1Smrgecho preparing directory $d
451.1Smrgrm -rf $d
461.1Smrgmkdir -p $d
471.1Smrg
481.1Smrg# lame to have these files duplicated.  but, what the hell.
491.1Smrgecho copying tree from $r into $d
501.1Smrgcd $r
511.1Smrgsrc='hosts_access.c options.c shell_cmd.c rfc931.c eval.c hosts_ctl.c
521.1Smrgrefuse.c percent_x.c clean_exit.c fix_options.c socket.c workarounds.c
531.2Smrgupdate.c misc.c diag.c'
541.1Smrgman='hosts_access.3 hosts_access.5 hosts_options.5'
551.1Smrginc='tcpd.h mystdarg.h'
561.1Smrgmisc='DISCLAIMER'
571.1Smrgpax -rvw $src $man $inc $misc $d
581.1Smrg
591.1Smrgcd $d
601.1Smrg
611.1Smrgecho creating Makefile
621.1Smrgcat > Makefile<<'__eof_makefile'
631.2Smrg#	$NetBSD: libwrap2netbsd,v 1.2 1996/11/28 04:32:33 mrg Exp $
641.1Smrg
651.1SmrgLIB=	wrap 
661.1Smrg
671.1SmrgSRCS=	hosts_access.c options.c shell_cmd.c rfc931.c eval.c hosts_ctl.c \
681.1Smrg	refuse.c percent_x.c clean_exit.c fix_options.c socket.c \
691.2Smrg	workarounds.c update.c misc.c diag.c
701.1SmrgMAN=	hosts_access.3 hosts_access.5 hosts_options.5
711.1Smrg
721.1SmrgCFLAGS+= -DFACILITY=LOG_AUTHPRIV -DSEVERITY=LOG_INFO -DPARANOID
731.1SmrgCFLAGS+= -DREAL_DAEMON_DIR=\"/usr/libexec\" -DHOSTS_ACCESS -DDAEMON_UMASK=022
741.1SmrgCFLAGS+= -DRFC931_TIMEOUT=10 -DALWAYS_HOSTNAME -DSYS_ERRLIST_DEFINED
751.1SmrgCFLAGS+= -DHOSTS_ALLOW=\"/etc/hosts.allow\" -DHOSTS_DENY=\"/etc/hosts.deny\"
761.1Smrg
771.1Smrgincludes:
781.1Smrg	-cd ${.CURDIR}; cmp -s tcpd.h ${DESTDIR}/usr/include/tcpd.h > \
791.1Smrg	    /dev/null 2>&1 || \
801.1Smrg	    ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 tcpd.h \
811.1Smrg	    ${DESTDIR}/usr/include
821.1Smrg
831.1Smrg.include <bsd.lib.mk>
841.1Smrg__eof_makefile
851.1Smrg
861.1Smrgecho done
871.1Smrgexit 0
88