freebsd-ports/databases/sqlite2/Makefile
Mikhail Teterin 55b0526ba9 A number of things:
. changed maintainership to ports@;
	. build with TCL support (``package require sqlite'');
	. run the vendor's tests after build (sorry, Maxim) -- zero errors;
	. generate from the TCL sources and install the HTML documentation;
	  (unless NOPORTDOCS is set);
	. build and install two usefull tools, which come with the software:
		gdbmdump and gdbmstat;
	. build and install the shared version of -lsqlite -- usefull and
	  needed for dynamic loading into TCL interpreter;
	. lastly: the new functionality (TCL, tools, docs) called for the
	  PORTREVISION bump.

Approved by: after the previous maintainer suggested the first point above,
	the rest was easy :-)
2001-06-11 23:32:07 +00:00

69 lines
1.9 KiB
Makefile

# ex:ts=8
# New ports collection makefile for: sqlite
# Date created: Feb 21, 2001
# Whom: Ying-Chieh Liao <ijliao@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= sqlite
PORTVERSION= 1.0.30
PORTREVISION= 1
CATEGORIES= databases
MASTER_SITES= http://www.hwaci.com/sw/sqlite/
DISTNAME= ${PORTNAME}
MAINTAINER= ports@FreeBSD.org
LIB_DEPENDS= gdbm.2:${PORTSDIR}/databases/gdbm \
tcl${TCL_VER:S/.//}:${PORTSDIR}/lang/tcl${TCL_VER:S/.//}
BUILD_DEPENDS= lemon:${PORTSDIR}/devel/lemon
MAKEFILE= ${FILESDIR}/Makefile.bsd
WRKSRC= ${WRKDIR}/sqlite
MAKE_ARGS+= -j2
MAKE_ENV+= TCL_VER=${TCL_VER}
TCL_VER?= 8.3
GDBM_TOOLS= gdbmdump gdbmstat
post-build: test
.for p in ${GDBM_TOOLS}
cd ${WRKSRC}/tool && ${MAKE} CFLAGS="${CFLAGS} -I${PREFIX}/include" \
LDADD="-L${PREFIX}/lib -lgdbm" PROG=$p NOMAN=1 \
-f bsd.prog.mk
.endfor
cd ${WRKSRC} && ${MAKE} VPATH=${WRKSRC}/src \
CFLAGS="${CFLAGS} -I${WRKSRC} -I${WRKSRC}/src" \
LDADD="-L${WRKSRC} -lsqlite" PROG=sqlite SRCS=shell.c NOMAN=1 \
-f bsd.prog.mk
.ifndef NOPORTDOCS
cd ${WRKSRC}/www && ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_ARGS} -f ${FILESDIR}/Makefile.docs
.endif
post-install:
.for p in ${GDBM_TOOLS}
cd ${WRKSRC}/tool && ${MAKE} BINDIR="${PREFIX}/bin" \
PROG=$p NOMAN=1 -f bsd.prog.mk install
.endfor
cd ${WRKSRC} && ${MAKE} PROG=sqlite NOMAN=1 BINDIR="${PREFIX}/bin" \
-f bsd.prog.mk install
${MKDIR} ${PREFIX}/lib/sqlite
${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/sqlite/
.ifndef NOPORTDOCS
${MKDIR} ${PREFIX}/share/doc/sqlite
${INSTALL_DATA} ${WRKSRC}/www/*.html ${WRKSRC}/www/*.png \
${PREFIX}/share/doc/sqlite
.endif
test:
# -------------------------------------------------------
# Running the vendor's tests -- there should be 0 errors.
# -------------------------------------------------------
cd ${WRKSRC} && ${PREFIX}/bin/tclsh${TCL_VER} ${WRKSRC}/test/all.test \
${WRKSRC}/libsqlite.so
# -------------------------------------------------------
.include <bsd.port.mk>