73f13c
Name:           apache-ivy
73f13c
Version:        2.3.0
adba9a
Release:        4%{?dist}
73f13c
Summary:        Java-based dependency manager
73f13c
73f13c
Group:          Development/Tools
73f13c
License:        ASL 2.0
73f13c
URL:            http://ant.apache.org/ivy/
73f13c
Source0:        http://www.apache.org/dist/ant/ivy/%{version}/%{name}-%{version}-src.tar.gz
73f13c
BuildArch:      noarch
73f13c
73f13c
Provides:       ivy = %{version}-%{release}
73f13c
73f13c
BuildRequires:  ant
73f13c
BuildRequires:  jakarta-commons-httpclient
73f13c
BuildRequires:  jsch
73f13c
BuildRequires:  jakarta-oro
73f13c
BuildRequires:  java-devel >= 1.5
73f13c
BuildRequires:  jpackage-utils
73f13c
Requires:       jpackage-utils
73f13c
Requires:       jakarta-oro
73f13c
Requires:       jsch
73f13c
Requires:       ant
73f13c
Requires:       jakarta-commons-httpclient
73f13c
73f13c
%description
73f13c
Apache Ivy is a tool for managing (recording, tracking, resolving and
73f13c
reporting) project dependencies.  It is designed as process agnostic and is
73f13c
not tied to any methodology or structure. while available as a standalone
73f13c
tool, Apache Ivy works particularly well with Apache Ant providing a number
73f13c
of powerful Ant tasks ranging from dependency resolution to dependency
73f13c
reporting and publication.
73f13c
73f13c
%package javadoc
73f13c
Summary:        API Documentation for ivy
73f13c
Group:          Development/Tools
73f13c
Requires:       %{name} = %{version}-%{release}
73f13c
Requires:       jpackage-utils
73f13c
73f13c
%description javadoc
73f13c
JavaDoc documentation for %{name}
73f13c
73f13c
%prep
73f13c
%setup -q
73f13c
73f13c
# Fix messed-up encodings
73f13c
for F in RELEASE_NOTES README LICENSE NOTICE CHANGES.txt
73f13c
do
73f13c
        sed 's/\r//' $F |iconv -f iso8859-1 -t utf8 >$F.utf8
73f13c
        touch -r $F $F.utf8
73f13c
        mv $F.utf8 $F
73f13c
done
73f13c
rm -fr src/java/org/apache/ivy/plugins/signer/bouncycastle
73f13c
73f13c
# Remove prebuilt documentation
73f13c
rm -rf doc build/doc
73f13c
73f13c
# How to properly disable a plugin?
73f13c
# we disable vfs plugin since commons-vfs is not available
73f13c
rm -rf src/java/org/apache/ivy/plugins/repository/vfs \
73f13c
        src/java/org/apache/ivy/plugins/resolver/VfsResolver.java
73f13c
sed '/vfs.*=.*org.apache.ivy.plugins.resolver.VfsResolver/d' -i \
73f13c
        src/java/org/apache/ivy/core/settings/typedef.properties
73f13c
adba9a
%build
73f13c
# Craft class path
73f13c
mkdir -p lib
73f13c
build-jar-repository lib ant jakarta-commons-httpclient jakarta-oro jsch 
73f13c
73f13c
# Build
73f13c
ant /localivy /offline -Dtarget.ivy.bundle.version=%{version} -Dtarget.ivy.bundle.version.qualifier= -Dtarget.ivy.version=%{version} jar javadoc
73f13c
73f13c
73f13c
%install
73f13c
# Code
73f13c
install -d $RPM_BUILD_ROOT%{_javadir}
73f13c
install -p -m644 build/artifact/jars/ivy.jar $RPM_BUILD_ROOT%{_javadir}/ivy.jar
73f13c
73f13c
# API Documentation
73f13c
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}
73f13c
cp -rp build/doc/reports/api/. $RPM_BUILD_ROOT%{_javadocdir}/%{name}
73f13c
73f13c
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
73f13c
echo "ivy" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/%{name}
73f13c
73f13c
%files
73f13c
%{_javadir}/*
73f13c
%{_sysconfdir}/ant.d/%{name}
73f13c
%doc RELEASE_NOTES CHANGES.txt LICENSE NOTICE README
73f13c
73f13c
%files javadoc
73f13c
%{_javadocdir}/*
adba9a
%doc LICENSE NOTICE
73f13c
73f13c
%changelog
adba9a
* Thu Jan 02 2014 Michal Srb <msrb@redhat.com> - 2.3.0-4
adba9a
- Remove prebuilt documentation in %%prep
adba9a
- Install NOTICE file with javadoc subpackage
adba9a
- Resolves: rhbz#854311
adba9a
adba9a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.3.0-3
adba9a
- Mass rebuild 2013-12-27
adba9a
73f13c
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.3.0-2
73f13c
- Rebuild to regenerate API documentation
73f13c
- Resolves: CVE-2013-1571
73f13c
73f13c
* Fri Mar 1 2013 Alexander Kurtakov <akurtako@redhat.com> 2.3.0-1
73f13c
- Update to latest upstream.
73f13c
73f13c
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-6
73f13c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
73f13c
73f13c
* Tue Jul 31 2012 Alexander Kurtakov <akurtako@redhat.com> 2.2.0-5
73f13c
- Fix osgi metadata.
73f13c
73f13c
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-4
73f13c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
73f13c
73f13c
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
73f13c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
73f13c
73f13c
* Wed Jul 6 2011 Alexander Kurtakov <akurtako@redhat.com> 2.2.0-2
73f13c
- Fix ant integration.
73f13c
73f13c
* Fri Feb 25 2011 Alexander Kurtakov <akurtako@redhat.com> 2.2.0-1
73f13c
- Update to 2.2.0.
73f13c
73f13c
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
73f13c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
73f13c
73f13c
* Mon Nov 09 2009 Lubomir Rintel <lkundrak@v3.sk> - 2.1.0-1
73f13c
- Initial Fedora packaging