2001-03-10 21:32:33 +01:00
|
|
|
# New ports collection makefile for: Firebird
|
|
|
|
# Date created: 20 December 2000
|
|
|
|
# Whom: Geoffrey C. Speicher <geoff@sea-incorporated.com>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
PORTNAME?= firebird
|
2005-01-10 10:46:20 +01:00
|
|
|
PORTVERSION= 1.5.2
|
2005-05-23 13:13:23 +02:00
|
|
|
PORTREVISION?= 2
|
2005-05-17 18:02:37 +02:00
|
|
|
CATEGORIES?= databases
|
2004-02-28 23:13:42 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2001-03-10 21:32:33 +01:00
|
|
|
MASTER_SITE_SUBDIR=firebird
|
2005-05-17 18:02:37 +02:00
|
|
|
PKGNAMESUFFIX?= -server
|
2005-01-10 10:46:20 +01:00
|
|
|
DISTNAME= firebird-1.5.2.4731
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2005-07-11 18:47:16 +02:00
|
|
|
MAINTAINER= garga@FreeBSD.org
|
2005-05-17 18:02:37 +02:00
|
|
|
COMMENT?= The open-source InterBase(tm) 6.0 spin-off (Classic version)
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
USE_REINPLACE= yes
|
2004-02-12 11:11:25 +01:00
|
|
|
USE_BISON= yes
|
2003-12-04 18:26:13 +01:00
|
|
|
USE_BZIP2= yes
|
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2004-07-22 09:57:37 +02:00
|
|
|
USE_LIBTOOL_VER= 15
|
|
|
|
USE_AUTOCONF_VER= 259
|
2005-01-10 10:46:20 +01:00
|
|
|
USE_GCC= 3.4
|
2003-06-10 11:59:45 +02:00
|
|
|
|
2004-07-22 09:57:37 +02:00
|
|
|
PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION}
|
|
|
|
|
2003-12-04 18:26:13 +01:00
|
|
|
# Don't use ld for linking, use gcc
|
|
|
|
LD= gcc
|
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
# Don't strip binary files
|
|
|
|
STRIP=
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
2003-12-04 18:26:13 +01:00
|
|
|
|
2005-01-10 10:46:20 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
2005-05-17 18:02:37 +02:00
|
|
|
|
|
|
|
.if !defined(CLIENT_ONLY)
|
|
|
|
# Server part stuff
|
|
|
|
LIB_DEPENDS+= fbembed.1:${PORTSDIR}/databases/firebird-client
|
|
|
|
|
|
|
|
AUTOGENARGS= --prefix=${PREFIX}/firebird \
|
|
|
|
--with-lock-manager
|
|
|
|
|
|
|
|
ALL_TARGET= firebird_boot ref_databases msgs intl otherfiles \
|
|
|
|
inet_server extlib
|
|
|
|
|
|
|
|
# Use own user and group when install server part
|
|
|
|
BINGRP= firebird
|
|
|
|
BINMODE= 550
|
|
|
|
SHAREGRP= firebird
|
|
|
|
|
2005-05-21 10:01:24 +02:00
|
|
|
SUB_FILES= pkg-install pkg-message aliases.conf
|
|
|
|
|
2001-12-02 18:53:14 +01:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
2005-05-17 18:02:37 +02:00
|
|
|
PKGINSTALL= ${WRKDIR}/pkg-install
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
SERVER_BIN= fb_inet_server fb_lock_mgr
|
|
|
|
UDF_SO= ib_udf.so fbudf.so
|
|
|
|
UDF_SQL= src/extlib/ib_udf.sql src/extlib/fbudf/fbudf.sql
|
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
CONFLICTS= firebird-devel-[0-9]*
|
|
|
|
.else
|
|
|
|
# Client part stuff
|
|
|
|
AUTOGENARGS= --prefix=${PREFIX} \
|
|
|
|
--with-editline
|
|
|
|
|
|
|
|
ALL_TARGET= firebird_basic libfbembed embed_gfix embed_gbak embed_isql embed_gpre \
|
|
|
|
embed_util embed_gdef embed_qli libfbclient extlib
|
|
|
|
|
|
|
|
INSTALLS_SHLIB= yes
|
2005-05-23 13:13:23 +02:00
|
|
|
LIBDATADIR= ${PREFIX}/libdata/firebird
|
|
|
|
PLIST_SUB+= LIBDATADIR="libdata/firebird"
|
|
|
|
CLIENT_BIN= fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli
|
2005-05-21 10:01:24 +02:00
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
PORTDOCS= *
|
|
|
|
.endif
|
2005-05-17 18:02:37 +02:00
|
|
|
.endif
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2001-06-18 10:14:16 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
.if !defined(CLIENT_ONLY)
|
2003-02-28 23:53:02 +01:00
|
|
|
pre-everything::
|
2003-01-17 05:43:17 +01:00
|
|
|
@${ECHO_MSG} "NOTE: If the work directory is on an NFS mount, you will"
|
|
|
|
@${ECHO_MSG} "require NFS client locking support for the build to"
|
|
|
|
@${ECHO_MSG} "succeed. Currently this is only available on FreeBSD 5.0"
|
|
|
|
@${ECHO_MSG} "or greater."
|
2003-12-04 18:26:13 +01:00
|
|
|
@${ECHO_MSG}
|
|
|
|
@${ECHO_MSG} "WARNING: The on-disk structure of the databases has"
|
|
|
|
@${ECHO_MSG} "changed since version 1.0.x."
|
|
|
|
@${ECHO_MSG} "Cancel this installation now and backup your databases"
|
|
|
|
@${ECHO_MSG} "if you have not already done so."
|
2003-01-17 05:43:17 +01:00
|
|
|
.if !defined(BATCH)
|
2003-12-04 18:26:13 +01:00
|
|
|
@sleep 10
|
2003-01-16 12:52:00 +01:00
|
|
|
.endif
|
2005-05-21 10:01:24 +02:00
|
|
|
.endif
|
2003-01-16 12:52:00 +01:00
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
post-patch:
|
2005-05-21 10:01:24 +02:00
|
|
|
.if !defined(CLIENT_ONLY)
|
2005-05-17 18:02:37 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \
|
|
|
|
${WRKSRC}/builds/posix/Makefile.in.inet_server
|
2005-05-21 10:01:24 +02:00
|
|
|
.endif
|
2005-05-23 13:13:23 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%LIBDATADIR%%|${LIBDATADIR}|g' \
|
2005-05-21 10:01:24 +02:00
|
|
|
${WRKSRC}/src/jrd/gds.cpp
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-21 10:01:24 +02:00
|
|
|
.if !defined(CLIENT_ONLY)
|
2005-05-17 18:02:37 +02:00
|
|
|
pre-install:
|
2005-05-21 10:01:24 +02:00
|
|
|
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
|
2005-05-17 18:02:37 +02:00
|
|
|
|
|
|
|
post-install:
|
2005-05-21 10:01:24 +02:00
|
|
|
@${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
|
2005-05-17 18:02:37 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.endif
|
|
|
|
|
2001-03-10 21:32:33 +01:00
|
|
|
do-configure:
|
2004-01-13 17:11:11 +01:00
|
|
|
@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} \
|
2005-05-17 18:02:37 +02:00
|
|
|
${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS})
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
post-configure:
|
|
|
|
@${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \
|
|
|
|
${WRKSRC}/src/dsql/parse.cpp
|
2005-05-21 10:01:24 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|firebird\.conf|${PREFIX}/etc/firebird.conf|g; \
|
|
|
|
s|root_dir + string(CONFIG_FILE)|string(CONFIG_FILE)|g' \
|
|
|
|
${WRKSRC}/src/jrd/os/posix/config_root.cpp
|
|
|
|
|
|
|
|
do-build:
|
|
|
|
@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} ${ALL_TARGET})
|
2004-01-13 17:11:11 +01:00
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
do-install:
|
|
|
|
.if !defined(CLIENT_ONLY)
|
|
|
|
|
|
|
|
${MKDIR} ${PREFIX}/firebird
|
|
|
|
.for f in UDF bin help intl
|
|
|
|
${MKDIR} ${PREFIX}/firebird/${f}
|
|
|
|
${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/firebird/${f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/aliases.conf ${PREFIX}/firebird/aliases.conf.sample
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_DATA} -m 660 -o firebird ${WRKSRC}/gen/firebird/security.fdb \
|
|
|
|
${PREFIX}/firebird/security.fdb.sample
|
|
|
|
${INSTALL_DATA} -m 0440 ${WRKSRC}/gen/firebird/help/help.fdb ${PREFIX}/firebird/help
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_DATA} ${UDF_SO:S!^!${WRKSRC}/gen/firebird/UDF/!} \
|
|
|
|
${UDF_SQL:S!^!${WRKSRC}/!} ${PREFIX}/firebird/UDF
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_PROGRAM} -o firebird \
|
|
|
|
${SERVER_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} ${PREFIX}/firebird/bin
|
|
|
|
${CHMOD} u+s ${SERVER_BIN:S!^!${PREFIX}/firebird/bin/!}
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${PREFIX}/firebird/intl/fbintl
|
2005-05-17 18:02:37 +02:00
|
|
|
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird
|
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
# runtime files (.lock, .log) still placed to ${PREFIX}/firebird
|
|
|
|
${CHOWN} firebird:firebird ${PREFIX}/firebird
|
|
|
|
${CHOWN} -R firebird:firebird ${PREFIX}/firebird/help
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
.else
|
|
|
|
# defined CLIENT_ONLY
|
|
|
|
${INSTALL_PROGRAM} ${CLIENT_BIN:S!^!${WRKSRC}/gen/firebird/bin/!} \
|
|
|
|
${PREFIX}/bin
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-21 10:01:24 +02:00
|
|
|
@${MKDIR} ${PREFIX}/etc
|
|
|
|
.if !exists(${PREFIX}/etc/firebird.conf)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc
|
|
|
|
.endif
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/etc/firebird.conf.sample
|
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/lib/libib_util.so \
|
|
|
|
${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} \
|
|
|
|
${WRKSRC}/gen/firebird/lib/libfbembed.so.${PORTVERSION} \
|
|
|
|
${PREFIX}/lib
|
|
|
|
|
2005-05-17 18:02:37 +02:00
|
|
|
${LN} -fs libfbclient.so.${PORTVERSION} ${PREFIX}/lib/libfbclient.so.1
|
|
|
|
${LN} -fs libfbclient.so.1 ${PREFIX}/lib/libfbclient.so
|
|
|
|
|
|
|
|
${LN} -fs libfbembed.so.${PORTVERSION} ${PREFIX}/lib/libfbembed.so.1
|
|
|
|
${LN} -fs libfbembed.so.1 ${PREFIX}/lib/libfbembed.so
|
|
|
|
${LN} -fs libfbembed.so.1 ${PREFIX}/lib/libgds.so.1
|
|
|
|
${LN} -fs libfbembed.so.1 ${PREFIX}/lib/libgds.so
|
|
|
|
|
2005-05-21 10:01:24 +02:00
|
|
|
@${MKDIR} ${PREFIX}/include
|
2005-05-17 18:02:37 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include
|
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
@${MKDIR} ${LIBDATADIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/*.msg ${LIBDATADIR}
|
2005-05-21 10:01:24 +02:00
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}/sql.extensions
|
2005-05-23 13:13:23 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/WhatsNew ${WRKSRC}/doc/README.* ${DOCSDIR}
|
2005-05-21 10:01:24 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/README.user ${DOCSDIR}/README
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/README.* ${DOCSDIR}/sql.extensions
|
|
|
|
.endif
|
2005-05-17 18:02:37 +02:00
|
|
|
|
2005-05-23 13:13:23 +02:00
|
|
|
@${ECHO_MSG} "===> Installing examples for ${PKGNAME}"
|
2005-05-21 10:01:24 +02:00
|
|
|
@${MKDIR} ${EXAMPLESDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${EXAMPLESDIR}
|
2005-05-17 18:02:37 +02:00
|
|
|
.endif
|
2001-03-10 21:32:33 +01:00
|
|
|
|
2001-06-18 10:14:16 +02:00
|
|
|
.include <bsd.port.post.mk>
|