Summary: Maintains identical copies of files on multiple machines.
Summary(ja): 複数のマシン上で同一ファイルのコピーを保持するプログラム
Name: rdist
Version: 6.1.5
Release: 45%{?_dist_release}
Epoch: 1
License: BSD
Group: Applications/System
Source0: http://www.MagniComp.com/download/rdist/rdist-%{version}.tar.gz
Source1: http://www.magnicomp.com/rdist/rdist-eu-license.txt
Source2: http://people.redhat.com/pknirsch/src/rdist-v1.1.tar.bz2
Patch0: rdist-6.1.5-linux.patch
Patch1: rdist-6.1.5-links.patch
Patch2: rdist-6.1.5-oldpath.patch
Patch3: rdist-6.1.5-hardlink.patch
Patch4: rdist-6.1.5-bison.patch
Patch5: rdist-6.1.5-varargs.patch
Patch6: rdist-6.1.5-maxargs.patch
Patch7: rdist-6.1.5-lfs.patch
Patch8: rdist-6.1.5-cleanup.patch
Patch9: rdist-6.1.5-svr4.patch
Patch10: rdist-6.1.5-ssh.patch
Patch11: rdist-6.1.5-mkstemp.patch
Patch12: rdist-6.1.5-stat64.patch
Patch13: rdist-6.1.5-re_args.patch
Patch14: rdist-6.1.5-fix-msgsndnotify-loop.patch
URL: http://www.MagniComp.comA/rdist
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: byacc bison

%description
The RDist program maintains identical copies of files on multiple
hosts.  If possible, RDist will preserve the owner, group, mode and
mtime of files and it can update programs that are executing.

Install rdist if you need to maintain identical copies of files on
multiple hosts.

%description -l ja
rdist プログラムは複数のホスト上に同一ファイルのコピーを保持します．
可能であれば rdist はファイルのオーナー，グループ，モードや mtime も
オリジナルのままにしようとします．現在実行中のプログラムの
アップデートも可能です．

複数のホスト上で同一ファイルのコピーを保持したい場合は
rdist をインストールして下さい．


%prep
%setup -q
%setup -q -T -D -a 2

cp %{SOURCE1} .

%patch0 -p1 -b .linux
%patch1 -p1 -b .links
%patch2 -p1 -b .oldpath
%patch3 -p1 -b .hardlink
%patch4 -p1 -b .bison
%patch5 -p1 -b .varargs
%patch6 -p1 -b .maxargs
%patch7 -p1 -b .lfs
%patch8 -p1 -b .cleanup
%patch9 -p1 -b .svr4
%patch10 -p1 -b .ssh
%patch11 -p1 -b .mkstemp
%patch12 -p1 -b .stat64
%patch13 -p1 -b .re_args
%patch14 -p1 -b .fix-msgsndnotify-loop

%build
make
make -C rdist

%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,8}

install -m755 src/rdist ${RPM_BUILD_ROOT}%{_bindir}
install -m755 rdist/rdist ${RPM_BUILD_ROOT}%{_bindir}/oldrdist
install -m755 src/rdistd ${RPM_BUILD_ROOT}%{_sbindir}
ln -sf ../sbin/rdistd ${RPM_BUILD_ROOT}%{_bindir}/rdistd

install -m644 doc/rdist.man ${RPM_BUILD_ROOT}%{_mandir}/man1/rdist.1
install -m644 doc/rdistd.man ${RPM_BUILD_ROOT}%{_mandir}/man8/rdist.8


%clean
rm -rf ${RPM_BUILD_ROOT}


%files
%defattr(-,root,root)
%doc README rdist-eu-license.txt
%{_bindir}/rdist
%{_bindir}/oldrdist
%{_bindir}/rdistd
%{_sbindir}/rdistd
%{_mandir}/man1/rdist.1*
%{_mandir}/man8/rdist.8*


