]> git.pld-linux.org Git - packages/android-tools.git/blob - android-tools.spec
up to 34.0.5
[packages/android-tools.git] / android-tools.spec
1 Summary:        Android platform tools
2 Name:           android-tools
3 Version:        34.0.5
4 Release:        1
5 # The entire source code is ASL 2.0 except boringssl which is BSD
6 License:        ASL 2.0, BSD
7 Group:          Applications/System
8 Source0:        https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz
9 # Source0-md5:  8faca7116e885e6a225791b284cbce2e
10 Source1:        51-android.rules
11 Source2:        adb.service
12 URL:            http://developer.android.com/guide/developing/tools/
13 BuildRequires:  cmake >= 3.12.0
14 BuildRequires:  golang
15 BuildRequires:  gtest-devel
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
25 BuildRequires:  tar >= 1:1.22
26 BuildRequires:  xz
27 BuildRequires:  zlib-devel
28 BuildRequires:  zstd-devel
29 Requires:       systemd-units >= 38
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 The 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
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
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
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
73 export GO111MODULE=off
74 install -d build
75 cd build
76 %cmake .. \
77         -DBUILD_SHARED_LIBS:BOOL=OFF
78
79 %{__make}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
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
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)
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}/make_f2fs
122 %attr(755,root,root) %{_bindir}/mkbootimg
123 %attr(755,root,root) %{_bindir}/mkdtboimg
124 %attr(755,root,root) %{_bindir}/repack_bootimg
125 %attr(755,root,root) %{_bindir}/sload_f2fs
126 %attr(755,root,root) %{_bindir}/unpack_bootimg
127 /lib/udev/rules.d/51-android.rules
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
134 %{_datadir}/android-tools/mkbootimg/mkbootimg.py
135 %dir %{_datadir}/android-tools/mkbootimg/gki
136 %{_datadir}/android-tools/mkbootimg/gki/generate_gki_certificate.py
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.110133 seconds and 3 git commands to generate.