aboutsummaryrefslogtreecommitdiffstats
path: root/databases/firebird-server/Makefile
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2005-05-18 00:02:37 +0800
committersem <sem@FreeBSD.org>2005-05-18 00:02:37 +0800
commit1478098f8933caba435afa6a8b84d4dfdab444a4 (patch)
tree13914e57f50991a1afcfe6f7e1b60ce4ec302313 /databases/firebird-server/Makefile
parent35c3801e8c1fc8bd143f05cc065fcd776fb3ae8f (diff)
downloadfreebsd-ports-gnome-1478098f8933caba435afa6a8b84d4dfdab444a4.tar.gz
freebsd-ports-gnome-1478098f8933caba435afa6a8b84d4dfdab444a4.tar.zst
freebsd-ports-gnome-1478098f8933caba435afa6a8b84d4dfdab444a4.zip
- Split databases/firebird in -client and -server ports
- Install libs and includes on ${LOCALBASE} instead ${LOCALBASE}/firebird PR: ports/79337 Submitted by: maintainer
Diffstat (limited to 'databases/firebird-server/Makefile')
-rw-r--r--databases/firebird-server/Makefile165
1 files changed, 142 insertions, 23 deletions
diff --git a/databases/firebird-server/Makefile b/databases/firebird-server/Makefile
index 37c91e1cdc08..4519c1ce46ba 100644
--- a/databases/firebird-server/Makefile
+++ b/databases/firebird-server/Makefile
@@ -5,16 +5,18 @@
# $FreeBSD$
#
-PORTNAME= firebird
+PORTNAME?= firebird
PORTVERSION= 1.5.2
-CATEGORIES= databases
+CATEGORIES?= databases
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=firebird
+PKGNAMESUFFIX?= -server
DISTNAME= firebird-1.5.2.4731
-MAINTAINER= freebsd@galle.com.br
-COMMENT= The open-source InterBase(tm) 6.0 spin-off (Classic version)
+MAINTAINER= renato@galle.com.br
+COMMENT?= The open-source InterBase(tm) 6.0 spin-off (Classic version)
+USE_REINPLACE= yes
USE_BISON= yes
USE_BZIP2= yes
USE_GMAKE= yes
@@ -28,19 +30,48 @@ PLIST_SUB= FIREBIRD_VERSION=${PORTVERSION}
# Don't use ld for linking, use gcc
LD= gcc
-CONFLICTS= firebird-devel-[0-9]*
+# Don't strip binary files
+STRIP=
+
+ONLY_FOR_ARCHS= i386
WRKSRC= ${WRKDIR}/${DISTNAME}
-INSTALLS_SHLIB= yes
-LDCONFIG_DIRS= %%PREFIX%%/firebird/lib
-MSG_FILE= ${PKGDIR}/pkg-message
+
+.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
+BINOWN= firebird
+BINGRP= firebird
+BINMODE= 550
+SHAREOWN= firebird
+SHAREGRP= firebird
+
PKGMESSAGE= ${WRKDIR}/pkg-message
-USE_REINPLACE= yes
+PKGINSTALL= ${WRKDIR}/pkg-install
-ONLY_FOR_ARCHS= i386
+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
+.endif
.include <bsd.port.pre.mk>
+.if !defined(CLIENT_ONLY)
pre-everything::
@${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"
@@ -55,6 +86,33 @@ pre-everything::
@sleep 10
.endif
+post-patch:
+ @${REINPLACE_CMD} -e 's|^\(LINK_OPTS +=.*\)$$|\1 -L${LOCALBASE}/lib|' \
+ ${WRKSRC}/builds/posix/Makefile.in.inet_server
+
+post-build:
+ ${SED} 's|%%PREFIX%%|${PREFIX}|g' \
+ < ${FILESDIR}/pkg-message.in \
+ > ${PKGMESSAGE}
+
+ ${SED} -e 's|%%PREFIX%%|${PREFIX}/firebird|g' \
+ < ${FILESDIR}/pkg-install.in \
+ > ${PKGINSTALL}
+
+ ${SED} -e "s|%%PREFIX%%|${PREFIX}/firebird|g" \
+ < ${FILESDIR}/aliases.conf.in \
+ > ${WRKDIR}/aliases.conf
+
+pre-install:
+ ${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+
+post-install:
+ ${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
+ @${ECHO_MSG}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
+.endif
+
patch-autotools:
@${DO_NADA}
@@ -63,20 +121,81 @@ run-autotools:
do-configure:
@(cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} MAKE=${GMAKE} \
- ${AUTOTOOLS_VARS} ./autogen.sh --prefix=${PREFIX}/firebird \
- --with-lock-manager --with-editline)
+ ${AUTOTOOLS_VARS} ./autogen.sh ${AUTOGENARGS})
-do-build:
- @( \
- ${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}; \
- cd ${WRKSRC}; \
- ${SETENV} CC=${CC} CXX=${CXX} ${GMAKE} all; \
- )
+post-configure:
+ @${REINPLACE_CMD} -e 's|__attribute__ ((__unused__));||' \
+ ${WRKSRC}/src/dsql/parse.cpp
-post-install:
- @( \
- ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird; \
- ${CAT} ${PKGMESSAGE}; \
- )
+do-install:
+.if !defined(CLIENT_ONLY)
+
+ ${MKDIR} ${PREFIX}/firebird
+ ${CHOWN} ${BINOWN}:${BINGRP} ${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
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/misc/firebird.conf ${PREFIX}/firebird/firebird.conf.sample
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/security.fdb ${PREFIX}/firebird/security.fdb.sample
+ ${CHMOD} 660 ${PREFIX}/firebird/security.fdb.sample
+
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/firebird.msg ${PREFIX}/firebird/firebird.msg
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/help/help.fdb ${PREFIX}/firebird/help
+
+.for f in ib_udf.so fbudf.so
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/UDF/${f} ${PREFIX}/firebird/UDF
+.endfor
+
+.for f in src/extlib/ib_udf.sql src/extlib/fbudf/fbudf.sql
+ ${INSTALL_SCRIPT} ${WRKSRC}/${f} ${PREFIX}/firebird/UDF
+.endfor
+
+.for f in fb_inet_server fb_lock_mgr
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${f} ${PREFIX}/firebird/bin
+ ${CHMOD} u+s ${PREFIX}/firebird/bin/${f}
+.endfor
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/intl/libfbintl.so ${PREFIX}/firebird/intl/fbintl
+
+ ${INSTALL_DATA} ${FILESDIR}/RELNOTES ${PREFIX}/firebird
+
+.else
+
+.for dir in include share/doc/firebird \
+ share/doc/firebird/sql.extensions share/examples/firebird
+ ${MKDIR} ${PREFIX}/${dir}
+.endfor
+
+.for f in fb_lock_print gbak gdef gds_drop gfix gpre gsec gstat isql qli
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/bin/${f} ${PREFIX}/bin
+.endfor
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/lib/libfbclient.so.${PORTVERSION} ${PREFIX}/lib
+ ${LN} -fs libfbclient.so.${PORTVERSION} ${PREFIX}/lib/libfbclient.so.1
+ ${LN} -fs libfbclient.so.1 ${PREFIX}/lib/libfbclient.so
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/lib/libfbembed.so.${PORTVERSION} ${PREFIX}/lib
+ ${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
+
+ ${INSTALL_PROGRAM} ${WRKSRC}/gen/firebird/lib/libib_util.so ${PREFIX}/lib
+
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/include/*.h ${PREFIX}/include
+
+ ${INSTALL_DATA} ${WRKSRC}/doc/WhatsNew ${PREFIX}/share/doc/firebird
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.* ${PREFIX}/share/doc/firebird
+ ${INSTALL_DATA} ${WRKSRC}/doc/README.user ${PREFIX}/share/doc/firebird/README
+ ${INSTALL_DATA} ${WRKSRC}/doc/sql.extensions/README.* ${PREFIX}/share/doc/firebird/sql.extensions
+
+ # Install examples
+ ${INSTALL_DATA} ${WRKSRC}/gen/firebird/examples/v5/* ${PREFIX}/share/examples/firebird
+.endif
.include <bsd.port.post.mk>