]> git.pld-linux.org Git - packages/android-tools.git/blame - android-tools.spec
up to 34.0.5
[packages/android-tools.git] / android-tools.spec
CommitLineData
a4e949f3 1Summary: Android platform tools
c13285da 2Name: android-tools
55509904 3Version: 34.0.5
23404a44 4Release: 1
a4e949f3
JP
5# The entire source code is ASL 2.0 except boringssl which is BSD
6License: ASL 2.0, BSD
c13285da 7Group: Applications/System
a4e949f3 8Source0: https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz
55509904 9# Source0-md5: 8faca7116e885e6a225791b284cbce2e
a4e949f3
JP
10Source1: 51-android.rules
11Source2: adb.service
c13285da 12URL: http://developer.android.com/guide/developing/tools/
a4e949f3
JP
13BuildRequires: cmake >= 3.12.0
14BuildRequires: golang
b4bc8a71 15BuildRequires: gtest-devel
a4e949f3
JP
16BuildRequires: libbrotli-devel
17BuildRequires: libstdc++-devel
18BuildRequires: libusb-devel
19BuildRequires: lz4-devel
20BuildRequires: pcre2-8-devel
21BuildRequires: perl-base
22BuildRequires: protobuf-devel
23BuildRequires: rpm-build >= 4.6
24BuildRequires: rpmbuild(macros) >= 1.605
c13285da
ER
25BuildRequires: tar >= 1:1.22
26BuildRequires: xz
27BuildRequires: zlib-devel
a4e949f3 28BuildRequires: zstd-devel
c13285da 29Requires: systemd-units >= 38
c13285da
ER
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33The 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
43Fastboot is used to manipulate the flash partitions of the Android
44phone. It can also boot the phone using a kernel image or root
45filesystem image which reside on the host machine rather than in the
46phone flash. In order to use it, it is important to understand the
47flash partition layout for the phone. The fastboot program works in
48conjunction with firmware on the phone to read and write the flash
49partitions. It needs the same USB device setup between the host and
50the target phone as adb.
51
a4e949f3
JP
52%package -n bash-completion-android-tools
53Summary: bash-completion for android-tools
54Group: Applications/Shells
55Requires: %{name} = %{version}-%{release}
56Requires: bash-completion >= 1:2.0
57BuildArch: noarch
58
59%description -n bash-completion-android-tools
60This 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
73export GO111MODULE=off
74install -d build
75cd build
76%cmake .. \
77 -DBUILD_SHARED_LIBS:BOOL=OFF
78
79%{__make}
c13285da
ER
80
81%install
82rm -rf $RPM_BUILD_ROOT
c13285da 83
a4e949f3
JP
84install -d $RPM_BUILD_ROOT{%{systemdunitdir},/var/lib/adb,/lib/udev/rules.d}
85
86%{__make} -C build install \
87 DESTDIR=$RPM_BUILD_ROOT
88
89cp -p %{SOURCE1} $RPM_BUILD_ROOT/lib/udev/rules.d/51-android.rules
90cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/adb.service
c13285da
ER
91
92%clean
93rm -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
This page took 0.220092 seconds and 4 git commands to generate.