source: projects/specs/trunk/n/ndtpd/ndtpd-vl.spec @ 9308

Revision 9308, 8.5 KB checked in by inagaki, 9 years ago (diff)

2015-01-29 Ryoichi INAGAKI <ryo1@…>

  • eb: fixed files encoding
  • gerbv, irrlicht: updated
  • kaffeine: added patch
  • mana, manadic: rebuilt
  • ndtpd: fixed spec


Line 
1Summary: Server for accessing CD-ROM books with NDTP
2Summary(ja): NDTP を用いた CD-ROM 書籍をアクセスするためのサーバ
3Name: ndtpd
4Version: 3.1.5
5Release: 5%{?_dist_release}
6License: GPLv2
7Group: Applications/Services
8URL: http://www.sra.co.jp/people/m-kasahr/ndtpd/
9
10Source: ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/%{name}-%{version}.tar.gz
11Source1: ndtpd
12
13BuildRoot: %{_tmppath}/%{name}-%{version}-root
14Requires: eb >= 3.3
15Requires: rsyslog
16BuildRequires: eb-devel >= 3.3
17BuildRequires: zlib-devel
18BuildRequires: nkf
19Requires(pre): grep shadow-utils
20Requires(post): grep /sbin/install-info
21Requires(preun): grep /sbin/install-info /sbin/chkconfig
22Requires(postun): grep shadow-utils
23
24Distribution: Vine Linux
25Vendor: Project Vine
26
27%define ndtpdconfdir %{_sysconfdir}/ndtpd
28
29%description
30NDTPD is a server for accessing CD-ROM books with NDTP (Network
31Dictionary Transfer Protocol) on TCP.  You can replace dserver with
32NDTPD.  NDTPD can run on UNIX derived systems.  It supports to access
33CD-ROM books of EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats.
34CD-ROM books of those formats are popular in Japan.  Since CD-ROM
35books themseves are stands on the ISO 9660 format, you can mount the
36discs by the same way as other ISO 9660 discs.
37
38%description -l ja
39NDTPD は TCP 上の NDTP (Network Disctionary Transfer Protocol) という
40プロトコルを用いて、CD-ROM 書籍へのアクセスを行うサーバです。
41dserver は NDTPD に置き換えることが可能です。
42
43NDTPD は UNIX 系 OS のシステム上で動作させることができます。EB, EBG,
44EBXA, 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
52mv README-ja README-ja.old
53mv UPGRADE-ja UPGRADE-ja.old
54nkf -w README-ja.old > README-ja
55nkf -w UPGRADE-ja.old > UPGRADE-ja
56
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
64make all check info #dvi
65
66%install
67rm -rf %{buildroot}
68make DESTDIR=%{buildroot} install
69mkdir -p %{buildroot}%{_localstatedir}/ndtpd/log
70install -m 755 -D %{SOURCE1} %{buildroot}%{_initdir}/ndtpd
71rm -f %{buildroot}%{_infodir}/dir
72
73cd %{buildroot}%{ndtpdconfdir}
74cat 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
78rm -rf %{buildroot}
79
80%pre
81if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 0 ]; then
82    %{_sbindir}/groupadd ndtpgrp
83fi
84if [ `grep ndtpuser %{_sysconfdir}/passwd | wc -l` = 0 ]; then
85    %{_sbindir}/useradd -M -r -g ndtpgrp -d %{_localstatedir}/ndtpd \
86     -s "" -c "ndtpd" ndtpuser || :
87fi
88
89%post
90if [ -x /sbin/install-info ]; then
91    for i in $(ls %{_infodir}/ndtpd*); do
92        /sbin/install-info --info-dir=%{_infodir} $i
93    done
94fi
95if [ -x /bin/grep -a -f /etc/services ] ; then
96    grep -q "^ndtp" /etc/services || \
97        echo "ndtp          2010/tcp       # added by ndtpd RPM" >>  /etc/services
98fi
99
100if [ -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`
104fi
105
106if [ -x /bin/grep -a -f /etc/inetd.conf ] ; then
107    grep -q "ndtp" /etc/inetd.conf || \
108        echo "#ndtp    stream  tcp     nowait  root    /usr/sbin/ndtpd   ndtpd --inetd" >>  /etc/inetd.conf
109fi
110#kill -HUP `/sbin/pidof inetd`
111if [ -x /bin/grep -a -f /etc/hosts.allow ] ; then
112    grep -q "ndtp" /etc/hosts.allow || \
113        echo "ndtp: 127.0.0.1 : allow" >>  /etc/hosts.allow
114fi
115
116#[ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \
117#/sbin/chkconfig --add ndtpd
118
119if [ -f %{_localstatedir}/ndtpd/ndtpd.pid -a -x %{_initdir}/ndtpd ]; then
120        %{_initdir}/ndtpd restart
121fi
122
123%preun
124if [ $1 = 0 ]; then
125  if [ -x /sbin/install-info ]; then
126      for i in $(ls %{_infodir}/ndtpd*); do
127          /sbin/install-info --delete --info-dir=%{_infodir} $i
128      done
129  fi
130  [ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \
131      /sbin/chkconfig --del ndtpd
132  ls %{_localstatedir}/ndtpd/log/* &> /dev/null && \
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`
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
163fi
164:
165
166%postun
167if [ $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
174fi
175
176%files
177%defattr(-,root,root)
178%doc AUTHORS COPYING ChangeLog* NEWS README README-ja UPGRADE UPGRADE-ja
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
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
199* Sun Jan  2 2011 IWAI, Masaharu <iwai@alib.jp> 3.1.5-4
200- build with eb 4.4.3
201
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
Note: See TracBrowser for help on using the repository browser.