objectweb-anttask/objectweb-anttask.spec

94 lines
2.4 KiB
RPMSpec

%define javahome %{_jvmdir}/jdk
Name: objectweb-anttask
Version: 1.3.2
Release: 3mamba
Summary: ObjectWeb Ant task
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://forge.objectweb.org/projects/monolog/
Source0: http://download.forge.objectweb.org/monolog/ow_util_ant_tasks_%{version}.zip
Patch0: objectweb-anttask-1.3.2-ant.patch
License: LGPL
BuildRequires: apache-ant
BuildRequires: jpackage-utils
%if "%{stage1}" != "1"
BuildRequires: objectweb-asm2
%endif
BuildRequires: xalan-j2
Requires: jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
ObjectWeb Ant task
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation
%description javadoc
Javadoc for %{name}.
%prep
%setup -q -c %{name}-%{version}
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
for j in $(find . -name "*.class"); do
rm -rf $j
done
%patch0 -p0
%build
export JAVA_HOME=%javahome
%if "%{stage1}" != "1"
export CLASSPATH=$(build-classpath asm2 xalan-j2)
%else
mv externals/asm-2.1.jar.no externals/asm-2.1.jar
export CLASSPATH=$(build-classpath xalan-j2)
%endif
ant -Dbuild.compiler=modern -Dbuild.sysclasspath=first jar jdoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -m 644 output/lib/ow_util_ant_tasks.jar \
%{buildroot}%{_javadir}/objectweb-anttask-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -s ${jar} `echo $jar | sed "s|-%{version}||g"`
done
)
mkdir -p %{buildroot}%{_javadocdir}/objectweb-anttask-%{version}
cp -pr output/jdoc/* %{buildroot}%{_javadocdir}/objectweb-anttask-%{version}
ln -sf objectweb-anttask-%{version} %{buildroot}%{_javadocdir}/objectweb-anttask
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/objectweb-anttask-%{version}.jar
%{_javadir}/objectweb-anttask.jar
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/objectweb-anttask-%{version}
%{_javadocdir}/objectweb-anttask
%changelog
* Sat Mar 12 2011 gil <puntogil@libero.it> 1.3.2-3mamba
- rebuilt with java-gcj-compat support
* Sat Jan 09 2010 gil <puntogil@libero.it> 1.3.2-2mamba
- rebuilt with objectweb-asm2 and xalan-j2 support
* Thu Feb 12 2009 gil <puntogil@libero.it> 1.3.2-1mamba
- package created by autospec