From d800775d995c143d3ae4a1ab79fb9ba9a65c3983 Mon Sep 17 00:00:00 2001 From: jmmv Date: Tue, 29 Jul 2003 19:42:53 +0000 Subject: Convert to the bsd.pkg.install.mk framework: - Use RCD_SCRIPTS for automatic generation and handling of the rc.d script. - Use OWN_DIR_PERMS instead of OWN_DIRS to handle permissions for the spool directory and avoid (un)exec commands in PLIST. As a result, bump PKGREVISION to 1. --- inputmethod/canna-server-bin/Makefile | 17 +++++++---------- inputmethod/canna-server-bin/PLIST | 6 +----- inputmethod/canna/files/canna | 25 ------------------------- inputmethod/canna/files/canna.sh | 25 +++++++++++++++++++++++++ 4 files changed, 33 insertions(+), 40 deletions(-) delete mode 100644 inputmethod/canna/files/canna create mode 100644 inputmethod/canna/files/canna.sh (limited to 'inputmethod') diff --git a/inputmethod/canna-server-bin/Makefile b/inputmethod/canna-server-bin/Makefile index 3aa07fb887a..33f2955e9f4 100644 --- a/inputmethod/canna-server-bin/Makefile +++ b/inputmethod/canna-server-bin/Makefile @@ -1,13 +1,18 @@ -# $NetBSD: Makefile,v 1.5 2003/05/31 08:28:35 uebayasi Exp $ +# $NetBSD: Makefile,v 1.6 2003/07/29 19:42:54 jmmv Exp $ # .include "../canna/Makefile.common" +PKGREVISION= 1 + CANNA_MODULE= server-bin USE_BUILDLINK2= # defined +USE_PKGINSTALL= YES INSTALL_TARGET= instserver -OWN_DIRS= ${CANNA_SPOOL} +OWN_DIRS_PERMS= ${CANNA_SPOOL} ${CANNA_OWNER} ${CANNA_GROUP} ${CANNA_MODE} + +RCD_SCRIPTS= canna post-patch: ${MV} ${WRKSRC}/Imakefile ${WRKSRC}/Imakefile.orig @@ -21,19 +26,11 @@ post-patch: do-configure: @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${XMKMF} -post-build: - @${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/canna \ - > ${WRKDIR}/canna - post-install: @${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL @${INSTALL_SCRIPT} ${WRKDIR}/canna ${PREFIX}/etc/rc.d/canna - @${INSTALL_DATA_DIR} ${CANNA_SPOOL} - @${CHMOD} ${CANNA_MODE} ${CANNA_SPOOL} - @${CHOWN} ${CANNA_OWNER}:${CANNA_GROUP} ${CANNA_SPOOL} .include "../../devel/nbitools/buildlink2.mk" .include "../../inputmethod/canna-lib/buildlink2.mk" -.include "../../mk/bsd.pkg.install.mk" .include "../canna/Makefile.include" diff --git a/inputmethod/canna-server-bin/PLIST b/inputmethod/canna-server-bin/PLIST index 3306a5b2e27..a09511937a5 100644 --- a/inputmethod/canna-server-bin/PLIST +++ b/inputmethod/canna-server-bin/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.4 2003/05/31 08:28:35 uebayasi Exp $ +@comment $NetBSD: PLIST,v 1.5 2003/07/29 19:42:54 jmmv Exp $ bin/addwords bin/canlisp bin/cannacheck @@ -74,7 +74,3 @@ man/man1/splitword.1 man/man1/wtoc.1 sbin/cannakill sbin/cannaserver -@exec ${MKDIR} ${CANNA_SPOOL} -@exec ${CHOWN} ${CANNA_OWNER}:${CANNA_GROUP} ${CANNA_SPOOL} -@exec ${CHMOD} ${CANNA_MODE} ${CANNA_SPOOL} -@unexec ${RMDIR} ${CANNA_SPOOL} diff --git a/inputmethod/canna/files/canna b/inputmethod/canna/files/canna deleted file mode 100644 index f44c2a385e7..00000000000 --- a/inputmethod/canna/files/canna +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/sh -# -# $NetBSD: canna,v 1.1 2003/05/31 07:24:40 uebayasi Exp $ -# -# PROVIDE: canna -# REQUIRE: DAEMON - -if [ -f /etc/rc.subr ] -then - . /etc/rc.subr -fi - -name="canna" -rcvar=$name -command="@PREFIX@/sbin/cannaserver" -stop_cmd="@PREFIX@/sbin/cannakill" - -if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] -then - load_rc_config $name - run_rc_command "$1" -else - @ECHO@ -n ' ${name}' - ${command} ${canna_flags} ${command_args} -fi diff --git a/inputmethod/canna/files/canna.sh b/inputmethod/canna/files/canna.sh new file mode 100644 index 00000000000..72d19e74a7f --- /dev/null +++ b/inputmethod/canna/files/canna.sh @@ -0,0 +1,25 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: canna.sh,v 1.1 2003/07/29 19:42:53 jmmv Exp $ +# +# PROVIDE: canna +# REQUIRE: DAEMON + +if [ -f /etc/rc.subr ] +then + . /etc/rc.subr +fi + +name="canna" +rcvar=$name +command="@PREFIX@/sbin/cannaserver" +stop_cmd="@PREFIX@/sbin/cannakill" + +if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ] +then + load_rc_config $name + run_rc_command "$1" +else + @ECHO@ -n ' ${name}' + ${command} ${canna_flags} ${command_args} +fi -- cgit v1.2.3