Subject: rc.d scripts using RCD_SCRIPTS are automatically installed
To: maintainer for skkserv <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 04/23/2004 14:16:34
This message is emailed to maintainers of packages that use RCD_SCRIPTS
but also manually install the rc.d scripts. When using RCD_SCRIPTS, the
scripts are already installed automatically as originally generated from
${FILESDIR}/<script>.sh (the default).

The new generated script becomes ${WRKDIR}/${_script_} and it is
automatically installed to ${RCD_SCRIPTS_EXAMPLEDIR}.

The following packages should have the lines for manually installing the
rc.d script(s) removed:

 chat/ircd-hybrid/Makefile

 comms/fidogate/Makefile (I am not sure, because this file comes from
 ${WRKSRC}/scripts/maintenance/rc.fidogate and I don't know if it is even
 a normal NetBSD-style rc.d script. Anyways, it should install to
 ${RCD_SCRIPTS_EXAMPLEDIR} instead.)

 inputmethod/canna-server/Makefile

 inputmethod/ja-freewnn-lib/Makefile.common

 inputmethod/skkserv/Makefile

 net/delegate/Makefile

 net/netatalk-asun/Makefile (I am not sure, probably the MAKE_ENV for
 RCDIR should be set to ${RCD_SCRIPTS_EXAMPLEDIR} instead.)

 sysutils/apcupsd/Makefile (I am not sure, because this file comes with
 ${WRKSRC}/distributions/netbsd/apcupsd. This fix should probably just
 install it to ${RCD_SCRIPTS_EXAMPLEDIR} instead.)

 sysutils/bkpupsd/Makefile (This is probably okay. I think it just needs
 to have the unused line defining PKGRCDIR removed.)

Below are some patches, but untested.

It is important to get this fixed, because I am soon to commit a fix to
make sure that all packages using RCD_SCRIPTS automatically register in
PLIST. (I have been doing this for over a year.)

Any comments?

May I commit the inputmethod/skkserv/Makefile fix? Or any others?

Index: chat/ircd-hybrid/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/chat/ircd-hybrid/Makefile,v
retrieving revision 1.11
diff -b -u -r1.11 Makefile
--- chat/ircd-hybrid/Makefile	11 Apr 2004 16:08:55 -0000	1.11
+++ chat/ircd-hybrid/Makefile	23 Apr 2004 21:04:56 -0000
@@ -139,7 +139,6 @@
 		> ${WRKDIR}/pkg-setup.txt

 post-install:
-	${INSTALL_SCRIPT} ${WRKDIR}/ircd-hybrid ${PREFIX}/etc/rc.d/ircd-hybrid
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/ircd-hybrid
 	${INSTALL_DATA} ${WRKDIR}/pkg-setup.txt ${PREFIX}/share/doc/ircd-hybrid/pkg-setup.txt
 	for f in operguide.txt opermyth.txt; do \
Index: comms/fidogate/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/comms/fidogate/Makefile,v
retrieving revision 1.31
diff -b -u -r1.31 Makefile
--- comms/fidogate/Makefile	11 Apr 2004 06:19:05 -0000	1.31
+++ comms/fidogate/Makefile	23 Apr 2004 21:04:56 -0000
@@ -61,7 +61,7 @@
 	cd ${WRKSRC}/sendmail/mailer && ${INSTALL_DATA} ffx.m4 ftn.m4 \
 		${PREFIX}/share/fidogate/sendmail/mailer
 	${INSTALL_SCRIPT} ${WRKSRC}/scripts/maintenance/rc.fidogate \
-		${PREFIX}/etc/rc.d/fidogate
+		${RCD_SCRIPTS_EXAMPLEDIR}/fidogate
 	${INSTALL_DATA} ${WRKSRC}/doc/fidogate.txt ${PREFIX}/share/doc/fidogate
 	${INSTALL_DATA} ${WRKSRC}/fidogate.conf ${EGDIR}

Index: inputmethod/canna-server/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/inputmethod/canna-server/Makefile,v
retrieving revision 1.8
diff -b -u -r1.8 Makefile
--- inputmethod/canna-server/Makefile	23 Mar 2004 04:41:01 -0000	1.8
+++ inputmethod/canna-server/Makefile	23 Apr 2004 21:04:56 -0000
@@ -35,9 +35,6 @@
 do-configure:
 	@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF}

-post-install:
-	@${INSTALL_SCRIPT} ${WRKDIR}/canna ${PREFIX}/etc/rc.d/canna
-
 .include "../../devel/nbitools/buildlink3.mk"
 .include "../../inputmethod/canna-lib/buildlink3.mk"

