jsch/jsch.spec

158 lines
4.1 KiB
RPMSpec
Raw Normal View History

%define section free
%define gcj_support 1
ExclusiveArch: i386 x86_64 ppc
Name: jsch
Version: 0.1.18
Release: 1jpp_1fc
Epoch: 0
Summary: Pure Java implementation of SSH2
Group: Development/Libraries/Java
License: BSD-style
URL: http://www.jcraft.com/jsch/
Source0: http://download.sourceforge.net/sourceforge/jsch/jsch-%{version}.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: jpackage-utils >= 0:1.5
BuildRequires: java-devel >= 1.4.2
BuildRequires: jzlib >= 0:1.0.5
%if %{gcj_support}
BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_14rh
Requires(post,postun): java-1.4.2-gcj-compat
%endif
Requires: jzlib >= 0:1.0.5
%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: Javadoc for %{name}
Group: Development/Documentation
%description javadoc
%{summary}.
%package demo
Summary: Examples for %{name}
Group: Development/Documentation
%description demo
%{summary}.
%prep
%setup -q
%build
export CLASSPATH=$(build-classpath jzlib)
ant dist javadoc
%if %{gcj_support}
find-and-aot-compile . "-fPIC"
%endif
%install
# jars
rm -rf $RPM_BUILD_ROOT
install -Dpm 644 dist/lib/%{name}-*.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
%if %{gcj_support}
install -dm 755 $RPM_BUILD_ROOT%{_libdir}
install -pm 755 dist/lib/lib%{name}-*.jar.so \
$RPM_BUILD_ROOT%{_libdir}/lib%{name}-%{version}.jar.so
ln -s lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.jar.so
gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
mkdir -p $gcjdbdir
gcj-dbtool -n $gcjdbdir/%{name}.db 100
gcj-dbtool -f $gcjdbdir/%{name}.db $RPM_BUILD_ROOT%{_javadir}/%{name}.jar \
%{_libdir}/lib%{name}.jar.so
%endif
# javadoc
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
# examples
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
cp -pr examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name} # ghost symlink
%clean
rm -rf $RPM_BUILD_ROOT
%if %{gcj_support}
%post
/usr/bin/rebuild-gcj-db %{_libdir}
%postun
/usr/bin/rebuild-gcj-db %{_libdir}
%endif
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%post demo
rm -f %{_datadir}/%{name}
ln -s %{name}-%{version} %{_datadir}/%{name}
%files
%defattr(-,root,root,-)
%{_javadir}/*.jar
%doc LICENSE.txt
%if %{gcj_support}
%{_libdir}/gcj-4.0.0/classmap.db.d/%{name}.db
%{_libdir}/lib%{name}-%{version}.jar.so
%{_libdir}/lib%{name}.jar.so
%endif
%files javadoc
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %doc %{_javadocdir}/%{name}
%files demo
%defattr(-,root,root,-)
%doc %{_datadir}/%{name}-%{version}
%ghost %doc %{_datadir}/%{name}
%changelog
* Fri Apr 22 2005 Andrew Overholt <overholt@redhat.com> 0.1.18-1jpp_1fc
- Build into Fedora.
- Natively-compile.
* Fri Apr 22 2005 Fernando Nasser <fnasser@redhat.com> 0:0.1.18-1jpp_1rh
- Merge with upstream for 0.1.18 upgrade
* Fri Apr 22 2005 Fernando Nasser <fnasser@redhat.com> 0:0.1.18-1jpp
- 0.1.18
2005-03-18 15:59:37 +00:00
* Fri Mar 18 2005 Andrew Overholt <overholt@redhat.com> 0.1.17-2jpp_1fc
- Build into Fedora.
2005-03-18 16:10:51 +00:00
- Remove Distribution and Vendor tags.
- Add BuildRequires: java-devel for javadoc requirement.
2005-03-18 15:59:37 +00:00
* Tue Nov 02 2004 David Walluck <david@jpackage.org> 0:0.1.17-2jpp
- rebuild with jdk 1.4.2
* Tue Oct 19 2004 David Walluck <david@jpackage.org> 0:0.1.17-1jpp
- 0.1.17
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:0.1.13-2jpp
- Rebuild with ant-1.6.2
* Sat Feb 14 2004 David Walluck <david@anti-microsoft.org> 0:0.1.13-1jpp
- 0.1.13
* Wed Jan 14 2004 Ralph Apel <r.apel@r-apel.de> - 0:0.1.12-1jpp
- First JPackage build.