]>
Commit | Line | Data |
---|---|---|
a4e949f3 | 1 | Summary: Android platform tools |
c13285da | 2 | Name: android-tools |
55509904 | 3 | Version: 34.0.5 |
23404a44 | 4 | Release: 1 |
a4e949f3 JP |
5 | # The entire source code is ASL 2.0 except boringssl which is BSD |
6 | License: ASL 2.0, BSD | |
c13285da | 7 | Group: Applications/System |
a4e949f3 | 8 | Source0: https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz |
55509904 | 9 | # Source0-md5: 8faca7116e885e6a225791b284cbce2e |
a4e949f3 JP |
10 | Source1: 51-android.rules |
11 | Source2: adb.service | |
c13285da | 12 | URL: http://developer.android.com/guide/developing/tools/ |
a4e949f3 JP |
13 | BuildRequires: cmake >= 3.12.0 |
14 | BuildRequires: golang | |
b4bc8a71 | 15 | BuildRequires: gtest-devel |
a4e949f3 JP |
16 | BuildRequires: libbrotli-devel |
17 | BuildRequires: libstdc++-devel | |
18 | BuildRequires: libusb-devel | |
19 | BuildRequires: lz4-devel | |
20 | BuildRequires: pcre2-8-devel | |
21 | BuildRequires: perl-base | |
22 | BuildRequires: protobuf-devel | |
23 | BuildRequires: rpm-build >= 4.6 | |
24 | BuildRequires: rpmbuild(macros) >= 1.605 | |
c13285da ER |
25 | BuildRequires: tar >= 1:1.22 |
26 | BuildRequires: xz | |
27 | BuildRequires: zlib-devel | |
a4e949f3 | 28 | BuildRequires: zstd-devel |
c13285da | 29 | Requires: systemd-units >= 38 |
c13285da ER |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | The Android Debug Bridge (ADB) is used to: | |
a4e949f3 | 34 | |
c13285da ER |
35 | - keep track of all Android devices and emulators instances connected |
36 | to or running on a given host developer machine | |
a4e949f3 | 37 | |
c13285da ER |
38 | - implement various control commands (e.g. "adb shell", "adb pull", |
39 | etc.) for the benefit of clients (command-line users, or helper | |
40 | programs like DDMS). These commands are what is called a 'service' in | |
41 | ADB. | |
42 | ||
43 | Fastboot is used to manipulate the flash partitions of the Android | |
44 | phone. It can also boot the phone using a kernel image or root | |
45 | filesystem image which reside on the host machine rather than in the | |
46 | phone flash. In order to use it, it is important to understand the | |
47 | flash partition layout for the phone. The fastboot program works in | |
48 | conjunction with firmware on the phone to read and write the flash | |
49 | partitions. It needs the same USB device setup between the host and | |
50 | the target phone as adb. | |
51 | ||
a4e949f3 JP |
52 | %package -n bash-completion-android-tools |
53 | Summary: bash-completion for android-tools | |
54 | Group: Applications/Shells | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | Requires: bash-completion >= 1:2.0 | |
57 | BuildArch: noarch | |
58 | ||
59 | %description -n bash-completion-android-tools | |
60 | This package provides bash-completion for android-tools. | |
61 | ||
c13285da | 62 | %prep |
a4e949f3 | 63 | %setup -q |
c13285da | 64 | |
a4e949f3 JP |
65 | %{__sed} -i -e '1 s,#!.*env python3,#!%{__python3},' \ |
66 | vendor/mkbootimg/mkbootimg.py \ | |
67 | vendor/mkbootimg/unpack_bootimg.py \ | |
68 | vendor/avb/avbtool.py \ | |
69 | vendor/mkbootimg/repack_bootimg.py \ | |
70 | vendor/libufdt/utils/src/mkdtboimg.py | |
c13285da ER |
71 | |
72 | %build | |
a4e949f3 JP |
73 | export GO111MODULE=off |
74 | install -d build | |
75 | cd build | |
76 | %cmake .. \ | |
77 | -DBUILD_SHARED_LIBS:BOOL=OFF | |
78 | ||
79 | %{__make} | |
c13285da ER |
80 | |
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
c13285da | 83 | |
a4e949f3 JP |
84 | install -d $RPM_BUILD_ROOT{%{systemdunitdir},/var/lib/adb,/lib/udev/rules.d} |
85 | ||
86 | %{__make} -C build install \ | |
87 | DESTDIR=$RPM_BUILD_ROOT | |
88 | ||
89 | cp -p %{SOURCE1} $RPM_BUILD_ROOT/lib/udev/rules.d/51-android.rules | |
90 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/adb.service | |
c13285da ER |
91 | |
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post | |
96 | %systemd_post adb.service | |
97 | ||
98 | %preun | |
99 | %systemd_preun adb.service | |
100 | ||
101 | %postun | |
102 | %systemd_reload | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
a4e949f3 | 106 | %doc vendor/adb/{OVERVIEW.TXT,SERVICES.TXT,NOTICE,protocol.txt} |
c13285da | 107 | %attr(755,root,root) %{_bindir}/adb |
a4e949f3 JP |
108 | %attr(755,root,root) %{_bindir}/avbtool |
109 | %attr(755,root,root) %{_bindir}/mke2fs.android | |
b4bc8a71 | 110 | %attr(755,root,root) %{_bindir}/simg2img |
a4e949f3 | 111 | %attr(755,root,root) %{_bindir}/img2simg |
c13285da | 112 | %attr(755,root,root) %{_bindir}/fastboot |
a4e949f3 JP |
113 | %attr(755,root,root) %{_bindir}/append2simg |
114 | %attr(755,root,root) %{_bindir}/e2fsdroid | |
115 | %attr(755,root,root) %{_bindir}/ext2simg | |
116 | %attr(755,root,root) %{_bindir}/lpadd | |
117 | %attr(755,root,root) %{_bindir}/lpdump | |
118 | %attr(755,root,root) %{_bindir}/lpflash | |
119 | %attr(755,root,root) %{_bindir}/lpmake | |
120 | %attr(755,root,root) %{_bindir}/lpunpack | |
55509904 | 121 | %attr(755,root,root) %{_bindir}/make_f2fs |
a4e949f3 JP |
122 | %attr(755,root,root) %{_bindir}/mkbootimg |
123 | %attr(755,root,root) %{_bindir}/mkdtboimg | |
124 | %attr(755,root,root) %{_bindir}/repack_bootimg | |
55509904 | 125 | %attr(755,root,root) %{_bindir}/sload_f2fs |
a4e949f3 | 126 | %attr(755,root,root) %{_bindir}/unpack_bootimg |
6bf38620 | 127 | /lib/udev/rules.d/51-android.rules |
a4e949f3 JP |
128 | %{systemdunitdir}/adb.service |
129 | %dir %{_datadir}/android-tools | |
130 | %dir %{_datadir}/android-tools/completions | |
131 | %{_datadir}/android-tools/completions/adb | |
132 | %{_datadir}/android-tools/completions/fastboot | |
133 | %dir %{_datadir}/android-tools/mkbootimg | |
a4e949f3 | 134 | %{_datadir}/android-tools/mkbootimg/mkbootimg.py |
2f8e3663 JP |
135 | %dir %{_datadir}/android-tools/mkbootimg/gki |
136 | %{_datadir}/android-tools/mkbootimg/gki/generate_gki_certificate.py | |
a4e949f3 JP |
137 | %dir /var/lib/adb |
138 | ||
139 | %files -n bash-completion-android-tools | |
140 | %defattr(644,root,root,755) | |
141 | %{bash_compdir}/adb | |
142 | %{bash_compdir}/fastboot |