|
@@ -2,18 +2,24 @@ Summary: Server for accessing CD-ROM books with NDTP
|
|
|
Summary(ja): NDTP を用いた CD-ROM 書籍をアクセスするためのサーバ
|
|
|
Name: ndtpd
|
|
|
Version: 3.1.5
|
|
|
-Release: 4%{?_dist_release}
|
|
|
+Release: 5%{?_dist_release}
|
|
|
License: GPLv2
|
|
|
-Group: System Environment/Daemons
|
|
|
+Group: Applications/Services
|
|
|
+URL: http://www.sra.co.jp/people/m-kasahr/ndtpd/
|
|
|
+
|
|
|
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
|
|
|
+Requires: eb >= 3.3
|
|
|
+Requires: rsyslog
|
|
|
+BuildRequires: eb-devel >= 3.3
|
|
|
BuildRequires: zlib-devel
|
|
|
+BuildRequires: nkf
|
|
|
+Requires(pre): grep shadow-utils
|
|
|
Requires(post): grep /sbin/install-info
|
|
|
Requires(preun): grep /sbin/install-info /sbin/chkconfig
|
|
|
+Requires(postun): grep shadow-utils
|
|
|
|
|
|
Distribution: Vine Linux
|
|
|
Vendor: Project Vine
|
|
@@ -43,6 +49,11 @@ EBXA, EBXA-C, S-EBXA および EPWING 形式の CD-ROM 書籍に対応してい
|
|
|
%prep
|
|
|
%setup -q
|
|
|
|
|
|
+mv README-ja README-ja.old
|
|
|
+mv UPGRADE-ja UPGRADE-ja.old
|
|
|
+nkf -w README-ja.old > README-ja
|
|
|
+nkf -w UPGRADE-ja.old > UPGRADE-ja
|
|
|
+
|
|
|
%build
|
|
|
./configure --prefix=%{_prefix} \
|
|
|
--sysconfdir=%{ndtpdconfdir} \
|
|
@@ -68,38 +79,38 @@ rm -rf %{buildroot}
|
|
|
|
|
|
%pre
|
|
|
if [ `grep ndtpgrp %{_sysconfdir}/group | wc -l` = 0 ]; then
|
|
|
- %{_sbindir}/groupadd ndtpgrp
|
|
|
+ %{_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 || :
|
|
|
+ %{_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
|
|
|
+ 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
|
|
|
+ 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
|
|
|
+if [ -x /bin/grep -a -f /etc/rsyslog.conf ] ; then
|
|
|
+ grep -q "ndtpd" /etc/rsyslog.conf || \
|
|
|
+ echo "local0.info %{_localstatedir}/ndtpd/log/ndtpd.log" >> /etc/rsyslog.conf
|
|
|
+ kill -HUP `/sbin/pidof rsyslogd`
|
|
|
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
|
|
|
+ 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
|
|
|
+ grep -q "ndtp" /etc/hosts.allow || \
|
|
|
+ echo "ndtp: 127.0.0.1 : allow" >> /etc/hosts.allow
|
|
|
fi
|
|
|
|
|
|
#[ -x /sbin/chkconfig -a -x %{_initdir}/ndtpd ] && \
|
|
@@ -112,19 +123,20 @@ 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
|
|
|
+ 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
|
|
|
+ /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`
|
|
|
+ rm -f %{_localstatedir}/ndtpd/log/*
|
|
|
+
|
|
|
+ if [ -x /bin/grep -a -f /etc/rsyslog.conf ] ; then
|
|
|
+ if grep -q "ndtpd" /etc/rsyslog.conf ; then
|
|
|
+ grep -v "ndtpd" /etc/rsyslog.conf > /etc/rsyslog.new && \
|
|
|
+ mv -f /etc/rsyslog.new /etc/rsyslog.conf
|
|
|
+ kill -HUP `/sbin/pidof rsyslogd`
|
|
|
fi
|
|
|
fi
|
|
|
|
|
@@ -163,6 +175,7 @@ fi
|
|
|
|
|
|
%files
|
|
|
%defattr(-,root,root)
|
|
|
+%doc AUTHORS COPYING ChangeLog* NEWS README README-ja UPGRADE UPGRADE-ja
|
|
|
%config %{ndtpdconfdir}/ndtpd.conf.sample
|
|
|
%{_infodir}/ndtpd-ja.info*
|
|
|
%{_infodir}/ndtpd.info*
|
|
@@ -174,9 +187,15 @@ fi
|
|
|
%{_sbindir}/ndtpupgrade
|
|
|
%{_initdir}/ndtpd
|
|
|
%attr(-,ndtpuser,ndtpgrp) %{_localstatedir}/ndtpd
|
|
|
-%doc AUTHORS COPYING ChangeLog* INSTALL INSTALL-ja NEWS README README-ja UPGRADE UPGRADE-ja
|
|
|
|
|
|
%changelog
|
|
|
+* Thu Jan 29 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 3.1.5-5
|
|
|
+- rebuilt on current VineSeed
|
|
|
+- moved to Applications/Services Group
|
|
|
+- fixed README-ja, UPGRADE-ja encoding
|
|
|
+- updated %%post and %%preun script for rsyslog
|
|
|
+- added Requires: rsyslog
|
|
|
+
|
|
|
* Sun Jan 2 2011 IWAI, Masaharu <iwai@alib.jp> 3.1.5-4
|
|
|
- build with eb 4.4.3
|
|
|
|