debian/0000775000000000000000000000000012323403370007165 5ustar debian/rules0000775000000000000000000000257012323403323010247 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 ifndef PERL PERL = /usr/bin/perl endif PERL_OPTIMIZE = -O2 -Wall ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) PERL_OPTIMIZE += -g endif %: dh $@ --with quilt --with autoreconf override_dh_auto_configure: dh_auto_configure -- --libexecdir=/usr/lib --datadir=/usr/lib cd perl && $(PERL) Makefile.PL INSTALLDIRS=vendor override_dh_auto_build: dh_auto_build $(MAKE) -C perl OPTIMIZE="$(PERL_OPTIMIZE)" DICDIR=`pwd`/dic #dicprefix=debian/juman-dic/usr/share/juman override_dh_auto_install: dh_auto_install rm -rf debian/tmp/usr/lib/juman/doc dh_link -pjuman usr/share/doc/juman usr/lib/juman/doc # cp -p dic/*.dic $(dicprefix)/dic # cp -p autodic/*.dic $(dicprefix)/autodic # cp -p wikipediadic/*.dic $(dicprefix)/wikipediadic for d in dic autodic wikipediadic ; do \ for f in $(dicprefix)/$${d}/* ; do \ dh_link -pjuman-dic \ `echo $$f|sed s,debian/juman-dic/,,` \ `echo $$f|sed s,debian/juman-dic/usr/share/,usr/lib/,` ;\ done ;\ done $(MAKE) -C perl install PREFIX=`pwd`/debian/libjuman-perl/usr DICDIR=`pwd`/dic override_dh_auto_clean: dh_auto_clean -$(MAKE) -C perl realclean -rm -f dic/*.int dic/jumandic.* dic/JUMAN.connect -rm -f autodic/*.int autodic/jumandic.* -rm -f wikipediadic/*.int wikipediadic/jumandic.* # Do no tests. override_dh_auto_test: debian/changelog0000664000000000000000000001135712323403364011051 0ustar juman (7.0-3.1ubuntu1) trusty; urgency=medium * Use dh-autoreconf instead of autotools-dev to also fix FTBFS on ppc64el by getting new libtool macros (still updates config.{sub,guess}). -- Logan Rosen Wed, 16 Apr 2014 00:28:14 -0400 juman (7.0-3.1) unstable; urgency=low * Non-maintainer upload. * Fix FTBFS when building the architecture-dependent binary only. (Closes: #730038) - debian/juman-dic.install: created to install the juman-dic binary files. - debian/rules: removed lines that was moved to debian/juman-dic.install. -- Joao Eriberto Mota Filho Wed, 05 Mar 2014 00:16:16 -0300 juman (7.0-3) unstable; urgency=low * Call dh with "--with autotools_dev" option (closes: #727909). * Build depends to autotools-dev. -- TSUCHIYA Masatoshi Wed, 30 Oct 2013 22:28:48 +0900 juman (7.0-2) unstable; urgency=low * Add libjuman-perl. -- TSUCHIYA Masatoshi Mon, 23 Jan 2012 22:23:49 +0900 juman (7.0-1) unstable; urgency=low * New upstream (closes: #656386). -- TSUCHIYA Masatoshi Fri, 20 Jan 2012 12:13:19 +0900 juman (5.1-2.1) unstable; urgency=low * NMU * Fix fprintf format warning/error. Closes: #643415 * Add ${misc:Depends} etc. for various binary packages * Switch to ${binary:Version}) to allow binNMUs in future * Updated Standards-Version -- Steve McIntyre Thu, 15 Dec 2011 17:45:16 +0000 juman (5.1-2) unstable; urgency=low * Fix. (closes: #378301). -- TSUCHIYA Masatoshi Fri, 25 Aug 2006 01:20:10 +0900 juman (5.1-1) unstable; urgency=low * New upstream release (closes: #342525). -- TSUCHIYA Masatoshi Sat, 14 Jan 2006 23:57:03 +0900 juman (4.0-7) unstable; urgency=low * debian/rules: Improve documents. * Removed the init script to start Juman server. (closes: #240680, #233553) -- TSUCHIYA Masatoshi Sat, 03 Apr 2004 23:47:16 +0900 juman (4.0-6) unstable; urgency=low * debian/control: Improve documents. * debian/control, debian/juman.templates, debian/po/POTFILES.in, debian/po/templates.pot: Switch to gettext-based debconf templates. (closes: #233553) -- TSUCHIYA Masatoshi Thu, 19 Feb 2004 03:26:21 +0900 juman (4.0-5) unstable; urgency=low * debian/control: `libjuman4' package conflicts to `libjuman' package, that is an obsolete package. -- TSUCHIYA Masatoshi Wed, 11 Feb 2004 11:30:02 +0900 juman (4.0-4) unstable; urgency=low * debian/control: `libjuman' package is renamed to `libjuman4'. * debian/rules: Now, juman depends on libjuman4. (closes: #226393) -- TSUCHIYA Masatoshi Tue, 21 Oct 2003 21:05:08 +0900 juman (4.0-3) unstable; urgency=low * Use cdbs instead of dbs. -- TSUCHIYA Masatoshi Tue, 21 Oct 2003 21:05:08 +0900 juman (4.0-2) unstable; urgency=low * debian/copyright: Fix lintian warning. * debian/control, debian/rules, debian/libjuman-dev.files, debian/libjuman.files: In order to fix lintian error, split library files and header files from `juman' package to `libjuman' package and `libjuman-dev' package. * debian/README.Debian, debian/control: Fix language bug. (closes: #215761) -- TSUCHIYA Masatoshi Tue, 21 Oct 2003 21:05:08 +0900 juman (4.0-1) unstable; urgency=low * Official release. -- TSUCHIYA Masatoshi Wed, 20 Aug 2003 14:53:54 +0900 juman (4.0-0.3) unstable; urgency=low * debian/rules: Move text files of dictionaries. -- TSUCHIYA Masatoshi Sat, 16 Aug 2003 19:15:54 +0900 juman (4.0-0.2) unstable; urgency=low * debian/juman.postrm: Remove /etc/juman_server_to_be_run when this package is purged. -- TSUCHIYA Masatoshi Wed, 13 Aug 2003 22:30:55 +0900 juman (4.0-0.1) unstable; urgency=low * New upstream release. * Repackaging. -- TSUCHIYA Masatoshi Wed, 13 Aug 2003 09:03:35 +0900 juman (3.62+cvs20010528-3) unstable; urgency=low * debian/patches/030_client_fflush.diff: Flush file handles always. -- TSUCHIYA Masatoshi Sun, 08 Dec 2002 00:53:43 +0900 juman (3.62+cvs20010528-2) unstable; urgency=low * debian/patches/002_server_pidfile.diff: New patch to create pid file and to change uid and gid for security. * debian/juman.init: New script to start Juman server. * debian/conffiles: Removed. -- TSUCHIYA Masatoshi Sat, 05 Oct 2002 14:28:56 +0900 juman (3.62+cvs20010528-1) unstable; urgency=low * Initial Release. -- TSUCHIYA Masatoshi Sun, 16 Jun 2002 01:22:22 +0900 debian/compat0000664000000000000000000000000211706155752010377 0ustar 7 debian/copyright0000664000000000000000000000327207745221544011141 0ustar This package was debianized by TSUCHIYA Masatoshi on Sun, 16 Jun 2002 01:22:22 +0900. It was downloaded from http://www.kc.t.u-tokyo.ac.jp/nl-resource/juman.html. Upstream Author: Sadao Kurohashi . Copyright: Copyright (c) 2003 University of Tokyo All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name University of Tokyo may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY University of Tokyo ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE Nara Institute of Science and Technology BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/source/0000775000000000000000000000000012236361452010474 5ustar debian/source/format0000664000000000000000000000001411706177657011717 0ustar 3.0 (quilt) debian/README.Debian0000664000000000000000000000145311707770015011241 0ustar juman for Debian ---------------- Juman is a morphological analysis system. It reads Japanese sentences from the standard input, segments them into morpheme sequences, and outputs them to the standard output with many additional pieces of information (pronunciation, semantic information, etc). Note: Juman can not process strings encoded in other coding systems than UTF-8, and also its outputs are encoded in UTF-8. This is a big difference between the current version of Juman and the older versions. If you want to use Juman server, try these steps. cp -p /usr/share/doc/juman/juman-server /etc/init.d chmod +x /etc/init.d/juman-server update-rc.d juman-server defaults 99 1 /etc/init.t/juman-server start -- TSUCHIYA Masatoshi , Wed, 25 Jan 2012 21:05:33 +0900 debian/juman-dic.install0000664000000000000000000000021612306324551012427 0ustar dic/*.dic usr/share/juman/dic autodic/*.dic usr/share/juman/autodic wikipediadic/*.dic usr/share/juman/wikipediadic debian/juman.docs0000664000000000000000000000006211706156620011156 0ustar doc/manual.pdf doc/manual.tex debian/juman-server debian/juman.manpages0000664000000000000000000000001707766127160012031 0ustar debian/juman.1 debian/juman-server0000775000000000000000000000225711707770127011553 0ustar #! /bin/sh # # If you want to use Juman server, copy this script to /etc/init.d/ # and call update-rc.d to install the links of the copied script. # ### BEGIN INIT INFO # Provides: juman # Required-Start: $local_fs $network $syslog # Required-Stop: $local_fs $network $syslog # Should-Start: # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Juman init script # Description: Init script for Juman server ### END INIT INFO NAME=juman DAEMON="/usr/bin/$NAME" DESC="Juman server" test -f $DAEMON || exit 0 PARAMS="-S" case "$1" in start) check_for_no_start echo -n "Starting $DESC: " start-stop-daemon --start --quiet --background --exec $DAEMON -- $PARAMS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid sleep 1 start-stop-daemon --start --quiet --background --exec $DAEMON -- $PARAMS echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 debian/juman.install0000664000000000000000000000004607766127160011706 0ustar etc/jumanrc usr/bin/* usr/lib/juman/* debian/juman.10000664000000000000000000000263410242124716010370 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH JUMAN 1 "Aug 13th, 2003" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME juman \- a morphological analysys system .SH SYNOPSIS .B juman .RI [ options ] .SH DESCRIPTION .B JUMAN is a morphological analysys system. It can segment and tokenize Japanese text string, and can output with many additional informations (pronunciation, semantic information, and others). It will print the result of such an operation to the standard output, so that it can either written to a file or further processed. This manual page was written for the Debian distribution because the original program does not have a manual page. .SH OPTIONS .TP .B \-h, \-\-help Show summary of options. .br .SH AUTHOR This manual page was written by TSUCHIYA Masatoshi , for the Debian project (but may be used by others). debian/control0000664000000000000000000000317012323403365010575 0ustar Source: juman Section: misc Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: TSUCHIYA Masatoshi Build-Depends: debhelper (>= 7), quilt, dh-autoreconf Standards-Version: 3.9.2 Package: juman Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: juman-dic Description: Japanese morphological analysis system Juman is a morphological analysis system. It reads Japanese sentences from the standard input, segments them into morpheme sequences, and outputs them to the standard output with many additional pieces of information (pronunciation, semantic information, etc). Package: juman-dic Architecture: all Description: Juman dictionary in text format This package provides Juman dictionary written in text format. Package: libjuman-dev Section: libdevel Architecture: any Depends: libjuman4 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Header files of JUMAN This package provides header files which are necessary to development programs using runtime libraries of Juman, that is a Japanese morphological analysis system. Package: libjuman4 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: libjuman Replaces: libjuman Provides: libjuman Description: Library of JUMAN This package provides runtime libraries of Juman, that is a Japanese morphological analysis system. Package: libjuman-perl Architecture: all Depends: ${perl:Depends}, juman Description: Perl binding of JUMAN This package provides Perl binding of Juman, that is a Japanese morphological analysis system. debian/libjuman4.install0000664000000000000000000000002610010341642012432 0ustar usr/lib/libjuman.so.* debian/patches/0000775000000000000000000000000012236361452010623 5ustar debian/patches/fprintf-format-fix.patch0000664000000000000000000000054111706167503015370 0ustar Fix fprintf format warning/error, #643415 Steve McIntyre --- a/lib/iotool.c 2011-12-15 17:28:35.942749952 +0000 +++ b/lib/iotool.c 2011-12-15 17:30:10.790749100 +0000 @@ -445,7 +445,7 @@ struct tm *tp; time(&t); tp = localtime(&t); - fprintf(fp, asctime(tp)); + fprintf(fp, "%s", asctime(tp)); } /* debian/patches/server-pidfile.patch0000664000000000000000000000245011706157261014567 0ustar Generate PID file when Juman server is started. --- a/juman/server.c +++ b/juman/server.c @@ -43,6 +43,9 @@ #endif +#include +#include + #include extern int errno; @@ -58,6 +61,8 @@ static int data_column = 0; static int data_buff_cur = 0; +#define JUMAN_PIDFILE "/var/run/juman.pid" +#define JUMAN_SERVER_USER "nobody" /* Parameter Definition from juman.c NACSIS 吉岡 @@ -593,6 +598,8 @@ int foreground; { int pid, i; + FILE *pidfile; + struct passwd *ent_pw; if (!juman_init_rc(Jumanrc_Fileptr)) { /* rcfile関係の初期化 */ fprintf(stderr, "error in .jumanrc\n"); @@ -641,6 +648,28 @@ signal(SIGCHLD, sigchld_handler); #endif + umask(022); + pidfile = fopen(JUMAN_PIDFILE, "w"); + if( ! pidfile ){ + fputs("Can't write pidfile: " JUMAN_PIDFILE "\n", stderr); + } + fprintf(pidfile, "%d\n", getpid() ); + fclose(pidfile); + umask(0); + + /* Change uid and gid for security */ + ent_pw = getpwnam(JUMAN_SERVER_USER); + if( ent_pw ){ + gid_t dummy; + struct group *gp; + /* remove all supplimentary groups */ + setgroups(0, &dummy); + if ((gp = getgrgid(ent_pw->pw_gid))) + setgid(gp->gr_gid); + /* finally drop root */ + setuid(ent_pw->pw_uid); + } + while(1) { int pid = 0; debian/patches/series0000664000000000000000000000005611706167533012046 0ustar server-pidfile.patch fprintf-format-fix.patch debian/juman-dic.dirs0000664000000000000000000000011111706165660011723 0ustar usr/share/juman/dic usr/share/juman/autodic usr/share/juman/wikipediadic debian/libjuman-dev.install0000664000000000000000000000011107766127160013142 0ustar usr/include/* usr/lib/libjuman.a usr/lib/libjuman.la usr/lib/libjuman.so debian/juman.preinst0000664000000000000000000000122210033640316011701 0ustar #!/bin/sh # preinst script for juman # # see: dh_installdeb(1) set -e umask 022 case "$1" in upgrade|install) # Does not start Juman server. if ( dpkg --compare-versions "$2" lt "4.0-7" ); then if [ -f /etc/init.d/juman ]; then rm -f /etc/init.d/juman fi update-rc.d -f juman remove fi if [ -f /etc/juman_server_to_be_run ]; then rm -f /etc/juman_server_to_be_run 2>/dev/null fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0