]> git.pld-linux.org Git - packages/android-tools.git/blame_incremental - android-tools.spec
up to 33.0.3p1 (based on fedora)
[packages/android-tools.git] / android-tools.spec
... / ...
CommitLineData
1Summary: Android platform tools
2Name: android-tools
3Version: 33.0.3p1
4Release: 1
5# The entire source code is ASL 2.0 except boringssl which is BSD
6License: ASL 2.0, BSD
7Group: Applications/System
8Source0: https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz
9# Source0-md5: d0474aac5d7ca6e02906705a5c9307ac
10Source1: 51-android.rules
11Source2: adb.service
12URL: http://developer.android.com/guide/developing/tools/
13BuildRequires: cmake >= 3.12.0
14BuildRequires: golang
15BuildRequires: gtest-devel
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
25BuildRequires: tar >= 1:1.22
26BuildRequires: xz
27BuildRequires: zlib-devel
28BuildRequires: zstd-devel
29Requires: systemd-units >= 38
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33The Android Debug Bridge (ADB) is used to:
34
35- keep track of all Android devices and emulators instances connected
36 to or running on a given host developer machine
37
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
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
62%prep
63%setup -q
64
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
71
72%build
73export GO111MODULE=off
74install -d build
75cd build
76%cmake .. \
77 -DBUILD_SHARED_LIBS:BOOL=OFF
78
79%{__make}
80
81%install
82rm -rf $RPM_BUILD_ROOT
83
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
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)
106%doc vendor/adb/{OVERVIEW.TXT,SERVICES.TXT,NOTICE,protocol.txt}
107%attr(755,root,root) %{_bindir}/adb
108%attr(755,root,root) %{_bindir}/avbtool
109%attr(755,root,root) %{_bindir}/mke2fs.android
110%attr(755,root,root) %{_bindir}/simg2img
111%attr(755,root,root) %{_bindir}/img2simg
112%attr(755,root,root) %{_bindir}/fastboot
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
121%attr(755,root,root) %{_bindir}/mkbootimg
122%attr(755,root,root) %{_bindir}/mkdtboimg
123%attr(755,root,root) %{_bindir}/repack_bootimg
124%attr(755,root,root) %{_bindir}/unpack_bootimg
125/lib/udev/rules.d/51-android.rules
126%{systemdunitdir}/adb.service
127%dir %{_datadir}/android-tools
128%dir %{_datadir}/android-tools/completions
129%{_datadir}/android-tools/completions/adb
130%{_datadir}/android-tools/completions/fastboot
131%dir %{_datadir}/android-tools/mkbootimg
132%{_datadir}/android-tools/mkbootimg/gki/generate_gki_certificate.py
133%{_datadir}/android-tools/mkbootimg/mkbootimg.py
134%dir /var/lib/adb
135
136%files -n bash-completion-android-tools
137%defattr(644,root,root,755)
138%{bash_compdir}/adb
139%{bash_compdir}/fastboot
This page took 0.104874 seconds and 4 git commands to generate.