packages java-ganymed-ssh2.spec
      Pages: < 1 >  DOWNLOAD      
%define        javahome   /usr/lib/jvm/jdk-gcj
Name:          java-ganymed-ssh2
Version:       210
Release:       2mamba
Summary:       Ganymed SSH2 for Java is a library which implements the SSH-2 protocol in pure Java
Group:         Development/Tools
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://www.ganymed.ethz.ch/ssh2/
Source0:       http://www.ganymed.ethz.ch/ssh2/ganymed-ssh2-build%{version}.zip
Source1:       java-ganymed-ssh2-build.xml
Source2:       http://repo1.maven.org/maven2/ch/ethz/ganymed/ganymed-ssh2/build%{version}/ganymed-ssh2-build%{version}.pom
License:       BSD
BuildRequires: apache-ant
BuildRequires: apache-ant-junit
BuildRequires: coreutils
BuildRequires: java-gcj-compat
BuildRequires: java-junit3
BuildRequires: jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Ganymed SSH2 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, SCP and SFTP.
There are no dependencies on any JCE provider, as all crypto functionality is included.

Ganymed SSH2 for Java was first developed for the Ganymed replication project and a
couple of other projects at the IKS group at ETH Zurich. 

%package        javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description    javadoc
Ganymed SSH2 for Java is a library which implements the SSH-2 protocol in pure Java.

This package contains javadoc for %{name}

%prep

%setup -q -n ganymed-ssh2-build%{version}

#for j in $(find . -name "*.jar"); do
#	mv $j $j.no
#done

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} build.xml
mkdir lib

%build
export JAVA_HOME=%javahome
ant jar javadoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
install -m 644 ganymed-ssh2-build%{version}.jar \
  %{buildroot}%{_javadir}/ganymed-ssh2-%{version}.jar

mkdir -p %{buildroot}%{_datadir}/maven2/poms
%add_to_maven_depmap ch.ethz.ganymed ganymed-ssh2 build%{version} JPP ganymed-ssh2
install -pm 644 %{S:1} %{buildroot}%{_datadir}/maven2/poms/JPP-ganymed-ssh2.pom

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}.jar; do 
    ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
  done
)
mkdir -p %{buildroot}%{_javadocdir}/ganymed-ssh2-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/ganymed-ssh2-%{version}
ln -s ganymed-ssh2-%{version} %{buildroot}%{_javadocdir}/ganymed-ssh2

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/ganymed-ssh2-%{version}.jar
%{_javadir}/ganymed-ssh2.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc LICENSE.txt HISTORY.txt README.txt faq examples

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/ganymed-ssh2-%{version}
%{_javadocdir}/ganymed-ssh2

%changelog
* Thu Mar 24 2011 gil <puntogil@...> 210-2mamba
- rebuilt with java-gcj-compat support

* Fri Apr 10 2009 gil <puntogil@...> 210-1mamba
- package created by autospec