Build on ia64, ppc64, s390 and s390x

This commit is contained in:
gbenson 2005-07-15 13:47:43 +00:00
parent 03cb5370d3
commit 44338f4424

View File

@ -1,10 +1,9 @@
%define section free
%define gcj_support 1
ExclusiveArch: i386 x86_64 ppc
Name: jsch
Version: 0.1.18
Release: 1jpp_1fc
Release: 1jpp_2fc
Epoch: 0
Summary: Pure Java implementation of SSH2
Group: Development/Libraries/Java
@ -17,8 +16,9 @@ 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
BuildRequires: java-gcj-compat-devel >= 1.0.31
Requires(post): java-gcj-compat >= 1.0.31
Requires(postun): java-gcj-compat >= 1.0.31
%endif
Requires: jzlib >= 0:1.0.5
@ -49,10 +49,6 @@ Group: Development/Documentation
export CLASSPATH=$(build-classpath jzlib)
ant dist javadoc
%if %{gcj_support}
find-and-aot-compile . "-fPIC"
%endif
%install
# jars
rm -rf $RPM_BUILD_ROOT
@ -60,19 +56,6 @@ 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}
@ -83,16 +66,20 @@ 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
%if %{gcj_support}
aot-compile-rpm
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%if %{gcj_support}
%post
/usr/bin/rebuild-gcj-db %{_libdir}
%{_bindir}/rebuild-gcj-db
%postun
/usr/bin/rebuild-gcj-db %{_libdir}
%{_bindir}/rebuild-gcj-db
%endif
%post javadoc
@ -109,9 +96,7 @@ ln -s %{name}-%{version} %{_datadir}/%{name}
%{_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
%attr(-,root,root) %{_libdir}/gcj/%{name}
%endif
%files javadoc
@ -126,6 +111,10 @@ ln -s %{name}-%{version} %{_datadir}/%{name}
%changelog
* Fri Jul 15 2005 Gary Benson <gbenson@redhat.com> 0.1.18-1jpp_2fc
- Build on ia64, ppc64, s390 and s390x.
- Switch to aot-compile-rpm.
* Fri Apr 22 2005 Andrew Overholt <overholt@redhat.com> 0.1.18-1jpp_1fc
- Build into Fedora.
- Natively-compile.