diff options
author | jmmv <jmmv> | 2003-07-29 16:25:56 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2003-07-29 16:25:56 +0000 |
commit | e7bf057ec774d6edce00ca7fa875d1aaaf9759ae (patch) | |
tree | e0976968f35008b27109a2d5b94a5151965bf7cc /chat/i2cbd | |
parent | 22ce5a025a5f73d99b3b239645b78f15701e9e3b (diff) | |
download | pkgsrc-e7bf057ec774d6edce00ca7fa875d1aaaf9759ae.tar.gz |
Convert this package to the bsd.pkg.install.mk framework:
- Install configuration files under the examples hierarchy.
- Use CONF_FILES_PERMS to put the configuration files in place.
- Use SUPPORT_FILES_PERMS to put the empty log file in place.
- Use RCD_SCRIPTS to handle the rc.d script.
While here, add ICBD_OWNER to BUILD_DEFS and use ROOT_USER and ROOT_GROUP
where appropiate.
As a result, bump PKGREVISION to 1.
Diffstat (limited to 'chat/i2cbd')
-rw-r--r-- | chat/i2cbd/Makefile | 53 | ||||
-rw-r--r-- | chat/i2cbd/PLIST | 13 | ||||
-rw-r--r-- | chat/i2cbd/distinfo | 6 | ||||
-rw-r--r-- | chat/i2cbd/patches/patch-aa | 10 | ||||
-rw-r--r-- | chat/i2cbd/patches/patch-ab | 8 |
5 files changed, 53 insertions, 37 deletions
diff --git a/chat/i2cbd/Makefile b/chat/i2cbd/Makefile index 8d9649eaed0..7a16a315317 100644 --- a/chat/i2cbd/Makefile +++ b/chat/i2cbd/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.4 2003/07/29 15:55:14 jmmv Exp $ +# $NetBSD: Makefile,v 1.5 2003/07/29 16:25:56 jmmv Exp $ # DISTNAME= i2cbd-2.0_BETA0 +PKGREVISION= 1 CATEGORIES= chat MASTER_SITES= ${MASTER_SITE_LOCAL} @@ -9,29 +10,43 @@ MAINTAINER= hubertf@NetBSD.org HOMEPAGE= http://www.draga.com/~jwise/i2cb/ COMMENT= Next generation Internet Citizens Band chat server +USE_BUILDLINK2= YES +USE_PKGINSTALL= YES + .include "../../mk/bsd.prefs.mk" -ICBD_OWNER?= root -PLIST_SUBST+= ICBD_OWNER=${ICBD_OWNER} \ - CHOWN=${CHOWN} \ - TOUCH=${TOUCH} +BUILD_DEFS+= ICBD_OWNER +ICBD_OWNER?= ${ROOT_USER} +PLIST_SUBST+= ICBD_OWNER=${ICBD_OWNER} + +PKG_SYSCONFSUBDIR= icbd +EGDIR= ${PREFIX}/share/examples/i2cbd +EGFILES= motd icbd_help icbd.deny news.1 +CONF_FILES_PERMS= +.for f in ${EGFILES} +CONF_FILES_PERMS+= ${EGDIR}/$f ${PKG_SYSCONFDIR}/$f \ + ${ICBD_OWNER} ${ROOT_GROUP} 644 +.endfor +.undef f + +SUPPORT_FILES_PERMS= ${EGDIR}/empty.log /var/log/icbd.log \ + ${ICBD_OWNER} ${ROOT_GROUP} 644 post-extract: - -${RM} -f ${WRKSRC}/*/.depend + -${RM} -f ${WRKSRC}/*/.depend + +post-build: + ${TOUCH} ${WRKDIR}/empty.log + ${SED} -e 's,@PREFIX@,${PREFIX},' \ + < ${WRKSRC}/etc/icbd.sh > ${WRKDIR}/icbd.sh post-install: - ${INSTALL_DATA_DIR} ${PREFIX}/etc/icbd - ${CHOWN} ${ICBD_OWNER} ${PREFIX}/etc/icbd - ${CHMOD} 755 ${PREFIX}/etc/icbd - for f in motd icbd_help icbd.deny news.1 ; do \ - ${INSTALL_DATA} ${WRKSRC}/etc/$$f ${PREFIX}/etc/icbd ; \ - done - ${CHOWN} -R ${ICBD_OWNER} ${PREFIX}/etc/icbd - ${TOUCH} /var/log/icbd.log - ${CHOWN} ${ICBD_OWNER} /var/log/icbd.log - ${SED} \ - -e 's,@PREFIX@,${PREFIX},' \ - <${WRKSRC}/etc/icbd.sh >${WRKDIR}/icbd.sh - ${INSTALL_SCRIPT} ${WRKDIR}/icbd.sh ${PREFIX}/etc/rc.d/icbd + ${INSTALL_DATA_DIR} ${EGDIR} +.for f in ${EGFILES} + ${INSTALL_DATA} ${WRKSRC}/etc/$f ${EGDIR} +.endfor +.undef f + ${INSTALL_DATA} ${WRKDIR}/empty.log ${EGDIR} + ${INSTALL_SCRIPT} ${WRKDIR}/icbd.sh ${PREFIX}/etc/rc.d/icbd .include "../../mk/bsd.pkg.mk" diff --git a/chat/i2cbd/PLIST b/chat/i2cbd/PLIST index 7ae2825e226..4655c2a9b91 100644 --- a/chat/i2cbd/PLIST +++ b/chat/i2cbd/PLIST @@ -1,11 +1,12 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ -etc/icbd/icbd.deny -etc/icbd/icbd_help -etc/icbd/motd -etc/icbd/news.1 +@comment $NetBSD: PLIST,v 1.2 2003/07/29 16:25:56 jmmv Exp $ etc/rc.d/icbd man/man8/icbd.8 man/man8/icbdb.8 sbin/icbd sbin/icbdb -@dirrm etc/icbd +share/examples/i2cbd/empty.log +share/examples/i2cbd/icbd.deny +share/examples/i2cbd/icbd_help +share/examples/i2cbd/motd +share/examples/i2cbd/news.1 +@dirrm share/examples/i2cbd diff --git a/chat/i2cbd/distinfo b/chat/i2cbd/distinfo index 5c733c7c85b..bee70c8868e 100644 --- a/chat/i2cbd/distinfo +++ b/chat/i2cbd/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ +$NetBSD: distinfo,v 1.2 2003/07/29 16:25:56 jmmv Exp $ SHA1 (i2cbd-2.0_BETA0.tar.gz) = dd76db90442f3ccd8e3048cbdb313740ddcfb792 Size (i2cbd-2.0_BETA0.tar.gz) = 70622 bytes -SHA1 (patch-aa) = 943ce10c7ce2e070113b3d8a8621d3b1624f6a40 -SHA1 (patch-ab) = 25a4f46bf378163b19df8fb0c3c23679b2fa4b18 +SHA1 (patch-aa) = 0151f8e68be11e759425d2e9569df3d465c50931 +SHA1 (patch-ab) = 8bdf6b8f1b59f16a9e996fe51fd0ceb9a0b35115 SHA1 (patch-ac) = ca8e6b7324a22fb9ecabf2374e34febb55196e28 diff --git a/chat/i2cbd/patches/patch-aa b/chat/i2cbd/patches/patch-aa index c4f0dfabc2e..1e93c9d5bfc 100644 --- a/chat/i2cbd/patches/patch-aa +++ b/chat/i2cbd/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ +$NetBSD: patch-aa,v 1.2 2003/07/29 16:25:56 jmmv Exp $ --- config.h.orig Tue Oct 30 20:37:28 2001 +++ config.h @@ -10,10 +10,10 @@ $NetBSD: patch-aa,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ -#define ICBDMOTD "/usr/local/etc/icbd/motd" -#define ICBDHELP "/usr/local/etc/icbd/icbd_help" -#define ACCESS_FILE "/usr/local/etc/icbd/icbd.deny" -+#define USERDB PREFIX "/etc/icbd/userdb.db" -+#define ICBDMOTD PREFIX "/etc/icbd/motd" -+#define ICBDHELP PREFIX "/etc/icbd/icbd_help" -+#define ACCESS_FILE PREFIX "/etc/icbd/icbd.deny" ++#define USERDB PKG_SYSCONFDIR "/userdb.db" ++#define ICBDMOTD PKG_SYSCONFDIR "/motd" ++#define ICBDHELP PKG_SYSCONFDIR "/icbd_help" ++#define ACCESS_FILE PKG_SYSCONFDIR "/icbd.deny" #define ICBDLOG "/var/log/icbd.log" #define PID_FILE "/var/run/icbd.pid" #define INIT_BRICKS 5 /* initial number of bricks to be thrown */ diff --git a/chat/i2cbd/patches/patch-ab b/chat/i2cbd/patches/patch-ab index 88c0879c052..0db81752ab6 100644 --- a/chat/i2cbd/patches/patch-ab +++ b/chat/i2cbd/patches/patch-ab @@ -1,6 +1,6 @@ -$NetBSD: patch-ab,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ +$NetBSD: patch-ab,v 1.2 2003/07/29 16:25:56 jmmv Exp $ ---- config.mk.orig Tue Oct 30 20:50:40 2001 +--- config.mk.orig 2001-10-30 20:50:40.000000000 +0100 +++ config.mk @@ -3,7 +3,6 @@ # For copying and distribution information, see the file COPYING. @@ -10,12 +10,12 @@ $NetBSD: patch-ab,v 1.1.1.1 2002/11/14 00:59:31 hubertf Exp $ BINDIR = ${PREFIX}/sbin MANDIR = ${PREFIX}/man MAN8DIR = ${PREFIX}/man/man8 -@@ -19,7 +18,7 @@ +@@ -19,7 +18,7 @@ EXTRAWARNS = -Wshadow -Wpointer-arith -W # affect portability to some platforms. The others here are irrelevant. BADWARNS = -Wwrite-strings -Wconversion -Waggregate-return -Wredundant-decls DEBUG = -DDEBUG -DVERBOSE -g -CFLAGS = ${WARNS} ${EXTRAWARNS} ${DEBUG} -+CFLAGS = ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" ++CFLAGS = ${WARNS} ${EXTRAWARNS} ${DEBUG} -DPREFIX=\"${PREFIX}\" -DPKG_SYSCONFDIR=\"${PKG_SYSCONFDIR}\" LDFLAGS = LIBS = -lutil |