%changelog
* Sat Nov 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.1.5-45vl5
- applied new versioning policy
- spec in UTF-8
- based on 6.1.5-45 from Fedora
  * Wed Aug 02 2006 Phil Knirsch <pknirsch@redhat.com> 1:6.1.5-44
  - Fixed problem with memory leak (#192229)
  * Wed May 04 2005 Phil Knirsch <pknirsch@redhat.com> 6.1.5-41
  - Fixed incorrect use of statfs return values (#147481)

* Sun Oct  3 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.1.5-38vl1
- based on 6.1.5-38 from Fedora
  * Fri Jul 02 2004 Phil Knirsch <pknirsch@redhat.com> 6.1.5-38
  - Added byacc to BuildPreReq (#124939)
  * Tue May 25 2004 Phil Knirsch <pknirsch@redhat.com> 6.1.5-35.21.1
  - Fixed missing unlink() for mkstemp() created file (#123833).
  * Mon Jan 12 2004 Phil Knirsch <pknirsch@redhat.com> 6.1.5-32
  - Included missing dir patch for mkstemp change (#106728).
  * Wed Dec 17 2003 Phil Knirsch <pknirsch@redhat.com> 6.1.5-31
  - Fixed wrong SvR4 system detection on Linux (#110426).
  - Fixed unitialized use of struct (#111189).
  - Make rsh work correctly with password authentification and ssh (#111778).
  * Tue Dec 16 2003 Phil Knirsch <pknirsch@redhat.com>
  - Finished LFS support for rdist on 32bit archs (#79580).
  - Lots of code cleanup.
  - Switched from mktemp to mkstemp usage.
  * Thu Sep 04 2003 Phil Knirsch <pknirsch@redhat.com> 6.1.5-30
  - Fixed max. # of args (#85634).

* Sun Jul 20 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 6.1.5-29.1vl1
- rebuilt with new toolchains
- based on 6.1.5-29.1 from Rawhide
  - Tue Jun 17 2003 Phil Knirsch <pknirsch@redhat.com> 1:6.1.5-29
  - use stdarg.h instead of varargs.h.

  - Wed Jun 04 2003 Phil Knirsch <pknirsch@redhat.com> 1:6.1.5-27
  - Fixed new bison build problems.
  - Changed Copyright to License.

  - Thu Jun 20 2002 Phil Knirsch <pknirsch@redhat.com> 6.1.5-21
  - Include ia64 again.

  - Thu Jan 31 2002 Phil Knirsch <pknirsch@redhat.com>
  - Added my 4.3BSD port of the v1 protocol rdist code and provide a oldrdist
    binary (#55761 and several others).
  - Fixed a small manpage problem (#55489)

* Wed Jan 10 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 6.1.5-14vl1
- based on 6.1.5-14 from Rawhide
- added Japanese summary and description

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Sun Jun 18 2000 Jeff Johnson <jbj@redhat.com>
- FHS packaging.
- exclude ia64 for now.

* Sat Feb 05 2000 Cristian Gafton <gafton@redhat.com>
- include new license package
- man pages are compressed
- fix description

* Tue Jul 20 1999 Jeff Johnson <jbj@redhat.com>
- re-release latest rdist package.

* Thu Jun  3 1999 Jeff Johnson <jbj@redhat.com>
- permit rdist to distribute hard links (#3228)

* Tue Apr 13 1999 Jeff Johnson <jbj@redhat.com>
- add /usr/bin/rdistd symlink (#2154)
- update docs to reflect /usr/bin/oldrdist change.

* Mon Apr 12 1999 Jeff Johnson <jbj@redhat.com>
- use /usr/bin/oldrdist for old rdist compatibility path (#2044).

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 5)

* Wed Feb 17 1999 Jeff Johnson <jbj@redhat.com>
- dynamic allocation for link info (#1046)

* Thu Nov 12 1998 Jeff Johnson <jbj@redhat.com>
- update to 6.1.5

* Sun Aug 16 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Tue May 05 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Mon Oct 20 1997 Otto Hammersmith <otto@redhat.com>
- fixed the url to the source
- fixed the copyright field

* Mon Jul 21 1997 Erik Troan <ewt@redhat.com>
- built against glibc
