1 |
Name: android |
2 |
Version: 4.1.1.4 |
3 |
Release: %mkrel 3 |
4 |
Summary: Google Android Library |
5 |
Group: Development/Java |
6 |
License: ASL 2.0 |
7 |
# While the EULA for the Android SDK restricts distribution of those binaries, the source code |
8 |
# is licensed under Apache 2.0 which allows compiling binaries from source and then distributing |
9 |
# those versions. |
10 |
Url: http://source.android.com/ |
11 |
# https://github.com/android/ |
12 |
Source0: http://repo2.maven.org/maven2/com/google/android/android/%{version}/android-%{version}-sources.jar |
13 |
Source1: http://repo2.maven.org/maven2/com/google/android/android/%{version}/android-%{version}.pom |
14 |
|
15 |
BuildRequires: maven-local |
16 |
BuildRequires: java-devel |
17 |
BuildRequires: jpackage-utils |
18 |
BuildRequires: sonatype-oss-parent |
19 |
|
20 |
BuildRequires: apache-commons-logging |
21 |
BuildRequires: httpcomponents-client |
22 |
BuildRequires: json |
23 |
BuildRequires: android-opengl-api |
24 |
BuildRequires: xerces-j2 |
25 |
BuildRequires: xpp3 |
26 |
|
27 |
BuildRequires: maven-compiler-plugin |
28 |
BuildRequires: maven-install-plugin |
29 |
BuildRequires: maven-jar-plugin |
30 |
BuildRequires: maven-javadoc-plugin |
31 |
BuildRequires: maven-plugin-annotations |
32 |
|
33 |
BuildArch: noarch |
34 |
|
35 |
%description |
36 |
A library jar that provides APIs for Applications written for the Google Android Platform. |
37 |
|
38 |
%package javadoc |
39 |
Group: Development/Java |
40 |
Summary: Javadoc for %{name} |
41 |
Requires: jpackage-utils |
42 |
|
43 |
%description javadoc |
44 |
This package contains javadoc for %{name}. |
45 |
|
46 |
%prep |
47 |
%setup -T -q -c |
48 |
|
49 |
mkdir -p src/main/java |
50 |
mkdir -p target/classes |
51 |
|
52 |
( |
53 |
cd src/main/java |
54 |
%jar -xf %SOURCE0 |
55 |
rm -rf META-INF |
56 |
) |
57 |
|
58 |
cp -p %SOURCE1 pom.xml |
59 |
|
60 |
# clone source directory structure |
61 |
find src/ -type d | while read dirname ; do |
62 |
newdirname=`echo $dirname | sed "s:src/main/java:target/classes:g"` |
63 |
mkdir -p $newdirname |
64 |
done |
65 |
|
66 |
# copy everything except *.java sources |
67 |
find src/ -type f | grep -v "\.java" | while read cpfrom ; do |
68 |
cpto=`echo $cpfrom | sed "s:src/main/java:target/classes:g"` |
69 |
cp $cpfrom $cpto |
70 |
done |
71 |
|
72 |
# TODO |
73 |
# sonatype-oss-parent |
74 |
sed -i "s|<version>7</version>|<version>6</version>|" pom.xml |
75 |
# xpp3 |
76 |
sed -i "s|<version>1.1.4c</version>|<version>1.1.3.8</version>|" pom.xml |
77 |
|
78 |
%build |
79 |
%mvn_build -f |
80 |
|
81 |
%install |
82 |
%mvn_install |
83 |
|
84 |
%files -f .mfiles |
85 |
|
86 |
%files -f .mfiles-javadoc |