aboutsummaryrefslogtreecommitdiff
path: root/dns/powerdns
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-03-06 12:44:50 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-03-06 12:44:50 +0000
commit7a59b9247faf8ecf47ff45044af7ad30e36e383d (patch)
treede0412b0a5262751e3cc2c71beca95a9a88d17ed /dns/powerdns
parent380b29758f3712e9d1d29f29293d80bb8970f301 (diff)
downloadports-7a59b9247faf8ecf47ff45044af7ad30e36e383d.tar.gz
ports-7a59b9247faf8ecf47ff45044af7ad30e36e383d.zip
Notes
Diffstat (limited to 'dns/powerdns')
-rw-r--r--dns/powerdns/Makefile13
-rw-r--r--dns/powerdns/files/configure.powerdns7
-rw-r--r--dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in11
-rw-r--r--dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc10
-rw-r--r--dns/powerdns/files/pdns.conf4
-rw-r--r--dns/powerdns/files/pdns_sqlite.sql33
-rw-r--r--dns/powerdns/pkg-plist1
7 files changed, 76 insertions, 3 deletions
diff --git a/dns/powerdns/Makefile b/dns/powerdns/Makefile
index 64333597c989..d12a244abcdf 100644
--- a/dns/powerdns/Makefile
+++ b/dns/powerdns/Makefile
@@ -7,7 +7,7 @@
PORTNAME= powerdns
PORTVERSION= 2.9.16
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= dns ipv6
MASTER_SITES= http://downloads.powerdns.com/releases/
DISTNAME= pdns-${PORTVERSION}
@@ -73,6 +73,15 @@ PLIST_SUB+= WITHLDAP=""
PLIST_SUB+= WITHLDAP="@comment "
.endif
+.if defined(WITH_SQLITE)
+LIB_DEPENDS= sqlite.2:${PORTSDIR}/${SQLITE_PORT}
+SQLITE_PORT?= databases/sqlite
+CONFIGURE_ARGS+= --enable-sqlite
+CONFIGURE_MODULES+= "gsqlite"
+.else
+CONFIGURE_ARGS+= --disable-sqlite
+.endif
+
.if defined(POWERDNS_WITH_RECURSOR)
USE_GCC=3.2
CONFIGURE_ARGS+= --enable-recursor
@@ -123,7 +132,7 @@ post-install:
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${EXAMPLESDIR}
-.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql
+.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql pdns_sqlite.sql
${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/
.endfor
.endif
diff --git a/dns/powerdns/files/configure.powerdns b/dns/powerdns/files/configure.powerdns
index da3636e5b234..fcdfe0dddec8 100644
--- a/dns/powerdns/files/configure.powerdns
+++ b/dns/powerdns/files/configure.powerdns
@@ -11,7 +11,7 @@ if [ "${POWERDNS_OPTIONS}" ]; then
else
dialog --title "configuration options" --clear \
--checklist "\n\
-Please select desired options:" -1 -1 8 \
+Please select desired options:" -1 -1 9 \
PostgreSQL "PostgreSQL driver" ON \
MySQL323 "MySQL 3.23 driver" OFF \
MySQL40 "MySQL 4.0 driver" OFF \
@@ -19,6 +19,7 @@ MySQL41 "MySQL 4.1 driver" OFF \
OpenLDAP20 "OpenLDAP 2.0 backend" OFF \
OpenLDAP21 "OpenLDAP 2.1 backend" OFF \
OpenLDAP22 "OpenLDAP 2.2 backend" OFF \
+SQLite "SQLite backend" OFF \
Recursor "Build Recursor" OFF \
2> /tmp/checklist.tmp.$$
@@ -71,6 +72,10 @@ while [ "$1" ]; do
echo WITH_LDAP=YES
echo LDAP_PORT?=net/openldap22-client
;;
+ \"SQLite\")
+ echo WITH_SQLITE=YES
+ echo SQLITE_PORT?=databases/sqlite
+ ;;
\"Recursor\")
echo POWERDNS_WITH_RECURSOR=YES
;;
diff --git a/dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in b/dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in
new file mode 100644
index 000000000000..015400560a2b
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in
@@ -0,0 +1,11 @@
+--- modules/gsqlitebackend/Makefile.in Fri Mar 5 09:59:34 2004
++++ modules/gsqlitebackend/Makefile.in Fri Mar 5 10:00:54 2004
+@@ -193,7 +193,7 @@
+ clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ libgsqlitebackend.la: $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_DEPENDENCIES)
+- $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
++# $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
diff --git a/dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc b/dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc
new file mode 100644
index 000000000000..2a757b0714bb
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc
@@ -0,0 +1,10 @@
+--- modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:33 2004
++++ modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:56 2004
+@@ -6,6 +6,7 @@
+
+ #include "pdns/utility.hh"
+ #include <string>
++#include <unistd.h>
+ #include "ssqlite.hh"
+ #include <iostream>
+
diff --git a/dns/powerdns/files/pdns.conf b/dns/powerdns/files/pdns.conf
index a45251872b73..d97daffd5507 100644
--- a/dns/powerdns/files/pdns.conf
+++ b/dns/powerdns/files/pdns.conf
@@ -12,6 +12,10 @@
#gpgsql-user=pdns
#gpgsql-password=pdns
+# SQLite
+#launch=gsqlite
+#gsqlite-database=<path to your SQLite database>
+
#################################
# allow-axfr-ips If disabled, DO allow zonetransfers from these IP addresses
#
diff --git a/dns/powerdns/files/pdns_sqlite.sql b/dns/powerdns/files/pdns_sqlite.sql
new file mode 100644
index 000000000000..f0f831fb2977
--- /dev/null
+++ b/dns/powerdns/files/pdns_sqlite.sql
@@ -0,0 +1,33 @@
+create table domains (
+ id INTEGER PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ master VARCHAR(20) DEFAULT NULL,
+ last_check INTEGER DEFAULT NULL,
+ type VARCHAR(6) NOT NULL,
+ notified_serial INTEGER DEFAULT NULL,
+ account VARCHAR(40) DEFAULT NULL
+);
+
+CREATE UNIQUE INDEX name_index ON domains(name);
+
+CREATE TABLE records (
+ id INTEGER PRIMARY KEY,
+ domain_id INTEGER DEFAULT NULL,
+ name VARCHAR(255) DEFAULT NULL,
+ type VARCHAR(6) DEFAULT NULL,
+ content VARCHAR(255) DEFAULT NULL,
+ ttl INTEGER DEFAULT NULL,
+ prio INTEGER DEFAULT NULL,
+ change_date INTEGER DEFAULT NULL
+);
+
+CREATE INDEX rec_name_index ON records(name);
+CREATE INDEX nametype_index ON records(name,type);
+CREATE INDEX domain_id ON records(domain_id);
+
+create table supermasters (
+ ip VARCHAR(25) NOT NULL,
+ nameserver VARCHAR(255) NOT NULL,
+ account VARCHAR(40) DEFAULT NULL
+);
+
diff --git a/dns/powerdns/pkg-plist b/dns/powerdns/pkg-plist
index 74c1eefe1f96..0925e1bcea29 100644
--- a/dns/powerdns/pkg-plist
+++ b/dns/powerdns/pkg-plist
@@ -15,4 +15,5 @@ etc/rc.d/pdns.sh.sample
%%PORTDOCS%%share/examples/powerdns/pdns.conf
%%PORTDOCS%%share/examples/powerdns/pdns_mysql.sql
%%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql
+%%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql
%%PORTDOCS%%@dirrm share/examples/powerdns