]> git.pld-linux.org Git - packages/android-tools.git/blame_incremental - android-tools.spec
- release 2 (by relup.sh)
[packages/android-tools.git] / android-tools.spec
... / ...
CommitLineData
1%define rel 2
2%define git_date 20160327
3%define git_commit 3761365735de
4%define packdname core-%{git_commit}
5%define extras_git_commit 7f5999a
6%define extras_packdname extras-%{extras_git_commit}
7Summary: Android platform tools(adb, fastboot)
8Name: android-tools
9# use platform version from git (git describe --tags)
10# core: android-6.0.1_r21
11# extras: android-6.0.1_r68
12Version: 6.0.1
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.
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
19# https://android.googlesource.com/platform/system/core.git
20# git archive --format=tar --prefix=extras/ %%{extras_git_commit} ext4_utils f2fs_utils | xz > %%{extras_packdname}.tar.xz
21# https://android.googlesource.com/platform/system/extras.git
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
27Source5: 51-android.rules
28Source6: adb.service
29Patch1: 0001-Add-string-h.patch
30URL: http://developer.android.com/guide/developing/tools/
31BuildRequires: f2fs-tools
32BuildRequires: gtest-devel
33BuildRequires: libselinux-devel
34BuildRequires: openssl-devel
35BuildRequires: rpmbuild(macros) >= 1.671
36BuildRequires: ruby
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
68%patch1 -p1
69
70%build
71%{__ruby} %{SOURCE2} | tee build.sh
72PKGVER=%{git_commit} \
73CC="%{__cc}" \
74CXX="%{__cxx}" \
75sh -xe build.sh
76
77%install
78rm -rf $RPM_BUILD_ROOT
79install -d $RPM_BUILD_ROOT{%{_bindir},%{systemdunitdir},%{_sharedstatedir}/adb,/lib/udev/rules.d}
80install -p adb/adb fastboot/fastboot libsparse/simg2img libsparse/img2simg $RPM_BUILD_ROOT%{_bindir}
81
82cp -p %{SOURCE5} $RPM_BUILD_ROOT/lib/udev/rules.d/51-android.rules
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)
99%doc adb/OVERVIEW.TXT adb/SERVICES.TXT adb/NOTICE adb/protocol.txt
100# ASL2.0
101%attr(755,root,root) %{_bindir}/adb
102%attr(755,root,root) %{_bindir}/img2simg
103%attr(755,root,root) %{_bindir}/simg2img
104# ASL2.0 and BSD.
105%attr(755,root,root) %{_bindir}/fastboot
106
107%{systemdunitdir}/adb.service
108/lib/udev/rules.d/51-android.rules
109%dir %{_sharedstatedir}/adb
This page took 0.186252 seconds and 4 git commands to generate.