aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/refdb
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/refdb')
-rw-r--r--textproc/refdb/Makefile38
1 files changed, 17 insertions, 21 deletions
diff --git a/textproc/refdb/Makefile b/textproc/refdb/Makefile
index 67c990f78559..0471b9711707 100644
--- a/textproc/refdb/Makefile
+++ b/textproc/refdb/Makefile
@@ -1,9 +1,5 @@
-# New ports collection makefile for: refdb
-# Date created: 28 Apr 2005
-# Whom: paulh@logicsquad.net
-#
+# Created by: paulh@logicsquad.net
# $FreeBSD$
-#
PORTNAME= refdb
PORTVERSION= 0.9.9
@@ -34,10 +30,13 @@ DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${PORTVERSION}-1
XMLCATMGR= ${LOCALBASE}/bin/xmlcatmgr
-OPTIONS= MYSQL "Use MySQL" on \
- PGSQL "Use PostgreSQL" off \
- SQLITE "Use SQLite" off \
- CATALOG "Install SGML catalog" off
+OPTIONS_DEFINE= CATALOG
+
+OPTIONS_SINGLE= DB
+OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE
+CATALOG_DESC= Install SGML catalog
+
+OPTIONS_DEFAULT= MYSQL
MAN1= bib2ris.1 bib2ris-utf8.1 db2ris.1 eenc.1 en2ris.1 marc2ris.1 med2ris.1 \
refdb-backup.1 refdb-bug.1 refdb-ms.1 refdb-restore.1 \
@@ -49,12 +48,9 @@ MAN1= bib2ris.1 bib2ris-utf8.1 db2ris.1 eenc.1 en2ris.1 marc2ris.1 med2ris.1 \
MAN8= refdb.8 refdb.sh.8 refdb-init.8
.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if defined(WITHOUT_MYSQL) && !defined(WITH_PGSQL) && !defined(WITH_SQLITE)
-IGNORE= you must choose a back-end database
-.endif
-
-.if !defined(WITHOUT_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
# If libdbi-drivers has been built without MySQL driver, abort
.if exists(${LOCALBASE}/lib/dbd) && !exists(${LOCALBASE}/lib/dbd/libdbdmysql.so)
@@ -64,7 +60,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/dbd:${PORTSDIR}/databases/libdbi-drivers
.endif
CONFIGURE_ARGS+= --with-db-server=mysql
-.elif defined(WITH_PGSQL)
+.elif ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
# If libdbi-drivers has been built without PostgreSQL driver, abort
.if exists(${LOCALBASE}/lib/dbd) && !exists(${LOCALBASE}/lib/dbd/libdbdpgsql.so)
@@ -74,7 +70,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/dbd:${PORTSDIR}/databases/libdbi-drivers
.endif
CONFIGURE_ARGS+= --with-db-server=pgsql
-.elif defined(WITH_SQLITE)
+.elif ${PORT_OPTIONS:MSQLITE}
LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3
# If libdbi-drivers has been built without SQLite driver, abort
.if exists(${LOCALBASE}/lib/dbd) && !exists(${LOCALBASE}/lib/dbd/libdbdsqlite.so)
@@ -85,17 +81,17 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/dbd:${PORTSDIR}/databases/libdbi-drivers
CONFIGURE_ARGS+= --with-db-server=sqlite
.endif
-.if defined(WITH_CATALOG)
+.if ${PORT_OPTIONS:MCATALOG}
RUN_DEPENDS+= xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr
.endif
post-install:
-.if defined(WITH_CATALOG)
+.if ${PORT_OPTIONS:MCATALOG}
@[ -f ${PREFIX}/share/sgml/catalog.ports ] || ${TOUCH} ${PREFIX}/share/sgml/catalog.ports
@${XMLCATMGR} -s -c ${PREFIX}/share/sgml/catalog.ports lookup "${PREFIX}/share/refdb/refdb.cat" > /dev/null || ${XMLCATMGR} -s -c ${PREFIX}/share/sgml/catalog.ports add CATALOG "${PREFIX}/share/refdb/refdb.cat" -- > /dev/null
.endif
@${ECHO_MSG} "To complete RefDB installation:"
-.if defined(WITH_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
@${ECHO_MSG} ""
@${ECHO_MSG} "1. To initialise MySQL, run the following command:"
@${ECHO_MSG} ""
@@ -109,14 +105,14 @@ post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} " mysql -u root refdb < ${PREFIX}/share/refdb/sql/refdb.dump.mysql41"
@${ECHO_MSG} ""
-.elif defined(WITH_PGSQL)
+.elif ${PORT_OPTIONS:MPGSQL}
@${ECHO_MSG} ""
@${ECHO_MSG} "1. To initialise PostgreSQL, run the following commands:"
@${ECHO_MSG} ""
@${ECHO_MSG} " createdb -U pgsql -E UNICODE refdb"
@${ECHO_MSG} " psql -U pgsql refdb < ${PREFIX}/share/refdb/sql/refdb.dump.pgsql"
@${ECHO_MSG} ""
-.elif defined(WITH_SQLITE)
+.elif ${PORT_OPTIONS:MSQLITE}
@${ECHO_MSG} ""
@${ECHO_MSG} "1. To initialise SQLite, run the following commands:"
@${ECHO_MSG} ""