packages apache-ant.spec
      Pages: < 1 >  DOWNLOAD      
Name:          apache-ant
Version:       1.9.13
Release:       2mamba
Summary:       A Java-based build tool
Group:         Applications/Development
Vendor:        openmamba
Distribution:  openmamba
Packager:      Silvan Calarco <silvan.calarco@...>
URL:           http://ant.apache.org
Source0:       http://mirror.nohup.it/apache/ant/source/apache-ant-%{version}-src.tar.bz2
Source1:       ant-profile.sh
Source2:       apache-ant-bin_ant
Source3:       apache-ant-ant.conf
Patch0:        apache-ant-1.9.13-ant-1.8.patch
License:       Apache License 2.0
## AUTOBUILDREQ-BEGIN
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: java-openjdk
BuildRequires: java-junit
Requires:      java-junit
Obsoletes:     apache-ant-nodeps
Provides:      apache-ant-nodeps = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes:     apache-ant-trax
Provides:      apache-ant-trax = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes:     apache-ant-stylebook
Provides:      apache-ant-stylebook = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes:     apache-ant-testutil
Provides:      apache-ant-testutil = %{?epoch:%epoch:}%{version}-%{release}
Provides:      apache-ant-jmf
Obsoletes:     apache-ant-jmf
Provides:      apache-ant-swing
Obsoletes:     apache-ant-swing
Provides:      apache-ant-antlr
Provides:      apache-ant-bsf
Obsoletes:     apache-ant-bsf
Provides:      apache-ant-resolver
Obsoletes:     apache-ant-resolver
Provides:      apache-ant-commons-logging
Obsoletes:     apache-ant-commons-logging
Provides:      apache-ant-commons-net
Obsoletes:     apache-ant-commons-net
Provides:      apache-ant-jai
Obsoletes:     apache-ant-jai
Provides:      apache-ant-bcel
Obsoletes:     apache-ant-bcel
Provides:      apache-ant-log4j
Obsoletes:     apache-ant-log4j
Provides:      apache-ant-oro
Obsoletes:     apache-ant-oro
Provides:      apache-ant-regexp
Obsoletes:     apache-ant-regexp
Provides:      apache-ant-javamail
Obsoletes:     apache-ant-javamail
Provides:      apache-ant-jdepend
Obsoletes:     apache-ant-jdepend
Provides:      apache-ant-jsch
Obsoletes:     apache-ant-jsch
Provides:      apache-ant-junit
Obsoletes:     apache-ant-junit
Provides:      apache-ant-xalan2
Obsoletes:     apache-ant-xalan2
Provides:      apache-ant-scripts
Obsoletes:     apache-ant-scripts
Provides:      apache-ant-manual
Obsoletes:     apache-ant-manual
Provides:      apache-ant-javadoc
Obsoletes:     apache-ant-javadoc
Provides:      apache-ant-regexp
Obsoletes:     apache-ant-regexp
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.

%package manual
Summary:        Manual for ant
Group:          Documentation

%description manual
Documentation for ant.

%prep
%setup -q
%patch0 -p1

%build
# ant needs HOME to download libs to $HOME/.m2/repository
export ANT_OPTS="-Duser.home=`pwd`"
%ifarch arm
export LD_PRELOAD=%{_libdir}/libatomic.so.1
%endif
ant -Ddest=optional -f fetch.xml

rm lib/optional/junit-4.12.jar
ln -s %{_javadir}/junit.jar lib/optional/junit-4.12.jar
rm lib/optional/hamcrest-core-1.3.jar
ln -s %{_javadir}/hamcrest-core.jar lib/optional/hamcrest-core-1.3.jar

ant dist

%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
cd %{name}-%{version}

install -dm755 %{buildroot}%{_datadir}/apache-ant

