forked from pool/ant-contrib
164 lines
4.8 KiB
RPMSpec
164 lines
4.8 KiB
RPMSpec
#
|
|
# spec file for package ant-contrib (Version 1.0b2)
|
|
#
|
|
# Copyright (c) 2008 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
|
|
|
|
%define with_junit 0
|
|
%define section free
|
|
%define ant_version 1.7.0
|
|
Summary: Collection of tasks for Ant
|
|
|
|
Name: ant-contrib
|
|
Version: 1.0b2
|
|
Release: 17
|
|
License: The Apache Software License
|
|
Url: http://ant-contrib.sourceforge.net/
|
|
Group: Development/Libraries/Java
|
|
Source0: http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-src.tar.bz2
|
|
#Is from apache-ant-1.7.0-src.zip
|
|
Source1: BuildFileTest.java
|
|
Patch0: ant-contrib-build_xml.patch
|
|
Patch1: ant-contrib-ant-1.7.0.patch
|
|
Patch2: ant-contrib-BuildFileTest_java.patch
|
|
BuildRequires: jpackage-utils >= 1.6
|
|
BuildRequires: ant = %{ant_version}
|
|
BuildRequires: bcel >= 5.1
|
|
BuildRequires: java-devel
|
|
%if %{with_junit}
|
|
BuildRequires: ant-junit = %{ant_version}
|
|
Requires: junit >= 3.8.1
|
|
%endif
|
|
Requires: ant = %{ant_version}
|
|
Requires: bcel >= 5.1
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
The Ant-Contrib project is a collection of tasks (and at one point
|
|
maybe types and other tools) for Apache Ant.
|
|
|
|
|
|
|
|
%package javadoc
|
|
License: The Apache Software License
|
|
Summary: Collection of tasks for Ant
|
|
Group: Development/Libraries/Java
|
|
Requires(post): /bin/rm,/bin/ln
|
|
Requires(postun): /bin/rm
|
|
|
|
%description javadoc
|
|
The Ant-Contrib project is a collection of tasks (and at one point
|
|
maybe types and other tools) for Apache Ant.
|
|
|
|
|
|
|
|
%package manual
|
|
License: The Apache Software License
|
|
Summary: Collection of tasks for Ant
|
|
Group: Development/Libraries/Java
|
|
|
|
%description manual
|
|
The Ant-Contrib project is a collection of tasks (and at one point
|
|
maybe types and other tools) for Apache Ant.
|
|
|
|
|
|
|
|
%prep
|
|
%setup -q -c -n %{name}-%{version}
|
|
for j in $(find . -name "*.jar"); do
|
|
mv $j $j.no
|
|
done
|
|
# TODO: this test fails
|
|
#rm ant-contrib/test/src/net/sf/antcontrib/logic/TryCatchTaskTest.java
|
|
%patch0 -b .sav
|
|
%patch1 -b .sav1
|
|
%patch2 -b .sav2
|
|
|
|
%build
|
|
pushd ant-contrib/lib
|
|
ln -s $(build-classpath bcel) bcel-5.1.jar
|
|
popd
|
|
pushd ant-contrib/test/lib
|
|
ln -s $(build-classpath junit) junit-3.8.2
|
|
popd
|
|
mkdir -p ant-contrib/build/ant
|
|
cp %{SOURCE1} ant-contrib/build/ant/
|
|
cd ant-contrib
|
|
%if %defined suse_version
|
|
export CLASSPATH=$(build-classpath bcel junit)
|
|
%endif
|
|
ant \
|
|
all \
|
|
%if %{with_junit}
|
|
test
|
|
%endif
|
|
|
|
%install
|
|
# jars
|
|
install -Dpm 644 %{name}/build/lib/%{name}.jar \
|
|
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
|
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
|
# javadoc
|
|
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
cp -pr %{name}/build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
|
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
|
|
rm -rf %{name}/build/docs/api
|
|
# manual
|
|
install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
cp -pr %{name}/build/docs/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%post javadoc
|
|
rm -f %{_javadocdir}/%{name}
|
|
ln -s %{name}-%{version} %{_javadocdir}/%{name}
|
|
|
|
%postun javadoc
|
|
if [ "$1" = "0" ]; then
|
|
rm -f %{_javadocdir}/%{name}
|
|
fi
|
|
|
|
%files
|
|
%defattr(0644,root,root,0755)
|
|
%{_javadir}/*.jar
|
|
%doc %{_docdir}/%{name}-%{version}/LICENSE.txt
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root,-)
|
|
%doc %{_javadocdir}/%{name}-%{version}
|
|
%ghost %doc %{_javadocdir}/%{name}
|
|
|
|
%files manual
|
|
%defattr(-,root,root,-)
|
|
%doc %{_docdir}/%{name}-%{version}
|
|
%exclude %{_docdir}/%{name}-%{version}/LICENSE.txt
|
|
# -----------------------------------------------------------------------------
|
|
|
|
%changelog
|
|
* Fri Aug 08 2008 mvyskocil@suse.cz
|
|
- Make junit testing optional and disable it by default to break a build cycle
|
|
ant-antlr - bsf - jython - mysql-connector-java - ant-contrib ant-contrib
|
|
* Thu Jul 10 2008 mvyskocil@suse.cz
|
|
- Removed summary tags from description of subpackages.
|
|
- Remove the ant-1.7.0 archive to reduce a size of source package and
|
|
use only one necessary file BuildFileTest.java
|
|
* Wed Jul 02 2008 mvyskocil@suse.cz
|
|
- First release based on jpackage.org 1.7 (1.0.b2)
|
|
- adjusted for ant 1.7.0
|