File cryptix-asn1.spec of Package cryptix-asn1

#
# spec file for package cryptix-asn1 (Version 20011119)
#
# 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:           cryptix-asn1
BuildRequires:  ant cryptix java2-devel-packages xml-commons-apis
%define pname		Cryptix-asn1
%define name		cryptix-asn1
%define version		20011119
%define snapshot	20011119
%define release		5jpp
%define section		free
Version:        20011119
Release:        23
Summary:        Cryptix ASN1 Implementation
License:        BSD
Group:          Development/Libraries/Java
URL:            http://www.cryptix.org/
Source0:        %{pname}-%{snapshot}.tar.gz
Source1:        %{name}.build.script
Requires:       cryptix
BuildArch:	noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Java asn1 implementation for Cryptix.



%package javadoc
PreReq:         coreutils
Group:          Development/Libraries/Java
Summary:        Javadoc for cryptix-asn1

%description javadoc
Javadoc documentation for the asn1 implementation for Cryptix.



%prep
%setup -n %{pname}-%{snapshot}
cp %{SOURCE1} build.xml
# remove all binary libs
rm -fr $(find . -name "*.jar")

%build
if ! grep -q "javac.*source=" build.xml ; then
  perl -p -i -e 's|<javac |<javac source=\"1.4\" |' build.xml
  perl -p -i -e 's|<javadoc |<javadoc source=\"1.4\" |' build.xml
fi
ant clean jar javadoc

%install
# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 build/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc cryptix/asn1/docs/*
%{_javadir}/*.jar

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

%changelog -n cryptix-asn1
* Fri Sep 15 2006 - ro@suse.de
- set source=1.4 for java
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Jul 27 2005 - jsmeix@suse.de
- Adjustments in the spec file.
* Mon Jul 18 2005 - jsmeix@suse.de
- Current version 20011119 from JPackage.org
* Thu Sep 02 2004 - skh@suse.de
- Initial package created with version 20011119 (JPackage 1.5)
openSUSE Build Service is sponsored by