source: projects/specs/branches/6/n/ndtpd/ndtpd-vl.spec @ 2555

Revision 2555, 8.0 KB checked in by iwaim, 13 years ago (diff)

ndtpd 3.1.5-4

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