]> git.pld-linux.org Git - packages/android-tools.git/blame - android-tools.spec
- release 2 (by relup.sh)
[packages/android-tools.git] / android-tools.spec
CommitLineData
01c37bc0 1%define rel 2
b4bc8a71
ER
2%define git_date 20160327
3%define git_commit 3761365735de
c13285da 4%define packdname core-%{git_commit}
b4bc8a71 5%define extras_git_commit 7f5999a
c13285da
ER
6%define extras_packdname extras-%{extras_git_commit}
7Summary: Android platform tools(adb, fastboot)
8Name: android-tools
7fe0fcf4 9# use platform version from git (git describe --tags)
b4bc8a71
ER
10# core: android-6.0.1_r21
11# extras: android-6.0.1_r68
12Version: 6.0.1
c13285da
ER
13Release: 0.%{git_date}git%{git_commit}.%{rel}
14Group: Applications/System
15# The entire source code is ASL 2.0 except fastboot/ which is BSD
16License: ASL 2.0 and (ASL 2.0 and BSD)
17# using git archive since upstream hasn't created tarballs.
b4bc8a71 18# git archive --format=tar --prefix=%%{packdname}/ %%{git_commit} adb fastboot libzipfile libcutils libmincrypt libsparse mkbootimg include/cutils include/zipfile include/mincrypt include/utils include/private | xz > %%{packdname}.tar.xz
c13285da 19# https://android.googlesource.com/platform/system/core.git
b4bc8a71 20# git archive --format=tar --prefix=extras/ %%{extras_git_commit} ext4_utils f2fs_utils | xz > %%{extras_packdname}.tar.xz
c13285da 21# https://android.googlesource.com/platform/system/extras.git
b4bc8a71
ER
22Source0: http://pkgs.fedoraproject.org/repo/pkgs/android-tools/%{packdname}.tar.xz/bdccaa042b73d1f5a29630c69ae5df26/%{packdname}.tar.xz
23# Source0-md5: bdccaa042b73d1f5a29630c69ae5df26
24Source1: http://pkgs.fedoraproject.org/repo/pkgs/android-tools/%{extras_packdname}.tar.xz/2cd5ea576fdf35f5e9ee1c208f6d9fa5/%{extras_packdname}.tar.xz
25# Source1-md5: 2cd5ea576fdf35f5e9ee1c208f6d9fa5
26Source2: generate_build.rb
c13285da
ER
27Source5: 51-android.rules
28Source6: adb.service
b4bc8a71 29Patch1: 0001-Add-string-h.patch
c13285da 30URL: http://developer.android.com/guide/developing/tools/
b4bc8a71
ER
31BuildRequires: f2fs-tools
32BuildRequires: gtest-devel
c13285da
ER
33BuildRequires: libselinux-devel
34BuildRequires: openssl-devel
35BuildRequires: rpmbuild(macros) >= 1.671
b4bc8a71 36BuildRequires: ruby
c13285da
ER
37BuildRequires: systemd-devel
38BuildRequires: tar >= 1:1.22
39BuildRequires: xz
40BuildRequires: zlib-devel
41Requires: systemd-units >= 38
42Provides: adb
43Provides: fastboot
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47The Android Debug Bridge (ADB) is used to:
48- keep track of all Android devices and emulators instances connected
49 to or running on a given host developer machine
50- implement various control commands (e.g. "adb shell", "adb pull",
51 etc.) for the benefit of clients (command-line users, or helper
52 programs like DDMS). These commands are what is called a 'service' in
53 ADB.
54
55Fastboot is used to manipulate the flash partitions of the Android
56phone. It can also boot the phone using a kernel image or root
57filesystem image which reside on the host machine rather than in the
58phone flash. In order to use it, it is important to understand the
59flash partition layout for the phone. The fastboot program works in
60conjunction with firmware on the phone to read and write the flash
61partitions. It needs the same USB device setup between the host and
62the target phone as adb.
63
64%prep
65%setup -qc -a1
66mv %{packdname}/* .
67
b4bc8a71 68%patch1 -p1
c13285da
ER
69
70%build
b4bc8a71 71%{__ruby} %{SOURCE2} | tee build.sh
0730f718
ER
72PKGVER=%{git_commit} \
73CC="%{__cc}" \
74CXX="%{__cxx}" \
75sh -xe build.sh
c13285da
ER
76
77%install
78rm -rf $RPM_BUILD_ROOT
6bf38620 79install -d $RPM_BUILD_ROOT{%{_bindir},%{systemdunitdir},%{_sharedstatedir}/adb,/lib/udev/rules.d}
b4bc8a71 80install -p adb/adb fastboot/fastboot libsparse/simg2img libsparse/img2simg $RPM_BUILD_ROOT%{_bindir}
c13285da 81
6bf38620 82cp -p %{SOURCE5} $RPM_BUILD_ROOT/lib/udev/rules.d/51-android.rules
c13285da
ER
83cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/adb.service
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
88%post
89%systemd_post adb.service
90
91%preun
92%systemd_preun adb.service
93
94%postun
95%systemd_reload
96
97%files
98%defattr(644,root,root,755)
6bf38620 99%doc adb/OVERVIEW.TXT adb/SERVICES.TXT adb/NOTICE adb/protocol.txt
c13285da
ER
100# ASL2.0
101%attr(755,root,root) %{_bindir}/adb
b4bc8a71
ER
102%attr(755,root,root) %{_bindir}/img2simg
103%attr(755,root,root) %{_bindir}/simg2img
c13285da
ER
104# ASL2.0 and BSD.
105%attr(755,root,root) %{_bindir}/fastboot
b4bc8a71 106
c13285da 107%{systemdunitdir}/adb.service
6bf38620 108/lib/udev/rules.d/51-android.rules
b4bc8a71 109%dir %{_sharedstatedir}/adb
This page took 0.181379 seconds and 4 git commands to generate.