diff options
author | jlam <jlam@pkgsrc.org> | 2006-07-05 04:48:28 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-07-05 04:48:28 +0000 |
commit | 366f3b7f81ee1faebd5affba8e805bbcde568651 (patch) | |
tree | e586b33fcc2b9c10ff7c8eb3ce08e6464ee33b4a /inputmethod/canna | |
parent | 3a30118c2f714ba80092d9d9bcbc15eb5272404f (diff) | |
download | pkgsrc-366f3b7f81ee1faebd5affba8e805bbcde568651.tar.gz |
* Convert to USE_TOOLS+=itools instead of including nbitools/buildlink3.mk.
* Fully convert to the pkginstall framework by using it to manage
directories required at install time.
* Rewrite the canna rc.d script to ensure that all needed directories
are present before the daemon is started.
* Miscellaneous touch ups to the DESCR and MESSAGE files.
* Remove the need to explicitly set PREFIX. These packages now install
into ${LOCALBASE} and use symlinks and file copies to put the files
into the ${IMDICTDIR}.
Bump the PKGREVISIONs for the canna* packages.
Diffstat (limited to 'inputmethod/canna')
-rw-r--r-- | inputmethod/canna/DESCR | 2 | ||||
-rw-r--r-- | inputmethod/canna/Makefile | 9 | ||||
-rw-r--r-- | inputmethod/canna/Makefile.common | 27 | ||||
-rw-r--r-- | inputmethod/canna/Makefile.include | 5 | ||||
-rw-r--r-- | inputmethod/canna/Makefile.version | 13 | ||||
-rw-r--r-- | inputmethod/canna/files/canna.sh | 43 |
6 files changed, 55 insertions, 44 deletions
diff --git a/inputmethod/canna/DESCR b/inputmethod/canna/DESCR index 1696ceaa8de..69ed535d0b8 100644 --- a/inputmethod/canna/DESCR +++ b/inputmethod/canna/DESCR @@ -1,3 +1,3 @@ -Canna is a Japanese input method server / client. Canna supports +Canna is a Japanese input method server/client. Canna supports Emacs/Mule (Multi-lingual extension Emacs), kinput2 X11 input methods, cannum front end, and some others. diff --git a/inputmethod/canna/Makefile b/inputmethod/canna/Makefile index f809d8949a5..2a0824acb85 100644 --- a/inputmethod/canna/Makefile +++ b/inputmethod/canna/Makefile @@ -1,11 +1,12 @@ -# $NetBSD: Makefile,v 1.5 2005/07/19 10:17:17 grant Exp $ -# +# $NetBSD: Makefile,v 1.6 2006/07/05 04:48:28 jlam Exp $ + .include "Makefile.common" PKGNAME:= Canna-${CANNA_VERSION} +PKGREVISION= 1 -DEPENDS+= Canna-server>=${CANNA_VERSION}:../../inputmethod/canna-server -DEPENDS+= Canna-dict>=${CANNA_VERSION}:../../inputmethod/canna-dict +DEPENDS+= Canna-server>=${CANNA_VERSION}nb2:../../inputmethod/canna-server +DEPENDS+= Canna-dict>=${CANNA_VERSION}nb1:../../inputmethod/canna-dict EXTRACT_ONLY= # empty NO_CHECKSUM= YES diff --git a/inputmethod/canna/Makefile.common b/inputmethod/canna/Makefile.common index 2fb65782378..562d0f2a8d7 100644 --- a/inputmethod/canna/Makefile.common +++ b/inputmethod/canna/Makefile.common @@ -1,8 +1,11 @@ -# $NetBSD: Makefile.common,v 1.15 2006/01/21 12:01:49 rxg Exp $ +# $NetBSD: Makefile.common,v 1.16 2006/07/05 04:48:28 jlam Exp $ # # Canna common makefile. # +# "Pkgsrc" version. +CANNA_VERSION= 3.6pl4 + DISTNAME= Canna${CANNA_VERSION:S|.||:S|pl|p|} PKGNAME= Canna-${CANNA_MODULE}-${CANNA_VERSION} CATEGORIES= japanese inputmethod @@ -12,14 +15,13 @@ MAINTAINER= tech-pkg-ja@jp.NetBSD.org HOMEPAGE= http://canna.sourceforge.jp/ COMMENT= Kana-Kanji conversion system (${CANNA_MODULE}) -FILESDIR= ${.CURDIR}/../canna/files -DISTINFO_FILE= ${.CURDIR}/../canna/distinfo -PATCHDIR= ${.CURDIR}/../canna/patches - -.include "../../inputmethod/canna/Makefile.version" +FILESDIR= ${.CURDIR}/../../inputmethod/canna/files +DISTINFO_FILE= ${.CURDIR}/../../inputmethod/canna/distinfo +PATCHDIR= ${.CURDIR}/../../inputmethod/canna/patches -USE_TOOLS+= imake -CANNA_SPOOL= ${DESTDIR}/var/spool/canna +USE_TOOLS+= itools +USE_IMAKE= yes +CANNA_SPOOL= ${VARBASE}/spool/canna CANNA_MODE= 0755 # XXX IPv6 support. To be done. @@ -31,3 +33,12 @@ CANNA_MODE= 0755 #INET6= # empty #.endif #MAKE_ENV+= INET6=${INET6} + +CANNA_ENV= CANNA_USER=${CANNA_USER} \ + CANNA_GROUP=${CANNA_GROUP} \ + CANNA_SPOOL=${CANNA_SPOOL} \ + CANNA_MODE=${CANNA_MODE} \ + IMDICTDIR=${IMDICTDIR} +MAKE_ENV+= ${CANNA_ENV} +PLIST_SUBST+= ${CANNA_ENV} +FILES_SUBST+= ${CANNA_ENV} diff --git a/inputmethod/canna/Makefile.include b/inputmethod/canna/Makefile.include deleted file mode 100644 index c039eccab9f..00000000000 --- a/inputmethod/canna/Makefile.include +++ /dev/null @@ -1,5 +0,0 @@ -# $NetBSD: Makefile.include,v 1.2 2004/03/05 19:09:22 minskim Exp $ -# - -.include "../../devel/nbitools/buildlink3.mk" -.include "../../mk/bsd.pkg.mk" diff --git a/inputmethod/canna/Makefile.version b/inputmethod/canna/Makefile.version deleted file mode 100644 index b6fda755379..00000000000 --- a/inputmethod/canna/Makefile.version +++ /dev/null @@ -1,13 +0,0 @@ -# $NetBSD: Makefile.version,v 1.2 2003/09/23 15:06:57 uebayasi Exp $ - -# "Pkgsrc" version. -CANNA_VERSION= 3.6pl4 - -_CANNA_VERS= \ - CANNA_USER=${CANNA_USER} \ - CANNA_GROUP=${CANNA_GROUP} \ - CANNA_SPOOL=${CANNA_SPOOL} \ - CANNA_MODE=${CANNA_MODE} \ - IMDICTDIR=${IMDICTDIR} -MAKE_ENV+= ${_CANNA_VERS} -PLIST_SUBST+= ${_CANNA_VERS} diff --git a/inputmethod/canna/files/canna.sh b/inputmethod/canna/files/canna.sh index 72d19e74a7f..346bccac021 100644 --- a/inputmethod/canna/files/canna.sh +++ b/inputmethod/canna/files/canna.sh @@ -1,25 +1,42 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: canna.sh,v 1.1 2003/07/29 19:42:53 jmmv Exp $ +# $NetBSD: canna.sh,v 1.2 2006/07/05 04:48:28 jlam Exp $ # # PROVIDE: canna # REQUIRE: DAEMON -if [ -f /etc/rc.subr ] -then - . /etc/rc.subr -fi +. /etc/rc.subr name="canna" rcvar=$name command="@PREFIX@/sbin/cannaserver" +start_precmd="canna_prestart" 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 +mkdir_perms() { + dir="$1"; user="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ $group $dir + @CHMOD@ $mode $dir +} + +canna_prestart() +{ + mkdir_perms @CANNA_SPOOL@ @CANNA_USER@ @CANNA_GROUP@ 0755 + mkdir_perms @IMDICTDIR@/canna @CANNA_USER@ @CANNA_GROUP@ 0775 + mkdir_perms @IMDICTDIR@/canna/canna @CANNA_USER@ @CANNA_GROUP@ 0775 + + srcdictdir="@PREFIX@/libdata/canna" + dictdir="@IMDICTDIR@/canna/canna" + if @TEST@ -d $srcdictdir; then + ( cd $srcdictdir; for f in *; do + @TEST@ "$f" != "*" || continue + @RM@ -f $dictdir/$f + @LN@ -fs $srcdictdir/$f $dictdir/$f + done ) + fi +} + +load_rc_config $name +run_rc_command "$1" |