pkgsrc/databases/freetds/Makefile

59 lines
2.1 KiB
Makefile

# $NetBSD: Makefile,v 1.40 2009/06/16 15:25:31 joerg Exp $
DISTNAME= freetds-0.82
PKGREVISION= 2
CATEGORIES= databases
MASTER_SITES= ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/ \
ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/old/ \
ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/current/
MAINTAINER= tsarna@NetBSD.org
HOMEPAGE= http://www.freetds.org/
COMMENT= Implementation of TDS protocol used by Sybase and MS-SQL servers
PKG_DESTDIR_SUPPORT= user-destdir
.include "options.mk"
USE_LIBTOOL= yes
USE_GNU_READLINE= yes # rl_on_new_line, rl_reset_line_state
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
CONFIGURE_ARGS+= --datadir=${PREFIX}/share
CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.iconv:Q}
CONFIGURE_ARGS+= --with-tdsver=7.0
# no thread-safe resolver functions on NetBSD
CONFIGURE_ARGS+= --disable-threadsafe
DOCDIR= ${PREFIX}/share/doc/freetds
EGDIR= ${PREFIX}/share/examples/freetds
CONF_FILES+= ${EGDIR}/freetds.conf ${PKG_SYSCONFDIR}/freetds.conf
CONF_FILES+= ${EGDIR}/locales.conf ${PKG_SYSCONFDIR}/locales.conf
CONF_FILES+= ${EGDIR}/pool.conf ${PKG_SYSCONFDIR}/pool.conf
# doc/Makefile ignores TARGET_DOCDIR for the files listed in
# nobase_data_DATA. Make the Makefiles think the documentation is
# in doc/freetds through symlinks and by overriding DOCDIR.
#
MAKE_FLAGS+= DOCDIR=doc/freetds
INSTALL_MAKE_FLAGS+= ${MAKE_FLAGS} ETC=${DESTDIR}${EGDIR:Q}
pre-build:
cd ${WRKSRC}/doc/doc && ln -s ${DISTNAME:Q} freetds
# The FreeTDS documentation is generated by doxygen and the file names
# change from release to release. Rather than having the PLIST change
# radically between releases, just generate the documentation entries
# dynamically for the PLIST.
#
GENERATE_PLIST+= \
${ECHO} "@comment The following lines are automatically generated." && \
( cd ${WRKSRC}/doc/doc/${DISTNAME} && \
${FIND} reference userguide \! -type d -print && \
cd ${WRKSRC}/doc && ${FIND} images -name "*.gif" -print ) | \
${SED} -e "s,^,"${DOCDIR:S|${PREFIX}/||:Q}"/," | ${SORT};
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/readline/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"