Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:embar-:Lietukas
android-tools
android-tools.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File android-tools.spec of Package android-tools
# # spec file for package android-tools # # Copyright (c) 2012–2016 dmitry_r@opensuse.org # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # # NOTE: This specfile is heavily based on the Arch package (generate_build.rb # comes from there, which is also used in Fedora). One of the primary # differences is we use the system boringssl. Name: android-tools Version: 9.0.0_r68 Release: 0 Summary: Android platform tools (adb, fastboot) License: Apache-2.0 AND BSD-3-Clause AND GPL-3.0-or-later Group: Hardware/Mobile URL: https://developer.android.com/studio/releases/platform-tools.html # NOTE: All of the sources are auto-extracted to SOURCES (thanks to obs_scm), # so we can just copy them without needing to re-tar them. Source50: generate_build.rb # bash-completion (base64 encoded) Source70: https://android.googlesource.com/platform/system/core/+/refs/tags/android-security-10.0.0_r54/adb/adb.bash?format=TEXT#/adb.bash Source71: https://android.googlesource.com/platform/system/core/+/refs/tags/android-security-10.0.0_r54/fastboot/fastboot.bash?format=TEXT#/fastboot.bash Patch1: fix_build_core.patch Patch2: fix_build_e2fsprogs.patch Patch3: fix-include-limits.patch BuildRequires: boringssl-devel BuildRequires: clang BuildRequires: gtest BuildRequires: help2man BuildRequires: ninja BuildRequires: pcre2-devel BuildRequires: pkgconfig BuildRequires: ruby BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libsepol) BuildRequires: pkgconfig(libusb-1.0) BuildRequires: pkgconfig(zlib) Requires: android-udev-rules # Needed for mkbootimg and avbtool. Requires: python3 %description Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform. %package bash-completion Summary: Bash completion for adb and fastboot Group: Hardware/Mobile BuildRequires: bash-completion Requires: bash-completion Supplements: (%{name} and bash) BuildArch: noarch %description bash-completion Bash command line completion support for adb and fastboot. %prep # Copy extracted sources. cp -ar %{_sourcedir}/*-%{version}/ . # Remove the version suffix. rename -- "-%{version}" "" * # fix_build_*.patch pushd core %patch1 -p1 %patch3 -p1 popd pushd e2fsprogs %patch2 -p1 popd # hack: fix for glibc >= 2.30 grep -Z -l -r --include=\*.{c,cpp,h,def,policy} '\bgettid\b' | \ xargs -0 sed -i'.bak' 's/\bgettid\b/sys_gettid/g' %build %define _lto_cflags %{nil} # Workaround since openSUSE's boringssl doesn't provide /usr/include/openssl. mkdir include ln -s %{_includedir}/boringssl include/openssl # Fix she-bang lines. sed -Ei '1s/env python.*$/python3/' avb/avbtool sed -Ei '1s/env python.*$/python3/' core/mkbootimg/mkbootimg # Build android-tools. export PKGVER="%{version}" export CFLAGS="%{optflags} -I$PWD/include/ -fPIE -fcommon" export CXXFLAGS="%{optflags} -I$PWD/include/ -fPIE -fcommon" export LDFLAGS="-Wl,-z,relro,-z,now -pie" ruby %{SOURCE50} | tee build.ninja ninja %install install -D -m 0755 -t %{buildroot}%{_bindir} fastboot adb mke2fs.android e2fsdroid ext2simg \ core/mkbootimg/mkbootimg avb/avbtool # help2man / bash-completion install -d -m 0755 %{buildroot}%{_mandir}/man1 \ %{buildroot}%{_datadir}/bash-completion/completions for f in adb fastboot do help2man -N %{buildroot}%{_bindir}/${f} | sed -e 's|\(/home/.*\)\(/usr/.*\)|\2|g' \ > %{buildroot}%{_mandir}/man1/${f}.1 base64 --decode %{_sourcedir}/${f}.bash | sed -e 's/check_type/type -t/g' \ > %{buildroot}%{_datadir}/bash-completion/completions/${f} done %files %license core/adb/NOTICE %doc core/adb/OVERVIEW.TXT core/adb/SERVICES.TXT core/adb/SYNC.TXT core/adb/protocol.txt %{_bindir}/adb %{_bindir}/avbtool %{_bindir}/e2fsdroid %{_bindir}/ext2simg %{_bindir}/fastboot %{_bindir}/mkbootimg %{_bindir}/mke2fs.android %{_mandir}/man1/*.1%{?ext_man} %files bash-completion %license core/adb/NOTICE %{_datadir}/bash-completion/completions/* %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor