File puretls.spec of Package puretls
#
# spec file for package puretls (Version 0.9)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: puretls
BuildRequires: ant cryptix-asn1 gnu-getopt java2-devel-packages xml-commons-apis
%define name puretls
%define rversion 0.9
%define beta b5
%define release 0.%{beta}.2jpp
%define section free
Version: 0.9
Release: 29
Summary: Java implementation of SSLv3 and TLSv1
License: BSD
Group: Development/Libraries/Java
Source0: %{name}-%{rversion}%{beta}.tar.bz2
Patch150: java150_build.patch
URL: http://www.rtfm.com/puretls
Requires: cryptix
Requires: cryptix-asn1
Buildarch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
PureTLS is a free Java-only implementation of the SSLv3 and TLSv1
(RFC2246) protocols. PureTLS was developed by Eric Rescorla for
Claymore Systems, Inc, but is being distributed for free because we
believe that basic network security is a public good and should be a
commodity.
%package javadoc
PreReq: coreutils
Group: Development/Libraries/Java
Summary: Javadoc for puretls
%description javadoc
This package contains the javadoc documentation for PureTLS.
PureTLS is a free Java-only implementation of the SSLv3 and TLSv1
(RFC2246) protocols. PureTLS was developed by Eric Rescorla for
Claymore Systems, Inc, but is being distributed for free because we
believe that basic network security is a public good and should be a
commodity.
%package demo
Group: Development/Libraries/Java
Summary: Demonstration and samples for puretls
Requires: %{name}
%description demo
This package contains demonstration and sample files for PureTLS.
PureTLS is a free Java-only implementation of the SSLv3 and TLSv1
(RFC2246) protocols. PureTLS was developed by Eric Rescorla for
Claymore Systems, Inc, but is being distributed for free because we
believe that basic network security is a public good and should be a
commodity.
%prep
%setup -q -n %{name}-%{rversion}%{beta}
# fix perl location
find . -type f |
xargs grep -l "/usr/local/bin/perl5" | \
xargs perl -pi -e "s|/usr/local/bin/perl5|%{_bindir}/perl|g;"
find . -type f |
xargs grep -l "/usr/local/bin/perl" | \
xargs perl -pi -e "s|/usr/local/bin/perl|%{_bindir}/perl|g;"
# remove all binary libs
find . -name "*.jar" -exec rm -f {} \;
find . -name "*.class" -exec rm -f {} \;
%patch150 -p1
%build
mkdir dist
for javaver in 1.4 ; do
export JAVA_HOME=$(find /usr/lib/jvm -name "java-$javaver*" -type d | sort | tail -1)
export CLASSPATH=$(build-classpath cryptix cryptix-asn1 gnu.getopt)
ant -Djdk.version=$javaver clean compile
mv build/%{name}.jar dist/%{name}$javaver.jar
done
ant javadoc
%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}-ext
install -m 644 dist/%{name}1.4.jar $RPM_BUILD_ROOT%{_javadir}-ext/%{name}1.4-%{version}.%{beta}.jar
%add_jvm_extension %{name}1.4-%{version}.%{beta} %{name} 1.4.0 1.4.1 1.4.2 1.5.0
%add_jvm_extension %{name}1.4-%{version}.%{beta} %{name}-%{version}.%{beta} 1.4.0 1.4.1 1.4.2 1.5.0
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -r build/doc/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
# data
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m 644 build/%{name}demo.jar $RPM_BUILD_ROOT%{_datadir}/%{name}/%{name}-demo.jar
install -m 644 *.pem $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m 755 test.pl $RPM_BUILD_ROOT%{_datadir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}
%postun javadoc
if [ "$1" = "0" ]; then
rm -f %{_javadocdir}/%{name}
fi
%files
%defattr(-,root,root)
%doc ChangeLog COPYRIGHT INSTALL LICENSE README
#%dir %{_javadir}/java-1.50
%{_javadir}-*/*.jar
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/%{name}-%{version}
%files demo
%defattr(-,root,root)
%{_datadir}/%{name}
%changelog -n puretls
* Mon Sep 25 2006 - dbornkessel@suse.de
- fixes necessary to compile with Java 1.5.0
- set source="1.4" and target="1.4" for ant "javac" tasks
- set source="1.4" for ant "javadoc" tasks
* Wed Sep 20 2006 - dbornkessel@suse.de
- update to 0.9b5
- added 1.5.0 links
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Aug 04 2005 - jsmeix@suse.de
- Fix the "fix perl location" ( /%%{_bindir} -> %%{_bindir} ).
Otherwise puretls-demo requires //usr/bin/perl (bug 100612).
* Fri Jul 29 2005 - jsmeix@suse.de
- Adjustments in the spec file.
* Tue Jul 26 2005 - ro@suse.de
- fix typo in specfile
* Mon Jul 18 2005 - jsmeix@suse.de
- Current version 0.9 from JPackage.org
* Thu Sep 16 2004 - skh@suse.de
- Fix prerequires of javadoc subpackage
* Wed Sep 08 2004 - skh@suse.de
- Fix regexp to correct perl location in scripts in %%prep
* Sat Sep 04 2004 - skh@suse.de
- fixed neededforbuild (gnu.getopt -> gnu-getopt)
* Thu Sep 02 2004 - skh@suse.de
- Initial package created with version 0.9 (JPackage 1.5)