%define name zebedee
%define version 2.4.1A
%define release 1%{?_dist_release}

Summary: A simple, free, secure tunnel program
Name: %{name}
Version: %{version}
Release: %{release}
URL: http://www.winton.org.uk/zebedee/
Source: http://www.winton.org.uk/zebedee/%{name}-%{version}.tar.gz
Source1: ftpgw.tcl.2.1.3
Patch: zebedee-2.4.1A.patch
License: GPL
Group: Applications/Internet
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Summary(ja): 暗号と圧縮を備えたシンプルで安全な TCP/IP, UDP/IP トンネル
BuildPreReq: openssl-devel
BuildPreReq: zlib-devel >= 1.1.4
BuildPreReq: bzip2-devel
BuildPreReq: perl

%description
Zebedee is a simple program to establish an encrypted, compressed 
"tunnel" for TCP/IP or UDP data transfer between two systems. This allows 
traffic such as telnet, ftp and X to be protected from snooping as well as 
potentially gaining performance over low-bandwidth networks from 
compression.

%description -l ja
Zebedee は 2 つのシステム間で暗号化・圧縮された TCP/IP, UDP/IP トンネルを
確立するシンプルなプログラムです。圧縮により低帯域の回線上での通信速度を
改善することはもちろん、telnet, ftp, X や VNC のような TCP, UDP ベースの
トラフィックを盗聴から守ることもできます。

Linux, solaris および Windows 上で動作します。パテントフリーな
暗号アルゴリズムのみを用いていますので、商利用も自由です。

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q
%patch -p1 
cp -f %{SOURCE1} ftpgw.tcl

%build
make OS=linux OPTIM="$RPM_OPT_FLAGS"
cd doc_jp
make

%install
rm -rf $RPM_BUILD_ROOT
make OS=linux ROOTDIR=${RPM_BUILD_ROOT}%{_prefix} MANDIR=${RPM_BUILD_ROOT}%{_mandir}/man1 install
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/ja/man1
install -m 644 doc_jp/zebedee.1 ${RPM_BUILD_ROOT}%{_mandir}/ja/man1
install -m 644 doc_jp/ftpgw.tcl.1 ${RPM_BUILD_ROOT}%{_mandir}/ja/man1

rm -rf $RPM_BUILD_ROOT%{_libdir}/zebedee

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc *.txt *.html *.zbd *.key *.id doc_jp/
%{_bindir}/zebedee
%{_bindir}/ftpgw.tcl
%{_mandir}/man1/zebedee.1*
%{_mandir}/man1/ftpgw.tcl.1*
%{_mandir}/ja/man1/zebedee.1*
%{_mandir}/ja/man1/ftpgw.tcl.1*

%changelog
* Wed Oct 15 2008 Shu KONNO <owa@bg.wakwak.com> 2.4.1A-1vl5
- applied new versioning policy, spec in utf-8

* Sun Jun 17 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.1A-0vl3
- rebuilt with new toolchain

* Fri Aug 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.1A-0vl2
- fixed Group to Applications/Internet

* Thu Aug 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.1A-0vl1
- updated zebedee-2.4.1A
- updated Patch0
- s/Copyright/License/
- changed Group to Applications/Internet

* Tue Jun 04 2002 Satoshi MACHINO <machino@vinelinux.org> 2.4.1-0vl1
- updated zebedee-2.4.1

* Fri May 17 2002 Satoshi MACHINO <machino@vinelinux.org> 2.4.0-0vl1
- updated zebedee-2.4.0
	-- fixed zebedee-2.4.0.patch

* Fri Mar 15 2002 Satoshi MACHINO <machino@vinelinux.org> 2.2.2-0vl1
- updated zebedee-2.2.2
- BuildPreReq: zlib-devel >= 1.1.4

* Mon Jun 18 2001 Satoshi MACHINO <machino@vinelinux.org> 2.2.1-0vl3
- used rpmmacros
- fixed MANDIR

* Sun Mar 18 2001 KAJIKI Yoshihiro <kajiki@ylug.org>
- replace ftpgw.tcl from 2.1.3 to fix 'put problem'

* Tue Feb 13 2001 KAJIKI Yoshihiro <kajiki@ylug.org>
- update to 2.2.1

* Mon Feb 05 2001 KAJIKI Yoshihiro <kajiki@ylug.org>
- update to 2.2.0
- modify spec to suit with 2.2.0

* Tue Jan 30 2001 KAJIKI Yoshihiro <kajiki@ylug.org>
- update to 2.0.1
- modify spec to suit with 2.0.1

* Tue Feb 29 2000 Yoshihiro Kajiki <kajiki@ylug.org>
  - initial creation of RPM
