A new user interface for you!

File ganymed-ssh2.spec of Package ganymed-ssh2

%define gcj_support     0

Name:           ganymed-ssh2
Version:        210
Release:        8%{?dist}
Summary:        SSH-2 protocol implementation in pure Java

Group:          Development/Tools
License:        BSD
URL:            http://www.ganymed.ethz.ch/ssh2/
Source0:        http://www.ganymed.ethz.ch/ssh2/ganymed-ssh2-build%{version}.zip
Source1:        build.xml
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:	jpackage-utils >= 0:1.6
BuildRequires:	coreutils unzip ant ant-nodeps
%if %{gcj_support}
BuildRequires:		gcc-java >= 4.0.2
BuildRequires:		java-gcj-compat-devel >= 1.0.33
Requires(post):		java-gcj-compat >= 1.0.33
Requires(postun):	java-gcj-compat >= 1.0.33
BuildRequires:		java-devel >= 1.4.2

%if %{gcj_support}
#ExclusiveArch:		%{ix86} x86_64 ppc ia64
BuildArch:		noarch

Ganymed SSH-2 for Java is a library which implements the SSH-2 protocol in pure
Java (tested on J2SE 1.4.2 and 5.0). It allows one to connect to SSH servers
from within Java programs. It supports SSH sessions (remote command execution
and shell access), local and remote port forwarding, local stream forwarding,
X11 forwarding and SCP. There are no dependencies on any JCE provider, as all
crypto functionality is included.

%package javadoc
Summary:        Javadoc for ganymed-ssh2
Group:          Development/Documentation

%description javadoc
Javadoc for ganymed-ssh2.

%setup -q -n %{name}-build%{version}

# delete the jars that are in the archive
rm %{name}-build%{version}.jar

# fixing wrong-file-end-of-line-encoding warnings
sed -i 's/\r//' LICENSE.txt README.txt HISTORY.txt faq/FAQ.html
find examples -name \*.java -exec sed -i 's/\r//' {} \;

cp %{S:1} .

jar -cf %{name}.jar -C bin ch

# Link source files to fix -debuginfo generation.
rm -f ch
ln -s src/ch


# jar
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 %{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar

# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr javadoc/* \

# gcj support
%if %{gcj_support}

pushd $RPM_BUILD_ROOT%{_javadir}/
ln -s %{name}-%{version}.jar %{name}.jar


%if %{gcj_support}
%post -p %{_bindir}/rebuild-gcj-db
%postun -p %{_bindir}/rebuild-gcj-db

%doc LICENSE.txt HISTORY.txt README.txt faq examples

%if %{gcj_support}

%files javadoc

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 210-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 210-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 210-6
- Autorebuild for GCC 4.3

* Mon Sep 10 2007 Robert Marcano <robert@marcanoonline.com> 210-5
- Build for all supported arquitectures 

* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 210-4
- Rebuild for selinux ppc32 issue.

* Tue Oct 10 2006 Robert Marcano <robert@marcanoonline.com> 210-2
- Update to upstream release 210

* Sun Aug 27 2006 Robert Marcano <robert@marcanoonline.com> 209-6
- Rebuild

* Fri Jul 28 2006 Robert Marcano <robert@marcanoonline.com> 209-5
- Rebuilt to pick up the changes in GCJ (bug #200480)

* Sun Jun 25 2006 Robert Marcano <robert@marcanoonline.com> 209-4
- created javadoc package
- renamed to ganymed-ssh2

* Sun Jun 11 2006 Robert Marcano <robert@marcanoonline.com> 209-3
- rpmlint fixes and debuginfo generation workaround
- doc files added

* Sun May 28 2006 Robert Marcano <robert@marcanoonline.com> 209-2
- review updates

* Sun May 07 2006 Robert Marcano <robert@marcanoonline.com> 209-1
- initial version