pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/htdig eliminate some manual work in post-install a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/157ccc9bc9b1
branches: trunk
changeset: 464935:157ccc9bc9b1
user: grant <grant%pkgsrc.org@localhost>
date: Thu Dec 18 04:05:28 2003 +0000
description:
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.
diffstat:
www/htdig/DEINSTALL | 8 --------
www/htdig/INSTALL | 10 ++++++++++
www/htdig/MESSAGE | 10 ++++------
www/htdig/Makefile | 34 ++++++++++++++++++----------------
www/htdig/PLIST | 7 +------
5 files changed, 33 insertions(+), 36 deletions(-)
diffs (134 lines):
diff -r 6c7cbeda464f -r 157ccc9bc9b1 www/htdig/DEINSTALL
--- a/www/htdig/DEINSTALL Thu Dec 18 03:45:20 2003 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -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 -r 6c7cbeda464f -r 157ccc9bc9b1 www/htdig/INSTALL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/htdig/INSTALL Thu Dec 18 04:05:28 2003 +0000
@@ -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 -r 6c7cbeda464f -r 157ccc9bc9b1 www/htdig/MESSAGE
--- a/www/htdig/MESSAGE Thu Dec 18 03:45:20 2003 +0000
+++ b/www/htdig/MESSAGE Thu Dec 18 04:05:28 2003 +0000
@@ -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 -r 6c7cbeda464f -r 157ccc9bc9b1 www/htdig/Makefile
--- a/www/htdig/Makefile Thu Dec 18 03:45:20 2003 +0000
+++ b/www/htdig/Makefile Thu Dec 18 04:05:28 2003 +0000
@@ -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 @@
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= --exclude ${DISTNAME}/db*
.endif
+.include "../../databases/db/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 6c7cbeda464f -r 157ccc9bc9b1 www/htdig/PLIST
--- a/www/htdig/PLIST Thu Dec 18 03:45:20 2003 +0000
+++ b/www/htdig/PLIST Thu Dec 18 04:05:28 2003 +0000
@@ -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.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
Home |
Main Index |
Thread Index |
Old Index