Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 34485a9d0cc5ac4ff9bf91fec250acd6 > files > 5

android-tools-34.0.0-5.mga9.src.rpm

# This is for Source5, 51-android.rules
%define rules_date 20230303

Name:		android-tools
Version:	34.0.0
Release:	%mkrel 5
Summary:	Android platform tools (adb, fastboot, mkbootimg)
# The entire source code is Apache Software License except fastboot/ which is BSD
# 51-android.rules is licensed under GPLv3
License:	ASL 2.0 and (ASL 2.0 and BSD) and GPLv3
Group:		Development/Tools
# https://developer.android.com/tools/
URL:		https://github.com/nmeum/android-tools
# https://developer.android.com/guide/developing/tools/
Source0:	https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz
Source5:	https://github.com/M0Rf30/android-udev-rules/raw/main/51-android.rules#/51-android-%{rules_date}.rules
Source6:	adb.service
Patch0:		android-tools-31.0.0-system-golang-x-crypto.patch
BuildRequires:	pkgconfig(bash-completion)
BuildRequires:	pkgconfig(gtest)
BuildRequires:	pkgconfig(libbrotlidec)
BuildRequires:	pkgconfig(libbrotlienc)
BuildRequires:	pkgconfig(liblz4)
BuildRequires:	pkgconfig(libpcre2-8)
BuildRequires:	pkgconfig(libunwind-generic)
BuildRequires:	pkgconfig(libusb-1.0)
BuildRequires:	pkgconfig(libzstd)
BuildRequires:	pkgconfig(openssl)
BuildRequires:	pkgconfig(protobuf)
BuildRequires:	pkgconfig(zlib)
BuildRequires:	cmake
BuildRequires:	go
BuildRequires:	golang-x-crypto-devel
BuildRequires:	golang-net-devel

Provides:	adb = %{version}-%{release}
Provides:	fastboot = %{version}-%{release}
Provides:	mkbootimg = %{version}-%{release}

# From Fedora
Provides: bundled(boringssl)

%description
The Android Debug Bridge (ADB) is used to:

- keep track of all Android devices and emulators instances
  connected to or running on a given host developer machine

- implement various control commands (e.g. "adb shell", "adb pull", etc.)
  for the benefit of clients (command-line users, or helper programs like
  DDMS). These commands are what is called a 'service' in ADB.

Fastboot is used to manipulate the flash partitions of the Android phone.
It can also boot the phone using a kernel image or root filesystem image
which reside on the host machine rather than in the phone flash.
In order to use it, it is important to understand the flash partition
layout for the phone.
The fastboot program works in conjunction with firmware on the phone
to read and write the flash partitions. It needs the same USB device
setup between the host and the target phone as adb.

For Mageia you must use the following commands:

- adb
- fastboot
- mkbootimg

%prep
%autosetup -p1

sed -i -e '1s/python$/python3/' vendor/mkbootimg/mkbootimg.py

%build
export GO111MODULE=off
%cmake -DBUILD_SHARED_LIBS:BOOL=OFF \
       -DBUILD_STATIC_LIBS:BOOL=ON
%cmake_build

%install
%cmake_install

install -d -m 0775 %{buildroot}%{_sharedstatedir}/adb
install -m 0755 vendor/mkbootimg/mkbootimg.py %{buildroot}%{_bindir}/mkbootimg

# for 51-android.rules
mkdir -p %{buildroot}%{_udevrulesdir}
install -m 0644 %{S:5} %{buildroot}%{_udevrulesdir}/51-android.rules
# for adb.service
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 %{S:6} %{buildroot}%{_unitdir}/adb.service

%post
%_post_service adb

%preun
%_preun_service adb

%files
%doc README.md
%{_udevrulesdir}/51-android.rules
%{_unitdir}/adb.service
%attr(0755,root,root) %dir %{_sharedstatedir}/adb
#Apache Software License
%{_bindir}/adb
%{_bindir}/append2simg
%{_bindir}/simg2img
%{_bindir}/img2simg
%{_bindir}/mkbootimg
%{_bindir}/mke2fs.android
%{_bindir}/e2fsdroid
%{_bindir}/ext2simg
%{_bindir}/lpadd
%{_bindir}/lpdump
%{_bindir}/lpflash
%{_bindir}/lpmake
%{_bindir}/lpunpack
%{_bindir}/repack_bootimg
%{_bindir}/unpack_bootimg
%{_bindir}/avbtool
%{_bindir}/mkdtboimg
%{_datadir}/%{name}/
%{_datadir}/bash-completion/completions/adb
#Apache Software License and BSD.
%{_bindir}/fastboot
%{_datadir}/bash-completion/completions/fastboot


