]> git.pld-linux.org Git - packages/android-tools.git/blame - android-tools.spec
update to 6.0 git snapshot
[packages/android-tools.git] / android-tools.spec
CommitLineData
c13285da 1%define rel 1
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
69cp -p %{SOURCE5} 51-android.rules
70
71%build
b4bc8a71
ER
72%{__ruby} %{SOURCE2} | tee build.sh
73PKGVER=%{git_commit} sh -xe build.sh
c13285da
ER
74
75%install
76rm -rf $RPM_BUILD_ROOT
b4bc8a71
ER
77install -d $RPM_BUILD_ROOT{%{_bindir},%{systemdunitdir},%{_sharedstatedir}/adb}
78install -p adb/adb fastboot/fastboot libsparse/simg2img libsparse/img2simg $RPM_BUILD_ROOT%{_bindir}
c13285da
ER
79
80cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/adb.service
81
82%clean
83rm -rf $RPM_BUILD_ROOT
84
85%post
86%systemd_post adb.service
87
88%preun
89%systemd_preun adb.service
90
91%postun
92%systemd_reload
93
94%files
95%defattr(644,root,root,755)
96%doc adb/OVERVIEW.TXT adb/SERVICES.TXT adb/NOTICE adb/protocol.txt 51-android.rules
97# ASL2.0
98%attr(755,root,root) %{_bindir}/adb
b4bc8a71
ER
99%attr(755,root,root) %{_bindir}/img2simg
100%attr(755,root,root) %{_bindir}/simg2img
c13285da
ER
101# ASL2.0 and BSD.
102%attr(755,root,root) %{_bindir}/fastboot
b4bc8a71 103
c13285da 104%{systemdunitdir}/adb.service
b4bc8a71 105%dir %{_sharedstatedir}/adb
This page took 0.110186 seconds and 4 git commands to generate.