File objectweb-anttask.spec of Package objectweb-anttask

#
# spec file for package objectweb-anttask (Version 1.2)
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild
# icecream 0


Name:           objectweb-anttask
BuildRequires:  ant java2-devel-packages unzip xalan-j2 xml-commons-apis
%define name            objectweb-anttask
%define version         1.2
%define release         1jpp
%define section         free
# -----------------------------------------------------------------------------
Summary:        ObjectWeb Ant task
Version:        1.2
Release:        240
Group:          Development/Languages/Java
License:        LGPL-2.1+
Url:            http://forge.objectweb.org/projects/monolog/
BuildArch:      noarch
Source0:        ow_util_ant_tasks_1.2.zip
Patch:          %{name}-java14compat.patch
Patch1:         objectweb-anttask-ant17.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       owanttask

%description
ObjectWeb Ant task



%prep
%setup -c -q -n %{name}
%patch
%patch1
find . -name "*.class" -exec rm {} \;
find . -name "*.jar" -exec rm {} \;

%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
export CLASSPATH=$(build-classpath xalan-j2)
ant -Dbuild.compiler=modern jar

%install
# jars
install -d -m 0755 $RPM_BUILD_ROOT%{_javadir}
install -m 644 output/lib/ow_util_ant_tasks.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
pushd $RPM_BUILD_ROOT%{_javadir}
  ln -sf %{name}-%{version}.jar %{name}.jar
popd
export NO_BRP_CHECK_BYTECODE_VERSION=true

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(0644,root,root,0755)
%{_javadir}/*

%changelog
* Tue Sep 18 2007 ro@suse.de
- hack to build with ant-1.7 (MultipleCopy works only for FileSets
  not for real ResourceCollection yet)
* Fri Mar 30 2007 ro@suse.de
- added unzip to buildreq
* Thu Sep 21 2006 skh@suse.de
- don't use icecream
- fix BuildRequires: add xalan-j2
- use source="1.4" and target="1.4" for build with java 1.5
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Oct 17 2005 jsmeix@suse.de
- Current version 1.2 from JPackage.org