[521] | 1 | Summary: Server for accessing CD-ROM books with NDTP |
---|
| 2 | Summary(ja): NDTP を用いた CD-ROM 書籍をアクセスするためのサーバ |
---|
| 3 | Name: ndtpd |
---|
| 4 | Version: 3.1.5 |
---|
[9308] | 5 | Release: 5%{?_dist_release} |
---|
[521] | 6 | License: GPLv2 |
---|
[9308] | 7 | Group: Applications/Services |
---|
| 8 | URL: http://www.sra.co.jp/people/m-kasahr/ndtpd/ |
---|
| 9 | |
---|
[521] | 10 | Source: ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/%{name}-%{version}.tar.gz |
---|
| 11 | Source1: ndtpd |
---|
[9308] | 12 | |
---|
[521] | 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[9308] | 14 | Requires: eb >= 3.3 |
---|
| 15 | Requires: rsyslog |
---|
| 16 | BuildRequires: eb-devel >= 3.3 |
---|
[521] | 17 | BuildRequires: zlib-devel |
---|
[9308] | 18 | BuildRequires: nkf |
---|
| 19 | Requires(pre): grep shadow-utils |
---|
[521] | 20 | Requires(post): grep /sbin/install-info |
---|
| 21 | Requires(preun): grep /sbin/install-info /sbin/chkconfig |
---|
[9308] | 22 | Requires(postun): grep shadow-utils |
---|
[521] | 23 | |
---|
| 24 | Distribution: Vine Linux |
---|
| 25 | Vendor: Project Vine |
---|
| 26 | |
---|
| 27 | %define ndtpdconfdir %{_sysconfdir}/ndtpd |
---|
| 28 | |
---|
| 29 | %description |
---|
| 30 | NDTPD is a server for accessing CD-ROM books with NDTP (Network |
---|
| 31 | Dictionary Transfer Protocol) on TCP. You can replace dserver with |
---|
| 32 | NDTPD. NDTPD can run on UNIX derived systems. It supports to access |
---|
| 33 | CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats. |
---|
| 34 | CD-ROM books of those formats are popular in Japan. Since CD-ROM |
---|
| 35 | books themseves are stands on the ISO 9660 format, you can mount the |
---|
| 36 | discs by the same way as other ISO 9660 discs. |
---|
| 37 | |
---|
| 38 | %description -l ja |
---|
| 39 | NDTPD は TCP 上の NDTP (Network Disctionary Transfer Protocol) という |
---|
| 40 | プロトコルを用いて、CD-ROM 書籍へのアクセスを行うサーバです。 |
---|
| 41 | dserver は NDTPD に置き換えることが可能です。 |
---|
| 42 | |
---|
| 43 | NDTPD は UNIX 系 OS のシステム上で動作させることができます。EB, EBG, |
---|
| 44 | EBXA, EBXA-C, S-EBXA および EPWING 形式の CD-ROM 書籍に対応しています。 |
---|
| 45 | これらの形式の CD-ROM 書籍は、日本で一般的に使われています。CD-ROM 書籍 |
---|
| 46 | 自体はISO 9660 形式になっていますので、他の ISO 9660 形式と同じ要領で |
---|
| 47 | マウントすることができます。 |
---|
| 48 | |
---|
| 49 | %prep |
---|
| 50 | %setup -q |
---|
| 51 | |
---|
[9308] | 52 | mv README-ja README-ja.old |
---|
| 53 | mv UPGRADE-ja UPGRADE-ja.old |
---|
| 54 | nkf -w README-ja.old > README-ja |
---|
| 55 | nkf -w UPGRADE-ja.old > UPGRADE-ja |
---|
| 56 | |
---|
[521] | 57 | %build |
---|
| 58 | ./configure --prefix=%{_prefix} \ |
---|
| 59 | --sysconfdir=%{ndtpdconfdir} \ |
---|
| 60 | --localstatedir=%{_localstatedir} \ |
---|
| 61 | --infodir=%{_infodir} \ |
---|
| 62 | --with-eb-conf=%{_sysconfdir}/eb.conf \ |
---|
| 63 | --with-zlib |
---|
| 64 | make all check info #dvi |
---|
| 65 | |
---|
| 66 | %install |
---|
| 67 | rm -rf %{buildroot} |
---|
| 68 | make DESTDIR=%{buildroot} install |
---|
| 69 | mkdir -p %{buildroot}%{_localstatedir}/ndtpd/log |
---|
| 70 | install -m 755 -D %{SOURCE1} %{buildroot}%{_initdir}/ndtpd |
---|
| 71 | rm -f %{buildroot}%{_infodir}/dir |
---|
| 72 | |
---|
| 73 | cd %{buildroot}%{ndtpdconfdir} |
---|
| 74 | cat ndtpd.conf.sample | sed -e 's|/usr/var|%{_localstatedir}|g' > ndtpd~ |
---|
| 75 | [ -s ndtpd~ ] && (rm -f ndtpd.conf.sample; mv ndtpd~ ndtpd.conf.sample) |
---|
| 76 | |
---|
| 77 | %clean |
---|
| 78 | rm -rf %{buildroot} |
---|
| 79 | |
---|
| 80 | %pre |
---|
| 81 | if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 0 ]; then |
---|
[9308] | 82 | %{_sbindir}/groupadd ndtpgrp |
---|
[521] | 83 | fi |
---|
| 84 | if [ `grep ndtpuser %{_sysconfdir}/passwd | wc -l` = 0 ]; then |
---|
[9308] | 85 | %{_sbindir}/useradd -M -r -g ndtpgrp -d %{_localstatedir}/ndtpd \ |
---|
| 86 | -s "" -c "ndtpd" ndtpuser || : |
---|
[521] | 87 | fi |
---|
| 88 | |
---|
| 89 | %post |
---|
| 90 | if [ -x /sbin/install-info ]; then |
---|
[9308] | 91 | for i in $(ls %{_infodir}/ndtpd*); do |
---|
| 92 | /sbin/install-info --info-dir=%{_infodir} $i |
---|
| 93 | done |
---|
[521] | 94 | fi |
---|
| 95 | if [ -x /bin/grep -a -f /etc/services ] ; then |
---|
[9308] | 96 | grep -q "^ndtp" /etc/services || \ |
---|
| 97 | echo "ndtp 2010/tcp # added by ndtpd RPM" >> /etc/services |
---|
[521] | 98 | fi |
---|
| 99 | |
---|
[9308] | 100 | if [ -x /bin/grep -a -f /etc/rsyslog.conf ] ; then |
---|
| 101 | grep -q "ndtpd" /etc/rsyslog.conf || \ |
---|
| 102 | echo "local0.info %{_localstatedir}/ndtpd/log/ndtpd.log" >> /etc/rsyslog.conf |
---|
| 103 | kill -HUP `/sbin/pidof rsyslogd` |
---|
[521] | 104 | fi |
---|
| 105 | |
---|
| 106 | if [ -x /bin/grep -a -f /etc/inetd.conf ] ; then |
---|
[9308] | 107 | grep -q "ndtp" /etc/inetd.conf || \ |
---|
| 108 | echo "#ndtp stream tcp nowait root /usr/sbin/ndtpd ndtpd --inetd" >> /etc/inetd.conf |
---|
[521] | 109 | fi |
---|
| 110 | #kill -HUP `/sbin/pidof inetd` |
---|
| 111 | if [ -x /bin/grep -a -f /etc/hosts.allow ] ; then |
---|
[9308] | 112 | grep -q "ndtp" /etc/hosts.allow || \ |
---|
| 113 | echo "ndtp: 127.0.0.1 : allow" >> /etc/hosts.allow |
---|
[521] | 114 | fi |
---|
| 115 | |
---|
| 116 | #[ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \ |
---|
| 117 | #/sbin/chkconfig --add ndtpd |
---|
| 118 | |
---|
| 119 | if [ -f %{_localstatedir}/ndtpd/ndtpd.pid -a -x %{_initdir}/ndtpd ]; then |
---|
| 120 | %{_initdir}/ndtpd restart |
---|
| 121 | fi |
---|
| 122 | |
---|
| 123 | %preun |
---|
| 124 | if [ $1 = 0 ]; then |
---|
| 125 | if [ -x /sbin/install-info ]; then |
---|
[9308] | 126 | for i in $(ls %{_infodir}/ndtpd*); do |
---|
| 127 | /sbin/install-info --delete --info-dir=%{_infodir} $i |
---|
| 128 | done |
---|
[521] | 129 | fi |
---|
| 130 | [ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \ |
---|
[9308] | 131 | /sbin/chkconfig --del ndtpd |
---|
[521] | 132 | ls %{_localstatedir}/ndtpd/log/* &> /dev/null && \ |
---|
[9308] | 133 | rm -f %{_localstatedir}/ndtpd/log/* |
---|
| 134 | |
---|
| 135 | if [ -x /bin/grep -a -f /etc/rsyslog.conf ] ; then |
---|
| 136 | if grep -q "ndtpd" /etc/rsyslog.conf ; then |
---|
| 137 | grep -v "ndtpd" /etc/rsyslog.conf > /etc/rsyslog.new && \ |
---|
| 138 | mv -f /etc/rsyslog.new /etc/rsyslog.conf |
---|
| 139 | kill -HUP `/sbin/pidof rsyslogd` |
---|
[521] | 140 | fi |
---|
| 141 | fi |
---|
| 142 | |
---|
| 143 | if [ -x /bin/grep -a -f /etc/inetd.conf ] ; then |
---|
| 144 | if grep -q "^ndtp" /etc/inetd.conf ; then |
---|
| 145 | grep -v "ndtp" /etc/inetd.conf > /etc/inetd.new && \ |
---|
| 146 | mv -f /etc/inetd.new /etc/inetd.conf |
---|
| 147 | kill -HUP `/sbin/pidof inetd` |
---|
| 148 | fi |
---|
| 149 | fi |
---|
| 150 | |
---|
| 151 | if [ -x /bin/grep -a -f /etc/hosts.allow ] ; then |
---|
| 152 | if grep -q "ndtp" /etc/hosts.allow ; then |
---|
| 153 | grep -v "ndtp" /etc/hosts.allow > /etc/hosts.allow.new && \ |
---|
| 154 | mv -f /etc/hosts.allow.new /etc/hosts.allow |
---|
| 155 | fi |
---|
| 156 | fi |
---|
| 157 | |
---|
| 158 | if [ -f %{_localstatedir}/ndtpd/ndtpd.pid -a -x %{_initdir}/ndtpd ]; then |
---|
| 159 | %{_initdir}/ndtpd stop |
---|
| 160 | fi |
---|
| 161 | rm -f %{_localstatedir}/ndtpd/*.lock |
---|
| 162 | |
---|
| 163 | fi |
---|
| 164 | : |
---|
| 165 | |
---|
| 166 | %postun |
---|
| 167 | if [ $1 = 0 ]; then |
---|
| 168 | if [ `grep ndtpuser %{_sysconfdir}/passwd | wc -l` = 1 ]; then |
---|
| 169 | %{_sbindir}/userdel ndtpuser |
---|
| 170 | fi |
---|
| 171 | if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 1 ]; then |
---|
| 172 | %{_sbindir}/groupdel ndtpgrp |
---|
| 173 | fi |
---|
| 174 | fi |
---|
| 175 | |
---|
| 176 | %files |
---|
| 177 | %defattr(-,root,root) |
---|
[9308] | 178 | %doc AUTHORS COPYING ChangeLog* NEWS README README-ja UPGRADE UPGRADE-ja |
---|
[521] | 179 | %config %{ndtpdconfdir}/ndtpd.conf.sample |
---|
| 180 | %{_infodir}/ndtpd-ja.info* |
---|
| 181 | %{_infodir}/ndtpd.info* |
---|
| 182 | %{_libexecdir}/ndtpstat |
---|
| 183 | %{_sbindir}/ndtpcheck |
---|
| 184 | %{_sbindir}/ndtpcontrol |
---|
| 185 | %{_sbindir}/ndtpd |
---|
| 186 | %{_sbindir}/ndtpdaily |
---|
| 187 | %{_sbindir}/ndtpupgrade |
---|
| 188 | %{_initdir}/ndtpd |
---|
| 189 | %attr(-,ndtpuser,ndtpgrp) %{_localstatedir}/ndtpd |
---|
| 190 | |
---|
| 191 | %changelog |
---|
[9308] | 192 | * Thu Jan 29 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.1.5-5 |
---|
| 193 | - rebuilt on current VineSeed |
---|
| 194 | - moved to Applications/Services Group |
---|
| 195 | - fixed README-ja, UPGRADE-ja encoding |
---|
| 196 | - updated %%post and %%preun script for rsyslog |
---|
| 197 | - added Requires: rsyslog |
---|
| 198 | |
---|
[2555] | 199 | * Sun Jan 2 2011 IWAI, Masaharu <iwai@alib.jp> 3.1.5-4 |
---|
| 200 | - build with eb 4.4.3 |
---|
| 201 | |
---|
[521] | 202 | * Wed Jul 22 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.1.5-3 |
---|
| 203 | - rebuilt with eb-4.4.1 |
---|
| 204 | |
---|
| 205 | * Fri Oct 10 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.1.5-2vl5 |
---|
| 206 | - fixed release |
---|
| 207 | |
---|
| 208 | * Wed Oct 08 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.5-1vl5 |
---|
| 209 | - applied new versioning policy, spec in utf-8 |
---|
| 210 | |
---|
| 211 | * Thu Dec 13 2007 IWAI, Masaharu <iwai@alib.jp> 3.1.5-0vl2 |
---|
| 212 | - rebuild with eb-4.3 |
---|
| 213 | |
---|
| 214 | * Sun Oct 3 2004 Kunio Murasawa <murasawa@fa2.so-net.ne.jp> 3.1.5-0vl1 |
---|
| 215 | - new upstream release |
---|
| 216 | - changed Copyright to License |
---|
| 217 | - removed define _sysconfdir, _initdir, _localstatdir |
---|
| 218 | - fixed Requires: eb >= 3.3 |
---|
| 219 | - fixed Group: System Environment/Daemons |
---|
| 220 | - added configure --infodir |
---|
| 221 | - removed rm info-[1-2]* in install section |
---|
| 222 | |
---|
| 223 | * Tue Sep 24 2002 Masaki Shinomiya <shino@pos.to> 3.1.3-0vl3 |
---|
| 224 | - merge Vine-2.5 Plus's Spec file by Kyoichiro Suda <sudakyo@fat.coara.or.jp> |
---|
| 225 | - services, inetd.conf, syslog.conf, ndtpd.conf.sample, post, preun |
---|
| 226 | |
---|
| 227 | * Sat Jul 6 2002 IWAI Masaharu <iwai@alib.jp> 3.1.3-0vl2 |
---|
| 228 | - update to 3.1.3 for VineSeed Plus |
---|
| 229 | - merged 3.1.3-0vl1 for Vine-2.5 Plus's Spec file |
---|
| 230 | - added startup script %%{SOURCE1} |
---|
| 231 | - fixed Distribution and Vendor tags |
---|
| 232 | - 3.1.3-0vl1 Changelog |
---|
| 233 | * Tue Jun 11 2002 Satoshi Tanaka <tnim@mint.freemail.ne.jp> |
---|
| 234 | - Update version 3.1.3 for the Vine Linux 2.x |
---|
| 235 | |
---|
| 236 | * Tue Mar 12 2002 Satoshi Tanaka <tnim@mint.freemail.ne.jp> |
---|
| 237 | - Update version 3.1.1 for the Vine Linux 2.1.5 |
---|
| 238 | |
---|
| 239 | * Thu Nov 15 2001 Tomoya TAKA <taka@vinelinux.org> 3.0.2-0vl1 |
---|
| 240 | - update to 3.0.2 |
---|
| 241 | - add Requires: eb, zlib and BuildPrereq: zlib-devel |
---|
| 242 | - fix spec files, use rpm macros |
---|
| 243 | |
---|
| 244 | * Fri Jul 6 2001 UECHI Yasumasa <uh@u.dhis.portside.net> |
---|
| 245 | -3.0.1-0vl1 |
---|
| 246 | - version up to 3.0.1 |
---|
| 247 | - add user ndtpuser, group ndtpgrp |
---|
| 248 | |
---|
| 249 | * Sat Jun 23 2001 Tomoya TAKA <tomoya@olive.plala.or.jp> |
---|
| 250 | - 3.0-0vl2 |
---|
| 251 | - add PreReq: /sbin/install-info, handle info pages in %%post and %%preun |
---|
| 252 | |
---|
| 253 | * Fri Jun 22 2001 UECHI Yasumasa <uh@u.dhis.portside.net> |
---|
| 254 | - 3.0-0vl1 |
---|
| 255 | - version up to 3.0 |
---|
| 256 | - remove EB library from this pkg |
---|
| 257 | |
---|
| 258 | * Wed Jun 14 2000 Masaki Kawamura <kawamura@ic.sci.yamaguchi-u.ac.jp> |
---|
| 259 | - add Provides: eb == 2.3.7, eb-devel == 2.3.7 |
---|
| 260 | |
---|
| 261 | * Wed Apr 26 2000 Masaki Kawamura <kawamura@ic.sci.yamaguchi-u.ac.jp> |
---|
| 262 | - Update version 2.3.7 for the Vine Linux 2.0 |
---|
| 263 | |
---|
| 264 | * Wed Dec 9 1998 ZUKERAN, shin <shin@ryukyu.ad.jp> |
---|
| 265 | - fix -version-info parameter with pje.patch. |
---|
| 266 | - fix ndtpd.init |
---|