Browse Source

add Apache Ivy dependency resolver for Ant

master
parent
commit
60bb6561bc
  1. 31
      ant/ant.spec

31
ant/ant.spec

@ -23,6 +23,7 @@
# package version # package version
%define V_ant 1.7.0 %define V_ant 1.7.0
%define V_ivy 2.0.0-beta2
%define V_junit 4.4 %define V_junit 4.4
# package information # package information
@ -36,16 +37,17 @@ Class: EVAL
Group: Building Group: Building
License: Apache Software License License: Apache Software License
Version: %{V_ant} Version: %{V_ant}
Release: 20080101 Release: 20080305
# package options # package options
%option with_docs no %option with_docs no
# list of sources # list of sources
Source0: http://www.apache.org/dist/ant/binaries/apache-ant-%{V_ant}-bin.tar.bz2 Source0: http://www.apache.org/dist/ant/binaries/apache-ant-%{V_ant}-bin.tar.bz2
Source1: http://switch.dl.sourceforge.net/junit/junit%{V_junit}.zip Source1: http://www.apache.org/dist/ant/ivy/%{V_ivy}/apache-ivy-%{V_ivy}-bin-with-deps.tar.gz
Source2: ant.conf Source2: http://switch.dl.sourceforge.net/junit/junit%{V_junit}.zip
Source3: rc.ant Source3: ant.conf
Source4: rc.ant
# build information # build information
Prefix: %{l_prefix} Prefix: %{l_prefix}
@ -56,8 +58,9 @@ AutoReq: no
AutoReqProv: no AutoReqProv: no
%description %description
Apache Ant is a Java based build tool. In theory it is kind of like make Apache Ant is a Java based build tool. In theory it is kind of like
without make's wrinkles. In practice it has its own wrinkles. make(1) without make(1)'s wrinkles. In practice it has its own
wrinkles.
%track %track
prog ant = { prog ant = {
@ -65,6 +68,11 @@ AutoReqProv: no
url = http://www.apache.org/dist/ant/binaries/ url = http://www.apache.org/dist/ant/binaries/
regex = apache-ant-(__VER__)-bin\.tar\.bz2 regex = apache-ant-(__VER__)-bin\.tar\.bz2
} }
prog ant:ivy = {
version = %{V_ivy}
url = http://www.apache.org/dist/ant/ivy/
regex = (\d+\.\d+(?:\.\d+)?-(?:beta\d+)?)
}
prog ant:junit = { prog ant:junit = {
version = %{V_junit} version = %{V_junit}
url = http://prdownloads.sourceforge.net/junit/ url = http://prdownloads.sourceforge.net/junit/
@ -73,6 +81,7 @@ AutoReqProv: no
%prep %prep
%setup -q -n apache-ant-%{V_ant} %setup -q -n apache-ant-%{V_ant}
%setup -q -n apache-ant-%{V_ant} -T -D -a 1
%{l_prefix}/bin/unzip -q %{SOURCE junit%{V_junit}.zip} %{l_prefix}/bin/unzip -q %{SOURCE junit%{V_junit}.zip}
%build %build
@ -96,6 +105,16 @@ AutoReqProv: no
bin/ant $RPM_BUILD_ROOT%{l_prefix}/bin/ bin/ant $RPM_BUILD_ROOT%{l_prefix}/bin/
%{l_shtool} install -c -m 644 \ %{l_shtool} install -c -m 644 \
lib/*.jar etc/*.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/ lib/*.jar etc/*.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/
%{l_shtool} install -c -m 644 \
apache-ivy-*/ivy-%{V_ivy}.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/ivy.jar
( cd apache-ivy-*/lib
for jar in commons-cli-*.jar commons-codec-*.jar commons-httpclient-*.jar commons-lang-*.jar \
commons-logging-*.jar commons-vfs-*.jar jsch-*.jar oro-*.jar; do
newjar="ivy-`echo $jar | sed -e 's;-[0-9].*$;;'`.jar"
%{l_shtool} install -c -m 644 \
$jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/$newjar
done
) || exit $?
%{l_shtool} install -c -m 644 \ %{l_shtool} install -c -m 644 \
junit*/junit-%{V_junit}.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/junit.jar junit*/junit-%{V_junit}.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/junit.jar
%{l_shtool} install -c -m 644 \ %{l_shtool} install -c -m 644 \

Loading…
Cancel
Save