c0aa290
# Copyright (c) 2000-2007, JPackage Project
c0aa290
# All rights reserved.
c0aa290
#
c0aa290
# Redistribution and use in source and binary forms, with or without
c0aa290
# modification, are permitted provided that the following conditions
c0aa290
# are met:
c0aa290
#
c0aa290
# 1. Redistributions of source code must retain the above copyright
c0aa290
#    notice, this list of conditions and the following disclaimer.
c0aa290
# 2. Redistributions in binary form must reproduce the above copyright
c0aa290
#    notice, this list of conditions and the following disclaimer in the
c0aa290
#    documentation and/or other materials provided with the
c0aa290
#    distribution.
c0aa290
# 3. Neither the name of the JPackage Project nor the names of its
c0aa290
#    contributors may be used to endorse or promote products derived
c0aa290
#    from this software without specific prior written permission.
c0aa290
#
c0aa290
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
c0aa290
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
c0aa290
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
c0aa290
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
c0aa290
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
c0aa290
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
c0aa290
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
c0aa290
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
c0aa290
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
c0aa290
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
c0aa290
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
c0aa290
#
c0aa290
c0aa290
%define section free
c0aa290
c0aa290
Name:           objectweb-asm
c0aa290
Version:        3.1
c0aa290
Release:        2jpp
c0aa290
Epoch:          0
c0aa290
Summary:        A code manipulation tool to implement adaptable systems
c0aa290
License:        BSD
c0aa290
URL:            http://asm.objectweb.org/
c0aa290
Group:          Development/Libraries/Java
c0aa290
Source0:        http://download.forge.objectweb.org/asm/asm-3.1.tar.gz
c0aa290
c0aa290
BuildRequires:  jpackage-utils >= 0:1.6
c0aa290
BuildRequires:  ant
c0aa290
BuildRequires:  dos2unix
c0aa290
BuildRequires:  objectweb-anttask
c0aa290
BuildRequires:  xml-commons-jaxp-1.3-apis
c0aa290
# Needed by asm-xml.jar
c0aa290
Requires:       xml-commons-jaxp-1.3-apis
c0aa290
c0aa290
BuildArch:      noarch
c0aa290
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
c0aa290
c0aa290
%description
c0aa290
ASM is a code manipulation tool to implement adaptable systems.
c0aa290
c0aa290
%package        javadoc
c0aa290
Summary:        Javadoc for %{name}
c0aa290
Group:          Development/Documentation
c0aa290
c0aa290
%description    javadoc
c0aa290
Javadoc for %{name}.
c0aa290
c0aa290
%prep
c0aa290
%setup -q -n asm-%{version}
c0aa290
find . -name "*.jar" -exec rm -f {} \;
c0aa290
c0aa290
%build
c0aa290
ant -Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask) jar jdoc
c0aa290
c0aa290
%install
c0aa290
rm -rf $RPM_BUILD_ROOT
c0aa290
c0aa290
# jars
c0aa290
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
c0aa290
c0aa290
for jar in output/dist/lib/*.jar; do
c0aa290
install -m 644 ${jar} \
c0aa290
$RPM_BUILD_ROOT%{_javadir}/%{name}/`basename ${jar}`
c0aa290
done
c0aa290
c0aa290
(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do \
c0aa290
ln -sf ${jar} ${jar/-%{version}/}; done)
c0aa290
c0aa290
# javadoc
c0aa290
install -p -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
c0aa290
cp -pr output/dist/doc/javadoc/user/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
c0aa290
c0aa290
#Fix EOL
c0aa290
dos2unix README.txt
c0aa290
dos2unix LICENSE.txt
c0aa290
c0aa290
%clean
c0aa290
rm -rf $RPM_BUILD_ROOT
c0aa290
c0aa290
%files
c0aa290
%defattr(0644,root,root,0755)
c0aa290
%doc README.txt LICENSE.txt
c0aa290
%dir %{_javadir}/%{name}
c0aa290
%{_javadir}/%{name}/*.jar
c0aa290
c0aa290
%files javadoc
c0aa290
%defattr(0644,root,root,0755)
c0aa290
%dir %{_javadocdir}/%{name}-%{version}
c0aa290
%{_javadocdir}/%{name}-%{version}/*
c0aa290
c0aa290
%changelog
c0aa290
* Thu Nov 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.1-2jpp
c0aa290
- Fix EOL of txt files
c0aa290
- Add dependency on jaxp 
c0aa290
c0aa290
* Thu Nov 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.1-1jpp
c0aa290
- Upgrade to 3.1
c0aa290
c0aa290
* Wed Aug 22 2007 Fernando Nasser <fnasser@redhat.com> - 0:3.0-1jpp
c0aa290
- Upgrade to 3.0
c0aa290
- Rename to include objectweb- prefix as requested by ObjectWeb
c0aa290
c0aa290
* Thu Jan 05 2006 Fernando Nasser <fnasser@redhat.com> - 0:2.1-2jpp
c0aa290
- First JPP 1.7 build
c0aa290
c0aa290
* Thu Oct 06 2005 Ralph Apel <r.apel at r-apel.de> 0:2.1-1jpp
c0aa290
- Upgrade to 2.1
c0aa290
c0aa290
* Fri Mar 11 2005 Sebastiano Vigna <vigna at acm.org> 0:2.0.RC1-1jpp
c0aa290
- First release of the 2.0 line.