freebsd-ports/databases/sybtcl/files/Makefile.bsd
Mikhail Teterin a623e2d6cf This is Sybtcl -- a dynamicly loadable TCL extension, which provides
your interpreter with connectivity to a Sybase server. Althghough it was
written to work with Sybase's own client libraries (not available for
FreeBSD), this port patches it enough to make it work with FreeTDS.

WWW: http://sybtcl.sourceforge.net/
2004-03-30 00:02:11 +00:00

45 lines
1.1 KiB
Text

# $FreeBSD$
.PATH: ${.CURDIR}/generic
SRCS= sybtcl.c
LOCALBASE?= /usr/local
PREFIX?= ${LOCALBASE}
TCL_VER?= 8.4
TCL_DVER= ${TCL_VER:S/.//}
CFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/tcl${TCL_VER}
LDADD= -L${LOCALBASE}/lib -lsybdb # -ltcl${TCL_DVER}
SHLIB_NAME= libSybtcl.so.3
LIBDIR= ${PREFIX}/lib
PKGDIR= ${LIBDIR}/Sybtcl
SCRIPTS= sp_who wisqlite
all: ${SHLIB_NAME} pkgIndex.tcl ${SCRIPTS}
pkgIndex.tcl: pkgIndex.tcl.in
echo 'package ifneeded Sybtcl 3.0 "load $$dir/../${SHLIB_NAME}; \
set auto_index(getSignOn) \"source $$dir/sign_on.tcl\""' \
> pkgIndex.tcl
.for s in ${SCRIPTS}
$s: ${.CURDIR}/samples/$s
sed -e 's,#!/usr/local/bin/wishx,#!${LOCALBASE}/bin/wish${TCL_VER},'\
-e 's,#!/usr/local/bin/wish8.0,#!${LOCALBASE}/bin/wish${TCL_VER},'\
< ${.CURDIR}/samples/$s > $s
.endfor
sp_who wisqlite: ${.CURDIR}
${PKGDIR}:
mkdir -p ${PKGDIR}
beforeinstall: ${PKGDIR}
${BSD_INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/samples/sign_on.tcl \
${PKGDIR}
${BSD_INSTALL_SCRIPT} ${SCRIPTS} ${PREFIX}/bin/
${BSD_INSTALL_MAN} ${.CURDIR}/doc/sybtcl.man \
${LOCALBASE}/man/mann/sybtcl.n
.include <bsd.lib.mk>