install -dm755 %{buildroot}%{_sysconfdir}/apache-ant
cp -Rp etc/* %{buildroot}%{_sysconfdir}/apache-ant/

rm -f %{buildroot}%{_sysconfdir}/apache-ant/ant-bootstrap.jar
ln -s %{_sysconfdir}/apache-ant %{buildroot}%{_datadir}/apache-ant/etc

install -dm755 %{buildroot}%{_datadir}/apache-ant/bin
find bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
  -exec install -m755 {} %{buildroot}%{_datadir}/apache-ant/bin \;

install -Dm755 %{SOURCE2} %{buildroot}%{_bindir}/ant
install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/apache-ant/ant.conf

install -dm755 %{buildroot}%{_javadir}/apache-ant
install -m644 lib/*.jar %{buildroot}%{_javadir}/apache-ant/
ln -s %{_javadir}/apache-ant %{buildroot}%{_datadir}/apache-ant/lib

# install profile.d script
install -dm755 %{buildroot}%{_sysconfdir}/profile.d
cat > %{buildroot}%{_sysconfdir}/profile.d/apache-ant.sh << _EOF
export ANT_HOME=%{_datadir}/apache-ant
_EOF

cat > %{buildroot}%{_sysconfdir}/profile.d/apache-ant.csh << _EOF
setenv ANT_HOME %{_datadir}/apache-ant
_EOF

install -dm755 %{buildroot}%{_docdir}/apache-ant
cp -r manual/* %{buildroot}%{_docdir}/apache-ant/

%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%dir %{_sysconfdir}/apache-ant
%config %{_sysconfdir}/apache-ant/ant.conf
%{_sysconfdir}/apache-ant/*
%{_sysconfdir}/profile.d/apache-ant.sh
%{_sysconfdir}/profile.d/apache-ant.csh
%{_bindir}/ant
%dir %{_datadir}/java/apache-ant
%{_datadir}/java/apache-ant/ant-antlr.jar
%{_datadir}/java/apache-ant/ant-apache-bcel.jar
%{_datadir}/java/apache-ant/ant-apache-bsf.jar
%{_datadir}/java/apache-ant/ant-apache-log4j.jar
%{_datadir}/java/apache-ant/ant-apache-oro.jar
%{_datadir}/java/apache-ant/ant-apache-regexp.jar
%{_datadir}/java/apache-ant/ant-apache-resolver.jar
%{_datadir}/java/apache-ant/ant-apache-xalan2.jar
%{_datadir}/java/apache-ant/ant-commons-logging.jar
%{_datadir}/java/apache-ant/ant-commons-net.jar
%{_datadir}/java/apache-ant/ant-jai.jar
%{_datadir}/java/apache-ant/ant-javamail.jar
%{_datadir}/java/apache-ant/ant-jdepend.jar
%{_datadir}/java/apache-ant/ant-jmf.jar
%{_datadir}/java/apache-ant/ant-jsch.jar
%{_datadir}/java/apache-ant/ant-junit.jar
%{_datadir}/java/apache-ant/ant-junit4.jar
%{_datadir}/java/apache-ant/ant-launcher.jar
%{_datadir}/java/apache-ant/ant-netrexx.jar
%{_datadir}/java/apache-ant/ant-swing.jar
%{_datadir}/java/apache-ant/ant-testutil.jar
%{_datadir}/java/apache-ant/ant.jar
%{_datadir}/apache-ant/bin/ant
%{_datadir}/apache-ant/bin/antRun
%{_datadir}/apache-ant/bin/antRun.pl
%{_datadir}/apache-ant/bin/complete-ant-cmd.pl
%{_datadir}/apache-ant/bin/runant.pl
%{_datadir}/apache-ant/bin/runant.py
%{_datadir}/apache-ant/etc
%{_datadir}/apache-ant/lib

%files manual
%defattr(-,root,root)
%dir %{_docdir}/apache-ant
%{_docdir}/apache-ant/*

%changelog
* Fri Aug 10 2018 Silvan Calarco <silvan.calarco@...> 1.9.13-2mamba
- fixed installation paths

* Wed Aug 08 2018 Silvan Calarco <silvan.calarco@...> 1.9.13-1mamba
- update to 1.9.13

* Fri Jun 14 2013 Silvan Calarco <silvan.calarco@...> 1.8.4-2mamba
- fix build with optional libraries. CLASSPATH is ignored (why?), needs symlnks in lib/optional
- fixes: the class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask was not found.
- also restores build of gcj libraries

* Thu Aug 30 2012 Silvan Calarco <silvan.calarco@...> 1.8.4-1mamba
- update to 1.8.4

* Thu Mar 15 2012 Stefano Cotta Ramusino <stefano.cotta@...> 1.8.3-1mamba
- update to 1.8.3
- merge the nodeps, trax, stylebook and testutil packages to main one

* Sun Mar 20 2011 gil <puntogil@...> 1.7.1-9mamba
- rebuilt with java-openjdk support
- add gcj support

* Tue May 18 2010 gil <puntogil@...> 1.7.1-8mamba
- rebuilt with sun-java 6u20

* Mon Mar 29 2010 gil <puntogil@...> 1.7.1-7mamba
- added new subackage: jai
- added new build requirements: apache-anakia apache-ant-antunit
  apache-tomcat5-servletapi5 apache-velocity-dvsl
  jakarta-commons-collections jakarta-commons-httpclient 
  java-bsh2 java-dom4j java-jacl java-rhino java-ruby
  jython java-xdoclet xjavadoc xml-commons-apis xml-commons-which10

* Thu Oct 22 2009 gil <puntogil@...> 1.7.1-6mamba
- rebuilt with jakarta-commons-net2
- ANT_HOME moved in /usr/share/ant

* Sun Sep 06 2009 gil <puntogil@...> 1.7.1-5mamba
- rebuilt
- edit spec file %{_datadir}/maven2/poms/JPP-ant.pom is not a pom file but %{SOURCE1}

* Mon Jun 29 2009 gil <puntogil@...> 1.7.1-4mamba
- rebuilt

* Sun Jun 28 2009 gil <puntogil@...> 1.7.1-3mamba
- rebuilt
- added mew sub package: apache-ant-testutil

* Thu Mar 05 2009 gil <puntogil@...> 1.7.1-2mamba
- added xml-commons-resolver jakarta-commons-logging java-log4j jakarta-bcel jakarta-bsf jakarta-commons-net jakarta-oro java-classpathx-jaf java-classpathx-mail java-depend java-junit3 java-regexp java-sch support
- edit spec file

* Thu Jul 10 2008 Silvan Calarco <silvan.calarco@...> 1.7.1-1mamba
- update to 1.7.1

* Thu May 08 2008 Silvan Calarco <silvan.calarco@...> 1.7.0-1mamba
- update to 1.7.0
- moved to /opt/ant

* Fri Jul 15 2005 Silvan Calarco <silvan.calarco@...> 1.6.5-1qilnx
- package created by autospec