%changelog
* Fri Mar 31 2023 kekepower <kekepower> 34.0.0-5.mga9
+ Revision: 1951046
- Update the Licenses
- Add Provides: bundled(boringssl) (from Fedora)
+ rapsys <rapsys>
- Remove adbusers group and from udev rules as well
- Add adbusers group

* Sun Mar 26 2023 kekepower <kekepower> 34.0.0-2.mga9
+ Revision: 1950384
- Updated 51-android.rules
- Fixed the download url to download the correct file (not html)

* Mon Mar 13 2023 kekepower <kekepower> 34.0.0-1.mga9
+ Revision: 1948816
- Update to version 34.0.0

* Thu Dec 22 2022 wally <wally> 33.0.3p1-2.mga9
+ Revision: 1925773
- rebuild for protobuf 21.12
+ kekepower <kekepower>
- Updated 51-android.rules

* Fri Nov 11 2022 kekepower <kekepower> 33.0.3p1-1.mga9
+ Revision: 1905555
- Update to version 33.0.3p1

* Wed Sep 21 2022 papoteur <papoteur> 31.0.3p2-1.mga9
+ Revision: 1891212
- new 31.0.3p1
  remove patches now included
  Fix file list
+ umeabot <umeabot>
- Mageia 9 Mass Rebuild

* Tue Dec 28 2021 wally <wally> 31.0.0p1-2.mga9
+ Revision: 1764982
- rebuild for protobuf 3.19.1

* Tue May 04 2021 daviddavid <daviddavid> 31.0.0p1-1.mga9
+ Revision: 1721331
- new version: 31.0.0p1
- switch to the unoffical CMake-based build system project for android command
  line utilities at https://github.com/nmeum/android-tools
- fix 51-android.rules file to make it usable with user
  permissions (Thanks to Alex Kotov, mga#28860)
- rename fastboot-android to fastboot like it is originally (mga#24139)

* Wed May 13 2020 akien <akien> 10.0.0_r2-3.mga8
+ Revision: 1583594
- Add udev rule for Oculus (Quest)

* Fri Mar 27 2020 umeabot <umeabot> 10.0.0_r2-2.mga8
+ Revision: 1561275
- Mageia 8 Mass Rebuild
+ wally <wally>
- replace deprecated %%configure2_5x

* Thu Sep 05 2019 cjw <cjw> 10.0.0_r2-1.mga8
+ Revision: 1437670
- patch9: fix build on aarch64
- update to version 10.0.0-r2
  o add required safe_iop.h as a separate source file
  o add several needed directories to the "core" source archive
- replace ruby script by automake build script
- compile and link with system openssl,
  instead of trying to use bundled boringssl
  while also linking against system openssl

* Sat Sep 22 2018 daviddavid <daviddavid> 8.0.0_r4-3.mga7
+ Revision: 1295952
- add patch to fix build with new glibc (thanks to Arusekk)
+ umeabot <umeabot>
- Mageia 7 Mass Rebuild

* Sun Jul 22 2018 joequant <joequant> 8.0.0_r4-2.mga7
+ Revision: 1244884
- Fix crash with new libcrypto

* Sat Sep 02 2017 cjw <cjw> 8.0.0_r4-1.mga7
+ Revision: 1150879
- add BuildRequires: ruby
- update to version 8.0.0_r4
- use patches, config files, and build scripts of current fedora package

* Mon Feb 08 2016 umeabot <umeabot> 4.4.2_r2-5.mga6
+ Revision: 945800
- Mageia 6 Mass Rebuild

* Wed Oct 15 2014 umeabot <umeabot> 4.4.2_r2-4.mga5
+ Revision: 745743
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 4.4.2_r2-3.mga5
+ Revision: 677757
- Mageia 5 Mass Rebuild

* Sat Apr 05 2014 daviddavid <daviddavid> 4.4.2_r2-2.mga5
+ Revision: 612018
- add post and preun service to start or stop adb service (since he is a systemd unit file)

* Fri Apr 04 2014 daviddavid <daviddavid> 4.4.2_r2-1.mga5
+ Revision: 611768
- change fastboot to fastboot-android (name already use by lsb-core-noarch)
- imported package android-tools