pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/hiawatha Convert to the bsd.pkg.install.mk framework:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/56436ec3fb33
branches:  trunk
changeset: 459649:56436ec3fb33
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Mon Aug 04 11:00:31 2003 +0000

description:
Convert to the bsd.pkg.install.mk framework:
- Honour PKG_SYSCONFDIR.
- Use CONF_FILES to install the default configuration file.
- Use RCD_SCRIPTS to handle the startup script.
Bump PKGREVISION to 1.

diffstat:

 www/hiawatha/MESSAGE           |  17 +++-----------
 www/hiawatha/Makefile          |  49 ++++++++++++++++++++++-------------------
 www/hiawatha/files/hiawatha.sh |   7 +++--
 3 files changed, 34 insertions(+), 39 deletions(-)

diffs (135 lines):

diff -r edc10ff3f671 -r 56436ec3fb33 www/hiawatha/MESSAGE
--- a/www/hiawatha/MESSAGE      Mon Aug 04 09:46:41 2003 +0000
+++ b/www/hiawatha/MESSAGE      Mon Aug 04 11:00:31 2003 +0000
@@ -1,23 +1,14 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.3 2002/09/24 12:30:47 wiz Exp $
+$NetBSD: MESSAGE,v 1.4 2003/08/04 11:00:31 jmmv Exp $
 
-  Hiawatha has now been successfully installed.
-
-  In order to use Hiawatha, you will need to create spool
-  directories, named
+In order to use Hiawatha, you will need to create spool directories, named
 
        /var/spool/hiawatha/SPOOL${PORT}
 
-  for each TCP port on which hiawatha will be listening --
-  for example
+for each TCP port on which hiawatha will be listening -- for example
 
        /var/spool/hiawatha/SPOOL8080
 
-  for the example hiawatha.cfg distributed with this
-  package.
-
-  You can start hiawatha by running
-
-       ${PREFIX}/etc/rc.d/hiawatha start
+for the example hiawatha.cfg distributed with this package.
 
 ===========================================================================
diff -r edc10ff3f671 -r 56436ec3fb33 www/hiawatha/Makefile
--- a/www/hiawatha/Makefile     Mon Aug 04 09:46:41 2003 +0000
+++ b/www/hiawatha/Makefile     Mon Aug 04 11:00:31 2003 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2003/07/17 22:55:35 grant Exp $
+# $NetBSD: Makefile,v 1.12 2003/08/04 11:00:31 jmmv Exp $
 #
 
 DISTNAME=      hiawatha
 PKGNAME=       hiawatha-0.1
+PKGREVISION=   1
 WRKSRC=                ${WRKDIR}
 CATEGORIES=    textproc www
 MASTER_SITES=  ${HOMEPAGE} ${MASTER_SITE_BACKUP}
@@ -19,38 +20,40 @@
 NO_CONFIGURE=
 NO_BUILD=
 
+USE_BUILDLINK2=        yes
 USE_JAVA=      run
-DIST_SUBDIR=   ${PKGNAME}
+USE_PKGINSTALL=        yes
+
+DIST_SUBDIR=   ${PKGNAME_NOREV}
 EXTRACT_ONLY=  ${DISTNAME}${EXTRACT_SUFX}
 EXTRACT_CMD=   unzip -aq ${DOWNLOADED_DISTFILE}
 
+RCD_SCRIPTS=   hiawatha
+
+EGDIR=         ${PREFIX}/share/examples/hiawatha
+CONF_FILES=    ${EGDIR}/hiawatha.cfg ${PKG_SYSCONFDIR}/hiawatha.cfg
+
+OWN_DIRS=      /var/spool/hiawatha
+
 post-extract:
