File asm.spec of Package asm

# spec file for package asm
# Copyright (c) 2017 SUSE LINUX 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

Name:           asm
Version:        1.5.3
Release:        0
Summary:        Java bytecode manipulation framework
License:        BSD-3-Clause
Group:          Development/Libraries/Java
Patch0:         %{name}-java16compat.patch
BuildRequires:  ant
BuildRequires:  objectweb-anttask
BuildRequires:  xml-commons-apis
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

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
Summary:        Java bytecode manipulation framework (documentation)
Group:          Development/Libraries/Java

%description	javadoc
Javadoc for asm.

%setup -q
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 %{buildroot}%{_javadir}/%{name}
for jar in output/dist/lib/*.jar; do
install -m 644 ${jar} \
%{buildroot}%{_javadir}/%{name}/`basename ${jar}`
(cd %{buildroot}%{_javadir}/%{name} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)
# javadoc
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr output/dist/doc/javadoc/user/* %{buildroot}%{_javadocdir}/%{name}

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

%files javadoc
%dir %{_javadocdir}/%{name}

openSUSE Build Service is sponsored by