jsch/jsch.spec

106 lines
3.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package jsch
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define section free
Name: jsch
Version: 0.1.50
Release: 0
Summary: Pure Java implementation of SSH2
License: BSD-3-Clause
Group: Development/Libraries/Java
Url: http://www.jcraft.com/jsch/
Source0: http://downloads.sourceforge.net/sourceforge/jsch/jsch-%{version}.zip
Requires: jzlib
BuildRequires: ant
BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: jzlib
BuildRequires: unzip
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
JSch allows you to connect to an sshd server and use port forwarding,
X11 forwarding, file transfer, etc., and you can integrate its
functionality into your own Java programs.
%package javadoc
Summary: Pure Java implementation of SSH2
Group: Development/Libraries/Java
%description javadoc
JSch allows you to connect to an sshd server and use port forwarding,
X11 forwarding, file transfer, etc., and you can integrate its
functionality into your own Java programs.
%package demo
Summary: Pure Java implementation of SSH2
Group: Development/Libraries/Java
%description demo
JSch allows you to connect to an sshd server and use port forwarding,
X11 forwarding, file transfer, etc., and you can integrate its
functionality into your own Java programs.
%prep
%setup -q
%build
export CLASSPATH=$(build-classpath jzlib)
export OPT_JAR_LIST=:
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 dist javadoc
%install
# jars
install -Dpm 644 dist/lib/%{name}-*.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
# examples
install -dm 755 %{buildroot}%{_datadir}/%{name}
cp -pr examples/* %{buildroot}%{_datadir}/%{name}
%clean
rm -rf %{buildroot}
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}
%changelog