-       ${SED} -e "s,@PREFIX@,${PREFIX},g" ${FILESDIR}/hiawatha.sh \
-               > ${WRKDIR}/hiawatha.sh
-       ${SED} -e "s,@PREFIX@,${PREFIX},g" ${FILESDIR}/hiawatha.cfg \
-               > ${WRKDIR}/hiawatha.cfg
+       ${SED}  -e "s,@PREFIX@,${PREFIX},g" \
+               -e "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g" \
+               < ${FILESDIR}/hiawatha.cfg > ${WRKDIR}/hiawatha.cfg
 
 do-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/lib/java/hiawatha
        ${INSTALL_DATA} ${WRKSRC}/hiawatha.jar ${PREFIX}/lib/java/hiawatha
        ${INSTALL_DATA} ${WRKSRC}/xsls.jar ${PREFIX}/lib/java/hiawatha
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/hiawatha
-       ${INSTALL_DATA} ${WRKSRC}/simple.cfg \
-               ${PREFIX}/share/examples/hiawatha
-       ${INSTALL_DATA} ${WRKSRC}/SeeAlso/pault_com.cfg \
-               ${PREFIX}/share/examples/hiawatha
-       if [ ! -f ${PREFIX}/etc/hiawatha.cfg ]; \
-       then \
-               ${INSTALL_DATA} ${WRKDIR}/hiawatha.cfg ${PREFIX}/etc \
-       ; fi
-       ${INSTALL_DATA} ${WRKDIR}/hiawatha.cfg ${PREFIX}/share/examples/hiawatha
-       cd ${WRKSRC} && ${PAX} -s '/^WEBROOT/pault.com/' -rw WEBROOT ${PREFIX}/share/examples/hiawatha
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/hiawatha/WEBROOT
-       ${INSTALL_DATA} ${FILESDIR}/index.xml ${PREFIX}/share/examples/hiawatha/WEBROOT
-       ${INSTALL_DATA} ${FILESDIR}/index.xsl ${PREFIX}/share/examples/hiawatha/WEBROOT
-       ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/hiawatha/WEBROOT/images
-       ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${PREFIX}/share/examples/hiawatha/WEBROOT/images
-       ${INSTALL_SCRIPT} ${WRKDIR}/hiawatha.sh ${PREFIX}/etc/rc.d/hiawatha
+       ${INSTALL_DATA_DIR} ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/simple.cfg ${EGDIR}
+       ${INSTALL_DATA} ${WRKSRC}/SeeAlso/pault_com.cfg ${EGDIR}
+       ${INSTALL_DATA} ${WRKDIR}/hiawatha.cfg ${EGDIR}
+       cd ${WRKSRC} && ${PAX} -s '/^WEBROOT/pault.com/' -rw WEBROOT ${EGDIR}
+       ${INSTALL_DATA_DIR} ${EGDIR}/WEBROOT
+       ${INSTALL_DATA} ${FILESDIR}/index.xml ${EGDIR}/WEBROOT
+       ${INSTALL_DATA} ${FILESDIR}/index.xsl ${EGDIR}/WEBROOT
+       ${INSTALL_DATA_DIR} ${EGDIR}/WEBROOT/images
+       ${INSTALL_DATA} ${DISTDIR}/sitedrivenby.gif ${EGDIR}/WEBROOT/images
 
 .include "../../mk/java-vm.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r edc10ff3f671 -r 56436ec3fb33 www/hiawatha/files/hiawatha.sh
--- a/www/hiawatha/files/hiawatha.sh    Mon Aug 04 09:46:41 2003 +0000
+++ b/www/hiawatha/files/hiawatha.sh    Mon Aug 04 11:00:31 2003 +0000
@@ -1,11 +1,12 @@
-#! /bin/sh
+#!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: hiawatha.sh,v 1.1.1.1 2001/04/15 02:56:40 jwise Exp $
+# $NetBSD: hiawatha.sh,v 1.2 2003/08/04 11:00:32 jmmv Exp $
 #
 # PROVIDE: hiawatha
 # REQUIRE: DAEMON
 
 PREFIX=@PREFIX@
+PKG_SYSCONFDIR=@PKG_SYSCONFDIR@
 
 pidfile=/var/run/hiawatha.pid
 
@@ -19,7 +20,7 @@
 export CLASSPATH
 
 name="hiawatha"
-command="${JAVA_HOME}/bin/java com.pault.hiawatha.Server ${PREFIX}/etc/hiawatha.cfg"
+command="${JAVA_HOME}/bin/java com.pault.hiawatha.Server ${PKG_SYSCONFDIR}/hiawatha.cfg"
 
 if [ ! -d /var/spool/hiawatha ]
 then



Home | Main Index | Thread Index | Old Index