File asm.spec of Package asm

# spec file for package asm (Version 1.5.3)
# Copyright (c) 2009 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

# norootforbuild
# icecream 0

Name:           asm
BuildRequires:  ant java2-devel-packages objectweb-anttask xml-commons-apis
%define section	free
Version:        1.5.3
Release:        268
Summary:        Java bytecode manipulation framework
License:        BSD 3-Clause
Group:          Development/Libraries/Java
Patch:          %{name}-java14compat.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

ASM is a Java bytecode manipulation framework.

It can be used to dynamically generate stub classes or other proxy
classes, directly in binary form, or to dynamically modify classes at
load time, i.e., just before they are loaded into the Java Virtual

ASM offers similar functionalities as BCEL or SERP, but is much

%package	javadoc
License:        BSD 3-Clause
PreReq:         coreutils
Summary:        Java bytecode manipulation framework (documentation)
Group:          Development/Libraries/Java

%description	javadoc
Javadoc for asm.

%setup -q -n %{name}-%{version}
find . -name "*.jar" -exec rm -f {} \;
install -m 644 %{SOURCE1} .
install -m 644 %{SOURCE2} .

ant -Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask) jar jdoc

# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
for jar in output/dist/lib/*.jar; do
install -m 644 ${jar} \
$RPM_BUILD_ROOT%{_javadir}/%{name}/`basename ${jar}`
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -p -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr output/dist/doc/javadoc/user/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
(cd $RPM_BUILD_ROOT%{_javadocdir} && ln -sf %{name}-%{version} %{name})


%post javadoc
rm -f %{_javadocdir}/%{name}
ln -s %{name}-%{version} %{_javadocdir}/%{name}

%postun javadoc
if [ $1 -eq 0 ]; then
  rm -f %{_javadocdir}/%{name}

%doc README.txt faq.html asm-eng.pdf
%dir %{_javadir}/%{name}

%files javadoc
%dir %{_javadocdir}/%{name}-%{version}
%ghost %dir %{_javadocdir}/%{name}

* Fri Sep 22 2006
- don't use icecream
- use source="1.4" and target="1.4" for build with java 1.5
* Wed Jan 25 2006
- converted neededforbuild to BuildRequires
* Mon Oct 17 2005
- Current version 1.5.3 from
openSUSE Build Service is sponsored by