aboutsummaryrefslogtreecommitdiffstats
path: root/databases/pgtcl/Makefile
blob: 4d20d8c3742bf07f4954c023db562ae5de3af0ee (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
# Created by: Mikhail Teterin
# $FreeBSD$

PORTNAME=   pgtcl
PORTVERSION=    2.0.0
CATEGORIES= databases tcl
MASTER_SITES=   SF/pgtclng/pgtclng/${PORTVERSION}:src
MASTER_SITE_SUBDIR= pgtclng
DISTNAME=   ${PORTNAME}${PORTVERSION}
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}:src

MAINTAINER= mi@aldan.algebra.com
COMMENT=    TCL extension for accessing a PostgreSQL server (PGTCL-NG)

LICENSE=    PGSQL

OPTIONS_DEFINE= DOCS

USES=       tcl
USE_PGSQL=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--with-tcl=${TCL_LIBDIR} --with-tclinclude=${TCL_INCLUDEDIR}
LIBDIR=     ${PREFIX}/lib/${PORTNAME}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
MANUALREL=  20110918

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
EXTRACT_ONLY=   ${_DISTFILES:M*tar.gz}
DISTFILES+= pgtcldocs-${MANUALREL}.zip:doc
MASTER_SITES+=  SF/pgtclng/Manual/${MANUALREL}:doc
.endif

PLIST_FILES=    lib/pgtcl/libpgtcl${PORTVERSION}.so \
        lib/pgtcl/pkgIndex.tcl
PLIST_DIRS= lib/pgtcl
PORTDOCS=   *

post-configure:
    ${REINPLACE_CMD} -e 's,tclstub,tcl,g' \
        -e 's,-DUSE_TCL_STUBS=1,-UUSE_TCL_STUBS,g' \
        ${WRKSRC}/Makefile

do-install:
    @${MKDIR} ${STAGEDIR}${LIBDIR}
    ${INSTALL_DATA} ${WRKSRC}/pkgIndex.tcl  \
        ${WRKSRC}/libpgtcl${PORTVERSION}.so ${STAGEDIR}${LIBDIR}
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${TAR} -xf ${DISTDIR}/${_DISTFILES:M*.zip} -C ${STAGEDIR}${DOCSDIR} \
        --strip-components 1 --no-same-permission --no-same-owner
    ${CHMOD} ${SHAREMODE} ${STAGEDIR}${DOCSDIR}/*
.endif

.include <bsd.port.mk>