summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-12-18 04:05:28 +0000
committergrant <grant@pkgsrc.org>2003-12-18 04:05:28 +0000
commit1f9b1458ecc5180af1cd5ed476ccdf0f228a1798 (patch)
treeb839db9ec8fdf03b0149d5b66951be7846184b44
parenteaf21c2b7f339be2301f48a926c34c8b7ab70b14 (diff)
downloadpkgsrc-1f9b1458ecc5180af1cd5ed476ccdf0f228a1798.tar.gz
eliminate some manual work in post-install and PLIST, and general
tidyup: - buildlink2 for db2 libs/includes. - USE_PKGINSTALL for CONF_FILES and OWN_DIRS. - PKG_SYSCONFSUBDIR for configuration file.
-rw-r--r--www/htdig/DEINSTALL8
-rw-r--r--www/htdig/INSTALL10
-rw-r--r--www/htdig/MESSAGE10
-rw-r--r--www/htdig/Makefile34
-rw-r--r--www/htdig/PLIST7
5 files changed, 33 insertions, 36 deletions
diff --git a/www/htdig/DEINSTALL b/www/htdig/DEINSTALL
deleted file mode 100644
index 347721ce177..00000000000
--- a/www/htdig/DEINSTALL
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-if [ "$2" = "POST-DEINSTALL" ]; then
-echo Please note:
-echo
-echo If you do not intend to reinstall the htdig package, you may wish to
-echo remove the config directory, ${PKG_PREFIX}/etc/htdig, as well as any
-echo database directories you created.
-fi
diff --git a/www/htdig/INSTALL b/www/htdig/INSTALL
new file mode 100644
index 00000000000..13332b528bc
--- /dev/null
+++ b/www/htdig/INSTALL
@@ -0,0 +1,10 @@
+#!@SH@
+#
+# $NetBSD: INSTALL,v 1.1 2003/12/18 04:05:28 grant Exp $
+
+case "${STAGE}" in
+POST-INSTALL)
+ ${PREFIX}/bin/htfuzzy -v synonyms
+ ${PREFIX}/bin/htfuzzy -v endings
+ ;;
+esac
diff --git a/www/htdig/MESSAGE b/www/htdig/MESSAGE
index 699772a8a81..67d41825feb 100644
--- a/www/htdig/MESSAGE
+++ b/www/htdig/MESSAGE
@@ -1,15 +1,13 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.3 2003/05/06 17:43:00 jmmv Exp $
+$NetBSD: MESSAGE,v 1.4 2003/12/18 04:05:28 grant Exp $
-A sample ht://Dig config file has been installed to
-${PREFIX}/etc/htdig/htdig.conf, unless that file existed already.
The sample ${PREFIX}/bin/rundig script may be run to create a database
-in the newly created empty directory, /var/db/htdig. A sample search
+in the newly created empty directory, ${DBDIR}. A sample search
form, which may be used to search that database, has been installed to
${PREFIX}/share/examples/htdig/search.html.
-For an example of how to set up ht://Dig and integrate it with your web site,
-you may wish to examine the scripts installed into
+For an example of how to set up ht://Dig and integrate it with your web
+site, you may wish to examine the scripts installed into
/var/wwwoffle/html/htdig/scripts by the www/wwwoffle package.
===========================================================================
diff --git a/www/htdig/Makefile b/www/htdig/Makefile
index eb71ddf5f02..ccb7dbc6f8e 100644
--- a/www/htdig/Makefile
+++ b/www/htdig/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2003/12/04 00:16:55 fredb Exp $
+# $NetBSD: Makefile,v 1.17 2003/12/18 04:05:28 grant Exp $
DISTNAME= htdig-3.1.6
CATEGORIES= www databases
@@ -15,32 +15,33 @@ MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://htdig.sourceforge.net/
COMMENT= WWW indexing and searching system
-DEPENDS+= db>=2.7.7:../../databases/db
+USE_BUILDLINK2= YES
+USE_PKGINSTALL= YES
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-cgi-bin-dir=${PREFIX}/libexec/cgi-bin \
--with-common-dir=${PREFIX}/share/htdig/common \
- --with-config-dir=${PKG_SYSCONFDIR}/htdig/ \
- --with-database-dir=/var/db/htdig \
+ --with-config-dir=${PKG_SYSCONFDIR} \
+ --with-database-dir=${DBDIR} \
--with-image-dir=${PREFIX}/share/examples/htdig \
--with-search-dir=${PREFIX}/share/examples/htdig
CXXFLAGS+= -Wno-deprecated
-CPPFLAGS+= -I${PREFIX}/include/db2 ${CXXFLAGS}
-PLIST_SUBST= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+CPPFLAGS+= ${BUILDLINK_CPPFLAGS.db} ${CXXFLAGS}
+LDFLAGS+= ${BUILDLINK_LDFLAGS.db}
+
+INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL
+PKG_SYSCONFSUBDIR= htdig
+
+DBDIR?= /var/db/htdig
+MESSAGE_SUBST+= DBDIR=${DBDIR}
+OWN_DIRS+= ${DBDIR}
+
+CONF_FILES+= ${PREFIX}/share/examples/htdig/htdig.conf \
+ ${PKG_SYSCONFDIR}/htdig.conf
post-patch:
${TOUCH} ${WRKSRC}/configure
-post-install:
- ${INSTALL_DATA_DIR} ${PKG_SYSCONFDIR}/htdig
- if [ ! -f ${PKG_SYSCONFDIR}/htdig/htdig.conf ]; then \
- ${CP} ${PREFIX}/share/examples/htdig/htdig.conf \
- ${PKG_SYSCONFDIR}/htdig/; \
- fi
- ${PREFIX}/bin/htfuzzy -v synonyms
- ${PREFIX}/bin/htfuzzy -v endings
- ${INSTALL_DATA_DIR} /var/db/htdig
-
.include "../../mk/bsd.prefs.mk"
.if defined(EXTRACT_USING_PAX)
EXTRACT_ELEMENTS= -c ${DISTNAME}/db*
@@ -48,4 +49,5 @@ EXTRACT_ELEMENTS= -c ${DISTNAME}/db*
EXTRACT_ELEMENTS= --exclude ${DISTNAME}/db*
.endif
+.include "../../databases/db/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/www/htdig/PLIST b/www/htdig/PLIST
index 99605217348..fd1d9d5ff1e 100644
--- a/www/htdig/PLIST
+++ b/www/htdig/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2002/12/09 16:01:49 tron Exp $
+@comment $NetBSD: PLIST,v 1.5 2003/12/18 04:05:28 grant Exp $
bin/htfuzzy
bin/htdig
bin/htdump
@@ -53,11 +53,6 @@ share/htdig/common/synonyms
share/htdig/common/synonyms.db
share/htdig/common/root2word.db
share/htdig/common/word2root.db
-@exec ${MKDIR} ${PKG_SYSCONFDIR}/htdig
-@exec if [ ! -f ${PKG_SYSCONFDIR}/htdig/htdig.conf ]; then cp %D/share/examples/htdig/htdig.conf ${PKG_SYSCONFDIR}/htdig/htdig.conf; fi
-@exec ${MKDIR} /var/db/htdig
-@unexec rmdir ${PKG_SYSCONFDIR}/htdig 2>/dev/null || ${TRUE}
-@unexec rmdir /var/db/htdig 2>/dev/null || ${TRUE}
@dirrm share/htdig/common
@dirrm share/htdig
@dirrm share/examples/htdig