1 |
Name: ant4eclipse0 |
2 |
Version: 0.4.0 |
3 |
Release: %mkrel 0 |
4 |
Summary: A collection of tasks for Apache Ant that parse eclipse metadata |
5 |
Group: Development/Java |
6 |
License: Eclipse Public License |
7 |
Url: http://www.ant4eclipse.org/ |
8 |
Source0: http://sourceforge.net/projects/ant4eclipse/files/ant4eclipse/0.4.0/ant4eclipse-0.4.0.tar.gz |
9 |
BuildRequires: ant |
10 |
BuildRequires: ant-junit |
11 |
BuildRequires: java-devel |
12 |
BuildRequires: junit |
13 |
BuildRequires: jpackage-utils |
14 |
Requires: jpackage-utils |
15 |
BuildArch: noarch |
16 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
17 |
|
18 |
%description |
19 |
The aim of ant4eclipse is to avoid redundancy between Eclipse and Ant configurations. |
20 |
Its tasks can read Eclipse' configuration files, such as .classpath or .psf. |
21 |
Changes of Eclipse configurations are immediately visible to buildfiles without changes. |
22 |
|
23 |
%package javadoc |
24 |
Group: Development/Java |
25 |
Summary: Javadoc for %{name} |
26 |
|
27 |
%description javadoc |
28 |
Ant4Eclipse - A collection of tasks for Apache Ant that parse eclipse metadata. |
29 |
|
30 |
This package contains javadoc for %{name}. |
31 |
|
32 |
%prep |
33 |
%setup -q -n ant4eclipse-%{version} |
34 |
|
35 |
for j in $(find . -name "*.jar"); do |
36 |
mv $j $j.no |
37 |
done |
38 |
|
39 |
unzip -qq ant4eclipse-%{version}-src.zip |
40 |
mkdir -p classes |
41 |
%build |
42 |
|
43 |
javac \ |
44 |
-d classes \ |
45 |
-classpath $(build-classpath ant ant/ant-junit junit) \ |
46 |
-target 1.5 -source 1.5 \ |
47 |
$(find source -type f -name "*.java") |
48 |
|
49 |
pushd classes |
50 |
mkdir -p META-INF |
51 |
cat > META-INF/MANIFEST.MF << EOF |
52 |
Manifest-Version: 1.0 |
53 |
Created-By: 1.6.0_22 (Sun Microsystems Inc.) |
54 |
Implementation-Title: ant4eclipse |
55 |
Implementation-Version: %{version} |
56 |
EOF |
57 |
jar cMf ../ant4eclipse-%{version}.jar * |
58 |
popd |
59 |
|
60 |
javadoc -d apidocs \ |
61 |
-source 1.5 \ |
62 |
-encoding iso-8859-1 \ |
63 |
$(find source -type f -name "*.java") |
64 |
|
65 |
%install |
66 |
[ %{buildroot} != / ] && rm -rf %{buildroot} |
67 |
|
68 |
mkdir -p %{buildroot}%{_javadir} |
69 |
install -m 644 ant4eclipse-%{version}.jar %{buildroot}%{_javadir}/ant4eclipse0-%{version}.jar |
70 |
|
71 |
( |
72 |
cd %{buildroot}%{_javadir}/ |
73 |
for jar in *-%{version}*; do |
74 |
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` |
75 |
done |
76 |
) |
77 |
|
78 |
mkdir -p %{buildroot}%{_javadocdir}/ant4eclipse0-%{version} |
79 |
cp -pr apidocs/* %{buildroot}%{_javadocdir}/ant4eclipse0-%{version} |
80 |
ln -s ant4eclipse0-%{version} %{buildroot}%{_javadocdir}/ant4eclipse0 |
81 |
|
82 |
%clean |
83 |
[ %{buildroot} != / ] && rm -rf %{buildroot} |
84 |
|
85 |
%files |
86 |
%defattr(-,root,root) |
87 |
%{_javadir}/ant4eclipse0-%{version}.jar |
88 |
%{_javadir}/ant4eclipse0.jar |
89 |
|
90 |
%files javadoc |
91 |
%defattr(-,root,root) |
92 |
%{_javadocdir}/ant4eclipse0-%{version} |
93 |
%{_javadocdir}/ant4eclipse0 |
94 |
|