mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
BIND version 9.7 with support for sdb database drivers, including ldap and
postgresql. WWW: https://www.isc.org/software/bind/ PR: ports/157752 Submitted by: Josh Carroll <josh.carroll@gmail.com>
This commit is contained in:
parent
3b860689ff
commit
bf583d94c7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281539
9 changed files with 210 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
SUBDIR += bind9-sdb-postgresql
|
||||
SUBDIR += bind96
|
||||
SUBDIR += bind97
|
||||
SUBDIR += bind97-sdb
|
||||
SUBDIR += bind98
|
||||
SUBDIR += bindgraph
|
||||
SUBDIR += c-ares
|
||||
|
|
105
dns/bind97-sdb/Makefile
Normal file
105
dns/bind97-sdb/Makefile
Normal file
|
@ -0,0 +1,105 @@
|
|||
# New ports collection makefile for: bind97-sdb-postgresql
|
||||
# Date created: 2011-06-10
|
||||
# Whom: Josh Carroll <josh.carroll@gmail.com>
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= bind97-sdb
|
||||
|
||||
MAINTAINER= josh.carroll@gmail.com
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../bind97
|
||||
|
||||
CONFLICTS= bind9? host-*
|
||||
|
||||
# the user may pick one and only one SDB driver. Depending on which
|
||||
# option the user picks, the appropriate patches will be applied
|
||||
# so bind is built with the proper driver
|
||||
OPTIONS= PGSQL "Build with PostgreSQL SDB support" on \
|
||||
LDAP "Build with LDAP SDB support" off
|
||||
|
||||
# Future use
|
||||
# DIRDB "Build with dirdb SDB support" off \
|
||||
# BDB "Build with bdb SDB support" off \
|
||||
# SQLITE "Build with sqlite SDB support" off \
|
||||
# TCL "Build with tcldb SDB support" off \
|
||||
# TIMEDB "Build with timedb SDB support" off
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
OUR_PATCHDIR:=${.CURDIR}/files
|
||||
|
||||
# check that one and ONLY one of the SDB options is set
|
||||
# the value of SDB_DRIVER should match the name of the
|
||||
# contrib/sdb dir
|
||||
num_sdb_types:=SDB
|
||||
.if defined(WITH_PGSQL)
|
||||
num_sdb_types+=1
|
||||
USE_PGSQL= yes
|
||||
EXTRA_PATCHES+= ${OUR_PATCHDIR}/patch-pgsql-bin__named__Makefile.in \
|
||||
${OUR_PATCHDIR}/patch-pgsql-bin__named__main.c \
|
||||
${OUR_PATCHDIR}/patch-pgsql-bin__named__pgsqldb.c
|
||||
SDB_DRIVER=pgsql
|
||||
SDB_DRIVER_FILES=pgsqldb.c pgsqldb.h
|
||||
.endif
|
||||
|
||||
.if defined(WITH_LDAP)
|
||||
num_sdb_types+=1
|
||||
USE_OPENLDAP= yes
|
||||
EXTRA_PATCHES+= ${OUR_PATCHDIR}/patch-ldap-bin__named__Makefile.in \
|
||||
${OUR_PATCHDIR}/patch-ldap-bin__named__main.c
|
||||
SDB_DRIVER=ldap
|
||||
SDB_DRIVER_FILES=ldapdb.c
|
||||
.endif
|
||||
|
||||
.if defined(WITH_DIRDB)
|
||||
num_sdb_types+=1
|
||||
SDB_DRIVER=dir
|
||||
SDB_DRIVER_FILES=
|
||||
IGNORE=This port does not yet support SDB DIRDB
|
||||
.endif
|
||||
|
||||
.if defined(WITH_BDB)
|
||||
num_sdb_types+=1
|
||||
SDB_DRIVER=bdb
|
||||
SDB_DRIVER_FILES=
|
||||
IGNORE=This port does not yet support SDB BDB
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SQLITE)
|
||||
num_sdb_types+=1
|
||||
SDB_DRIVER=sqlite
|
||||
SDB_DRIVER_FILES=
|
||||
IGNORE=This port does not yet support SDB SQLITE
|
||||
.endif
|
||||
|
||||
.if defined(WITH_TCL)
|
||||
num_sdb_types+=1
|
||||
SDB_DRIVER=tcldb
|
||||
SDB_DRIVER_FILES=
|
||||
IGNORE=This port does not yet support SDB TCLDB
|
||||
.endif
|
||||
|
||||
.if defined(WITH_TIMEDB)
|
||||
num_sdb_types+=1
|
||||
SDB_DRIVER=timedb
|
||||
SDB_DRIVER_FILES=
|
||||
IGNORE=This port does not yet support SDB TIMEDB
|
||||
.endif
|
||||
|
||||
# if one and only 1 of the SDB options is set
|
||||
# then the value of ${num_sdb_types} will be "SDB 1"
|
||||
.if ${num_sdb_types} == "SDB"
|
||||
IGNORE=You must select one SDB database type : DEBUG 1: ->${num_sdb_types}<-
|
||||
.else
|
||||
. if ${num_sdb_types} != "SDB 1"
|
||||
IGNORE=You have selected more than one SDB database type : DEBUG 2: ->${num_sdb_types}<-
|
||||
. endif
|
||||
.endif
|
||||
|
||||
pre-patch:
|
||||
.for FILE in ${SDB_DRIVER_FILES}
|
||||
@${CP} ${WRKSRC}/contrib/sdb/${SDB_DRIVER}/${FILE} ${WRKSRC}/bin/named
|
||||
.endfor
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
17
dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in
Normal file
17
dns/bind97-sdb/files/patch-ldap-bin__named__Makefile.in
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- bin/named/Makefile.in.orig 2011-06-10 18:17:33.000000000 -0700
|
||||
+++ bin/named/Makefile.in 2011-06-10 18:19:54.000000000 -0700
|
||||
@@ -28,10 +28,10 @@
|
||||
#
|
||||
# Add database drivers here.
|
||||
#
|
||||
-DBDRIVER_OBJS =
|
||||
-DBDRIVER_SRCS =
|
||||
-DBDRIVER_INCLUDES =
|
||||
-DBDRIVER_LIBS =
|
||||
+DBDRIVER_OBJS = ldapdb.@O@
|
||||
+DBDRIVER_SRCS = ldapdb.c
|
||||
+DBDRIVER_INCLUDES = -I../../contrib/sdb/ldap -I${LOCALBASE}include
|
||||
+DBDRIVER_LIBS = -L${LOCALBASE}/lib -lldap -llber
|
||||
|
||||
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
||||
|
26
dns/bind97-sdb/files/patch-ldap-bin__named__main.c
Normal file
26
dns/bind97-sdb/files/patch-ldap-bin__named__main.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- bin/named/main.c.orig 2008-10-23 18:28:08.000000000 -0700
|
||||
+++ bin/named/main.c 2011-06-10 16:47:50.000000000 -0700
|
||||
@@ -73,6 +73,7 @@
|
||||
* Include header files for database drivers here.
|
||||
*/
|
||||
/* #include "xxdb.h" */
|
||||
+#include <ldapdb.h>
|
||||
|
||||
/*
|
||||
* Include DLZ drivers if appropriate.
|
||||
@@ -716,6 +717,7 @@
|
||||
* Add calls to register sdb drivers here.
|
||||
*/
|
||||
/* xxdb_init(); */
|
||||
+ ldapdb_init();
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
||||
@@ -742,6 +744,7 @@
|
||||
* Add calls to unregister sdb drivers here.
|
||||
*/
|
||||
/* xxdb_clear(); */
|
||||
+ ldapdb_clear();
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
17
dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in
Normal file
17
dns/bind97-sdb/files/patch-pgsql-bin__named__Makefile.in
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- bin/named/Makefile.in.orig 2011-06-10 10:18:29.000000000 -0700
|
||||
+++ bin/named/Makefile.in 2011-06-10 10:01:43.000000000 -0700
|
||||
@@ -28,10 +28,10 @@
|
||||
#
|
||||
# Add database drivers here.
|
||||
#
|
||||
-DBDRIVER_OBJS =
|
||||
-DBDRIVER_SRCS =
|
||||
-DBDRIVER_INCLUDES =
|
||||
-DBDRIVER_LIBS =
|
||||
+DBDRIVER_OBJS = pgsqldb.@O@
|
||||
+DBDRIVER_SRCS = pgsqldb.c
|
||||
+DBDRIVER_INCLUDES = -I../../contrib/sdb/pgsql -I${LOCALBASE}/include
|
||||
+DBDRIVER_LIBS = -L${LOCALBASE}/lib -lpq
|
||||
|
||||
DLZ_DRIVER_DIR = ${top_srcdir}/contrib/dlz/drivers
|
||||
|
26
dns/bind97-sdb/files/patch-pgsql-bin__named__main.c
Normal file
26
dns/bind97-sdb/files/patch-pgsql-bin__named__main.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
--- bin/named/main.c.orig 2011-06-10 10:18:35.000000000 -0700
|
||||
+++ bin/named/main.c 2011-06-10 10:03:45.000000000 -0700
|
||||
@@ -74,6 +74,7 @@
|
||||
* Include header files for database drivers here.
|
||||
*/
|
||||
/* #include "xxdb.h" */
|
||||
+#include <pgsqldb.h>
|
||||
|
||||
/*
|
||||
* Include DLZ drivers if appropriate.
|
||||
@@ -841,6 +842,7 @@
|
||||
* Add calls to register sdb drivers here.
|
||||
*/
|
||||
/* xxdb_init(); */
|
||||
+ pgsqldb_init();
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
||||
@@ -867,6 +869,7 @@
|
||||
* Add calls to unregister sdb drivers here.
|
||||
*/
|
||||
/* xxdb_clear(); */
|
||||
+ pgsqldb_clear();
|
||||
|
||||
#ifdef DLZ
|
||||
/*
|
11
dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c
Normal file
11
dns/bind97-sdb/files/patch-pgsql-bin__named__pgsqldb.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- bin/named/pgsqldb.c.orig 2011-06-10 12:54:44.000000000 -0700
|
||||
+++ bin/named/pgsqldb.c 2011-06-10 12:56:42.000000000 -0700
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
-#include <pgsql/libpq-fe.h>
|
||||
+#include <libpq-fe.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
6
dns/bind97-sdb/pkg-descr
Normal file
6
dns/bind97-sdb/pkg-descr
Normal file
|
@ -0,0 +1,6 @@
|
|||
BIND version 9.7 with support for sdb database drivers, including ldap and
|
||||
postgresql.
|
||||
|
||||
WWW: https://www.isc.org/software/bind/
|
||||
|
||||
- Josh <josh.carroll@gmail.com>
|
|
@ -31,7 +31,7 @@ CONFIGURE_ARGS= --localstatedir=/var --disable-linux-caps \
|
|||
|
||||
CONFLICTS= bind9*-9.[45689].* bind9-sdb-* host-*
|
||||
|
||||
OPTIONS= SSL "Building without OpenSSL removes DNSSEC" on \
|
||||
OPTIONS+= SSL "Building without OpenSSL removes DNSSEC" on \
|
||||
IDN "Add IDN support to dig, host, etc." off \
|
||||
REPLACE_BASE "Replace base BIND with this version" off \
|
||||
LARGE_FILE "64-bit file support" off \
|
||||
|
|
Loading…
Add table
Reference in a new issue