Index: inputmethod/ja-freewnn-lib/Makefile.common
===================================================================
RCS file: /cvsroot/pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common,v
retrieving revision 1.7
diff -b -u -r1.7 Makefile.common
--- inputmethod/ja-freewnn-lib/Makefile.common	27 Jan 2004 00:53:10 -0000	1.7
+++ inputmethod/ja-freewnn-lib/Makefile.common	23 Apr 2004 21:04:56 -0000
@@ -74,9 +74,6 @@
 	@${MV} ${WRKSRC}/Wnn/jd/jserverrc ${WRKSRC}/Wnn/jd/jserverrc.orig
 	@${SED} -e 's|^\(jserver_dir\).*|\1 ${IMDICTDIR}/wnn/${WNN_LANG}|' \
 		${WRKSRC}/Wnn/jd/jserverrc.orig > ${WRKSRC}/Wnn/jd/jserverrc
-
-post-install:
-	@${INSTALL_SCRIPT} ${WRKDIR}/ja_freewnn ${PREFIX}/etc/rc.d/ja_freewnn
 .endif

 .if defined(WNN_TARGET) && (${WNN_TARGET} == "DICT")
Index: inputmethod/skkserv/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/inputmethod/skkserv/Makefile,v
retrieving revision 1.8
diff -b -u -r1.8 Makefile
--- inputmethod/skkserv/Makefile	19 Apr 2004 00:01:35 -0000	1.8
+++ inputmethod/skkserv/Makefile	23 Apr 2004 21:04:56 -0000
@@ -54,7 +54,6 @@
 	    ${WRKSRC}/jisyo-tools/skkdic-sort >${WRKDIR}/SKK-JISYO.L

 post-install:
-	${INSTALL_SCRIPT} ${WRKDIR}/skkserv ${PREFIX}/etc/rc.d/skkserv
 	${INSTALL_DATA_DIR} ${PREFIX}/share/skk
 	${INSTALL_DATA} ${WRKDIR}/SKK-JISYO.L ${PREFIX}/share/skk/SKK-JISYO.L
 	${INSTALL_DATA} ${WRKSRC}/skkserv/README ${PREFIX}/share/skk/README.skkserv
Index: net/delegate/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/delegate/Makefile,v
retrieving revision 1.26
diff -b -u -r1.26 Makefile
--- net/delegate/Makefile	30 Jul 2003 11:37:02 -0000	1.26
+++ net/delegate/Makefile	23 Apr 2004 21:04:56 -0000
@@ -41,7 +41,6 @@

 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/src/delegated ${PREFIX}/sbin
-	${INSTALL_SCRIPT} ${WRKDIR}/delegated ${PREFIX}/etc/rc.d
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/delegate
 	${INSTALL_DATA} ${WRKSRC}/doc/Manual.htm \
 	   ${PREFIX}/share/doc/delegate/manual.html
Index: net/netatalk-asun/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/netatalk-asun/Makefile,v
retrieving revision 1.15
diff -b -u -r1.15 Makefile
--- net/netatalk-asun/Makefile	30 Jul 2003 16:32:09 -0000	1.15
+++ net/netatalk-asun/Makefile	23 Apr 2004 21:04:57 -0000
@@ -20,7 +20,7 @@
 USE_PKGINSTALL=		YES

 MAKE_ENV+=		ETCDIR="${PKG_SYSCONFDIR}"
-MAKE_ENV+=		RCDIR="${PREFIX}/etc/rc.d"
+MAKE_ENV+=		RCDIR="${RCD_SCRIPTS_EXAMPLEDIR}"

 PKG_SYSCONFSUBDIR=	netatalk

Index: sysutils/apcupsd/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/apcupsd/Makefile,v
retrieving revision 1.26
diff -b -u -r1.26 Makefile
--- sysutils/apcupsd/Makefile	24 Jan 2004 15:06:57 -0000	1.26
+++ sysutils/apcupsd/Makefile	23 Apr 2004 21:04:57 -0000
@@ -96,7 +96,7 @@
 	${INSTALL_DATA} ${WRKDIR}/apcupsd.slave.conf \
 		${PREFIX}/share/examples/apcupsd
 	${INSTALL_SCRIPT} ${WRKSRC}/distributions/netbsd/apcupsd \
-		${PREFIX}/etc/rc.d
+		${RCD_SCRIPTS_EXAMPLEDIR}
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/apcupsd
 .for file in ${DOCS}
 	${INSTALL_DATA} ${WRKSRC}/doc/${file} ${PREFIX}/share/doc/apcupsd
Index: sysutils/bkpupsd/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/bkpupsd/Makefile,v
retrieving revision 1.9
diff -b -u -r1.9 Makefile
--- sysutils/bkpupsd/Makefile	31 Jul 2003 11:07:30 -0000	1.9
+++ sysutils/bkpupsd/Makefile	23 Apr 2004 21:04:57 -0000
@@ -18,7 +18,6 @@
 .include "../../mk/bsd.prefs.mk"

 DOCDIR=		${PREFIX}/share/doc/bkpupsd
-PKGRCDIR=	${PREFIX}/etc/rc.d
 MAKE_ENV+=	DEFAULT_DEVICE=${DEFAULT_SERIAL_DEVICE} DOCDIR=${DOCDIR}

 MESSAGE_SUBST+=	DOCDIR=${DOCDIR}

   Jeremy C. Reed
   http://bsd.reedmedia.net/