Summary: Server for accessing CD-ROM books with NDTP Summary(ja): NDTP を用いた CD-ROM 書籍をアクセスするためのサーバ Name: ndtpd Version: 3.1.5 Release: 4%{?_dist_release} License: GPLv2 Group: System Environment/Daemons Source: ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/%{name}-%{version}.tar.gz Source1: ndtpd URL: http://www.sra.co.jp/people/m-kasahr/ndtpd/ BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: eb >= 3.3, zlib BuildRequires: eb-devel BuildRequires: zlib-devel Requires(post): grep /sbin/install-info Requires(preun): grep /sbin/install-info /sbin/chkconfig Distribution: Vine Linux Vendor: Project Vine %define ndtpdconfdir %{_sysconfdir}/ndtpd %description NDTPD is a server for accessing CD-ROM books with NDTP (Network Dictionary Transfer Protocol) on TCP. You can replace dserver with NDTPD. NDTPD can run on UNIX derived systems. It supports to access CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats. CD-ROM books of those formats are popular in Japan. Since CD-ROM books themseves are stands on the ISO 9660 format, you can mount the discs by the same way as other ISO 9660 discs. %description -l ja NDTPD は TCP 上の NDTP (Network Disctionary Transfer Protocol) という プロトコルを用いて、CD-ROM 書籍へのアクセスを行うサーバです。 dserver は NDTPD に置き換えることが可能です。 NDTPD は UNIX 系 OS のシステム上で動作させることができます。EB, EBG, EBXA, EBXA-C, S-EBXA および EPWING 形式の CD-ROM 書籍に対応しています。 これらの形式の CD-ROM 書籍は、日本で一般的に使われています。CD-ROM 書籍 自体はISO 9660 形式になっていますので、他の ISO 9660 形式と同じ要領で マウントすることができます。 %prep %setup -q %build ./configure --prefix=%{_prefix} \ --sysconfdir=%{ndtpdconfdir} \ --localstatedir=%{_localstatedir} \ --infodir=%{_infodir} \ --with-eb-conf=%{_sysconfdir}/eb.conf \ --with-zlib make all check info #dvi %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install mkdir -p %{buildroot}%{_localstatedir}/ndtpd/log install -m 755 -D %{SOURCE1} %{buildroot}%{_initdir}/ndtpd rm -f %{buildroot}%{_infodir}/dir cd %{buildroot}%{ndtpdconfdir} cat ndtpd.conf.sample | sed -e 's|/usr/var|%{_localstatedir}|g' > ndtpd~ [ -s ndtpd~ ] && (rm -f ndtpd.conf.sample; mv ndtpd~ ndtpd.conf.sample) %clean rm -rf %{buildroot} %pre if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 0 ]; then %{_sbindir}/groupadd ndtpgrp fi if [ `grep ndtpuser %{_sysconfdir}/passwd | wc -l` = 0 ]; then %{_sbindir}/useradd -M -r -g ndtpgrp -d %{_localstatedir}/ndtpd \ -s "" -c "ndtpd" ndtpuser || : fi %post if [ -x /sbin/install-info ]; then for i in $(ls %{_infodir}/ndtpd*); do /sbin/install-info --info-dir=%{_infodir} $i done fi if [ -x /bin/grep -a -f /etc/services ] ; then grep -q "^ndtp" /etc/services || \ echo "ndtp 2010/tcp # added by ndtpd RPM" >> /etc/services fi if [ -x /bin/grep -a -f /etc/syslog.conf ] ; then grep -q "ndtpd" /etc/syslog.conf || \ echo "local0.info %{_localstatedir}/ndtpd/log/ndtpd.log" >> /etc/syslog.conf fi kill -HUP `/sbin/pidof syslogd` if [ -x /bin/grep -a -f /etc/inetd.conf ] ; then grep -q "ndtp" /etc/inetd.conf || \ echo "#ndtp stream tcp nowait root /usr/sbin/ndtpd ndtpd --inetd" >> /etc/inetd.conf fi #kill -HUP `/sbin/pidof inetd` if [ -x /bin/grep -a -f /etc/hosts.allow ] ; then grep -q "ndtp" /etc/hosts.allow || \ echo "ndtp: 127.0.0.1 : allow" >> /etc/hosts.allow fi #[ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \ #/sbin/chkconfig --add ndtpd if [ -f %{_localstatedir}/ndtpd/ndtpd.pid -a -x %{_initdir}/ndtpd ]; then %{_initdir}/ndtpd restart fi %preun if [ $1 = 0 ]; then if [ -x /sbin/install-info ]; then for i in $(ls %{_infodir}/ndtpd*); do /sbin/install-info --delete --info-dir=%{_infodir} $i done fi [ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \ /sbin/chkconfig --del ndtpd ls %{_localstatedir}/ndtpd/log/* &> /dev/null && \ rm -f %{_localstatedir}/ndtpd/log/* if [ -x /bin/grep -a -f /etc/syslog.conf ] ; then if grep -q "ndtpd" /etc/syslog.conf ; then grep -v "ndtpd" /etc/syslog.conf > /etc/syslog.new && \ mv -f /etc/syslog.new /etc/syslog.conf kill -HUP `/sbin/pidof syslogd` fi fi if [ -x /bin/grep -a -f /etc/inetd.conf ] ; then if grep -q "^ndtp" /etc/inetd.conf ; then grep -v "ndtp" /etc/inetd.conf > /etc/inetd.new && \ mv -f /etc/inetd.new /etc/inetd.conf kill -HUP `/sbin/pidof inetd` fi fi if [ -x /bin/grep -a -f /etc/hosts.allow ] ; then if grep -q "ndtp" /etc/hosts.allow ; then grep -v "ndtp" /etc/hosts.allow > /etc/hosts.allow.new && \ mv -f /etc/hosts.allow.new /etc/hosts.allow fi fi if [ -f %{_localstatedir}/ndtpd/ndtpd.pid -a -x %{_initdir}/ndtpd ]; then %{_initdir}/ndtpd stop fi rm -f %{_localstatedir}/ndtpd/*.lock fi : %postun if [ $1 = 0 ]; then if [ `grep ndtpuser %{_sysconfdir}/passwd | wc -l` = 1 ]; then %{_sbindir}/userdel ndtpuser fi if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 1 ]; then %{_sbindir}/groupdel ndtpgrp fi fi %files %defattr(-,root,root) %config %{ndtpdconfdir}/ndtpd.conf.sample %{_infodir}/ndtpd-ja.info* %{_infodir}/ndtpd.info* %{_libexecdir}/ndtpstat %{_sbindir}/ndtpcheck %{_sbindir}/ndtpcontrol %{_sbindir}/ndtpd %{_sbindir}/ndtpdaily %{_sbindir}/ndtpupgrade %{_initdir}/ndtpd %attr(-,ndtpuser,ndtpgrp) %{_localstatedir}/ndtpd %doc AUTHORS COPYING ChangeLog* INSTALL INSTALL-ja NEWS README README-ja UPGRADE UPGRADE-ja %changelog * Sun Jan 2 2011 IWAI, Masaharu 3.1.5-4 - build with eb 4.4.3 * Wed Jul 22 2009 Ryoichi INAGAKI 3.1.5-3 - rebuilt with eb-4.4.1 * Fri Oct 10 2008 Ryoichi INAGAKI 3.1.5-2vl5 - fixed release * Wed Oct 08 2008 Shu KONNO 3.1.5-1vl5 - applied new versioning policy, spec in utf-8 * Thu Dec 13 2007 IWAI, Masaharu 3.1.5-0vl2 - rebuild with eb-4.3 * Sun Oct 3 2004 Kunio Murasawa 3.1.5-0vl1 - new upstream release - changed Copyright to License - removed define _sysconfdir, _initdir, _localstatdir - fixed Requires: eb >= 3.3 - fixed Group: System Environment/Daemons - added configure --infodir - removed rm info-[1-2]* in install section * Tue Sep 24 2002 Masaki Shinomiya 3.1.3-0vl3 - merge Vine-2.5 Plus's Spec file by Kyoichiro Suda - services, inetd.conf, syslog.conf, ndtpd.conf.sample, post, preun * Sat Jul 6 2002 IWAI Masaharu 3.1.3-0vl2 - update to 3.1.3 for VineSeed Plus - merged 3.1.3-0vl1 for Vine-2.5 Plus's Spec file - added startup script %%{SOURCE1} - fixed Distribution and Vendor tags - 3.1.3-0vl1 Changelog * Tue Jun 11 2002 Satoshi Tanaka - Update version 3.1.3 for the Vine Linux 2.x * Tue Mar 12 2002 Satoshi Tanaka - Update version 3.1.1 for the Vine Linux 2.1.5 * Thu Nov 15 2001 Tomoya TAKA 3.0.2-0vl1 - update to 3.0.2 - add Requires: eb, zlib and BuildPrereq: zlib-devel - fix spec files, use rpm macros * Fri Jul 6 2001 UECHI Yasumasa -3.0.1-0vl1 - version up to 3.0.1 - add user ndtpuser, group ndtpgrp * Sat Jun 23 2001 Tomoya TAKA - 3.0-0vl2 - add PreReq: /sbin/install-info, handle info pages in %%post and %%preun * Fri Jun 22 2001 UECHI Yasumasa - 3.0-0vl1 - version up to 3.0 - remove EB library from this pkg * Wed Jun 14 2000 Masaki Kawamura - add Provides: eb == 2.3.7, eb-devel == 2.3.7 * Wed Apr 26 2000 Masaki Kawamura - Update version 2.3.7 for the Vine Linux 2.0 * Wed Dec 9 1998 ZUKERAN, shin - fix -version-info parameter with pje.patch. - fix ndtpd.init