1
0
forked from pool/android-tools

5 Commits

Author SHA256 Message Date
732e13ca44 Accepting request 1223843 from hardware
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1223843
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/android-tools?expand=0&rev=22
2024-11-13 14:29:14 +00:00
d29eee870d - Exclude ppc ppc64 and ppc64le: Bundled boringssl doesn't support
the big endian architectures and dropped ppc64le support
- Simplify python3 requirements
- Simplify fix-install-completion.patch

OBS-URL: https://build.opensuse.org/package/show/hardware/android-tools?expand=0&rev=74
2024-11-09 05:18:46 +00:00
11c94a6378 Accepting request 1217137 from hardware
- Fix build for Leap 16.0
- Add 'Provides: bundled(...)' where appropriate
- Clean up spec file
- remove adb from bash-completion package for SLE15 because it is
  still part of bash-completion itself
- Use specific python versions for all SLE15 variants
- Require protobuf >= 21 until earlier variants are supported again

OBS-URL: https://build.opensuse.org/request/show/1217137
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/android-tools?expand=0&rev=21
2024-10-23 19:10:34 +00:00
298f81b8ad - Fix build for Leap 16.0
- Add 'Provides: bundled(...)' where appropriate
- Clean up spec file

OBS-URL: https://build.opensuse.org/package/show/hardware/android-tools?expand=0&rev=72
2024-10-22 12:55:54 +00:00
0e0ba04989 - remove adb from bash-completion package for SLE15 because it is
still part of bash-completion itself
- Use specific python versions for all SLE15 variants
- Require protobuf >= 21 until earlier variants are supported again

OBS-URL: https://build.opensuse.org/package/show/hardware/android-tools?expand=0&rev=71
2024-09-25 05:17:08 +00:00
3 changed files with 74 additions and 102 deletions

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Nov 5 05:16:45 UTC 2024 - munix9@googlemail.com
- Exclude ppc ppc64 and ppc64le: Bundled boringssl doesn't support
the big endian architectures and dropped ppc64le support
- Simplify python3 requirements
- Simplify fix-install-completion.patch
-------------------------------------------------------------------
Sun Oct 20 11:48:59 UTC 2024 - munix9@googlemail.com
- Fix build for Leap 16.0
- Add 'Provides: bundled(...)' where appropriate
- Clean up spec file
-------------------------------------------------------------------
Sun Sep 22 22:22:22 UTC 2024 - olaf@aepfle.de
- remove adb from bash-completion package for SLE15 because it is
still part of bash-completion itself
- Use specific python versions for all SLE15 variants
- Require protobuf >= 21 until earlier variants are supported again
-------------------------------------------------------------------
Thu Aug 29 19:00:08 UTC 2024 - munix9@googlemail.com

View File

@@ -16,20 +16,14 @@
#
%define _pyver 3
%if 0%{?sle_version} == 150500 || 0%{?sle_version} == 150600
%define _pyver 311
%if 0%{?suse_version} <= 1600
%bcond_without bundled_libfmt
%else
%bcond_with bundled_libfmt
%endif
%if 0%{?sle_version} == 150400
%define _pyver 310
%endif
%if 0%{?suse_version} < 1600
%define use_bundled_libfmt 1
%endif
# currently libusb with support for SuperSpeed+ is required,
# currently libusb with support for SuperSpeedPlus is required,
# which is not yet released, so the one bundled is used.
%define use_bundled_libusb 1
%bcond_without bundled_libusb
Name: android-tools
Version: 35.0.2
@@ -45,34 +39,39 @@ BuildRequires: go
BuildRequires: llvm-gold
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: python%{_pyver}
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libbrotlicommon)
BuildRequires: pkgconfig(liblz4)
BuildRequires: pkgconfig(libpcre2-8)
BuildRequires: pkgconfig(libunwind-generic)
BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(protobuf)
BuildRequires: pkgconfig(protobuf) >= 21
BuildRequires: pkgconfig(zlib)
Requires: android-udev-rules
Suggests: %{name}-mkbootimg = %{version}
Suggests: %{name}-partition = %{version}
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
ExcludeArch: s390x
Provides: bundled(boringssl)
ExcludeArch: ppc ppc64 ppc64le s390x
%if 0%{?suse_version} < 1600
BuildRequires: clang15
BuildRequires: gcc11-c++
BuildRequires: python311
%else
BuildRequires: clang
BuildRequires: python3
%endif
%if %{undefined use_bundled_libfmt}
%if %{with bundled_libfmt}
Provides: bundled(fmt) = 10.2.0
%else
BuildRequires: pkgconfig(fmt) >= 10.2.0
%endif
%if %{undefined use_bundled_libusb}
BuildRequires: pkgconfig(libusb-1.0)
%else
%if %{with bundled_libusb}
BuildRequires: pkgconfig(libudev)
Provides: bundled(libusb-1_0)
%else
BuildRequires: pkgconfig(libusb-1.0)
%endif
%description
@@ -111,26 +110,23 @@ Bash command line completion support for android-tools.
%define __builder ninja
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-buildid="
%if 0%{?suse_version} < 1600
CMAKE_C_COMPILER=clang-15
CMAKE_CXX_COMPILER=clang++-15
%else
CMAKE_C_COMPILER=clang
CMAKE_CXX_COMPILER=clang++
%endif
%cmake \
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} \
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} \
%if %{defined use_bundled_libfmt}
-DANDROID_TOOLS_USE_BUNDLED_FMT=ON \
%endif
%if %{defined use_bundled_libusb}
-DANDROID_TOOLS_USE_BUNDLED_LIBUSB=ON \
-DANDROID_TOOLS_LIBUSB_ENABLE_UDEV=ON \
%if 0%{?suse_version} < 1600
-DCMAKE_C_COMPILER=clang-15 \
-DCMAKE_CXX_COMPILER=clang++-15 \
%else
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
%endif
%ifarch %{ix86}
-DOPENSSL_NO_ASM=ON \
%endif
%if %{with bundled_libfmt}
-DANDROID_TOOLS_USE_BUNDLED_FMT=ON \
%endif
%if %{with bundled_libusb}
-DANDROID_TOOLS_USE_BUNDLED_LIBUSB=ON \
-DANDROID_TOOLS_LIBUSB_ENABLE_UDEV=ON \
%endif
-DBUILD_SHARED_LIBS=OFF
@@ -145,12 +141,12 @@ ln -sf %{_datadir}/%{name}/mkbootimg/mkbootimg.py %{buildroot}%{_bindir}/mkbooti
# fix non-executable-script
chmod 0755 %{buildroot}%{_datadir}/%{name}/mkbootimg/gki/generate_gki_certificate.py
# fix env-script-interpreter (Leap requires special handling)
# fix env-script-interpreter (Leap < 16.0 requires special handling)
%if 0%{?suse_version} < 1600
%define python3_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \
myargs="%{**}" \
for f in ${myargs}; do \
[ -f $f ] && sed -i "1s@#\\!.*python.*@#\\!$(realpath %{expand:%{__python%{_pyver}}})@" $f \
[ -f $f ] && sed -i "1s@#\\!.*python.*@#\\!$(realpath %{__python311})@" $f \
done
%endif
%python3_fix_shebang_path %{buildroot}%{_bindir}/*
@@ -195,7 +191,11 @@ mkbootimg --help
%{_bindir}/lp{add,dump,flash,make,unpack}
%files bash-completion
%if 0%{?suse_version} < 1600
%exclude %{_datadir}/bash-completion/completions/adb
%else
%{_datadir}/bash-completion/completions/adb
%endif
%{_datadir}/bash-completion/completions/fastboot
%changelog

View File

@@ -14,79 +14,28 @@ diff -ruN a/CMakeLists.txt b/CMakeLists.txt
diff -ruN a/vendor/adb/adb.bash b/vendor/adb/adb.bash
--- a/vendor/adb/adb.bash
+++ b/vendor/adb/adb.bash
@@ -16,11 +16,11 @@
@@ -15,6 +15,10 @@
# limitations under the License.
#
+check_type() {
+ type -t "$1"
+}
+
_adb() {
- if ! check_type "$1" >/dev/null; then
+ if ! type -t "$1" >/dev/null; then
if ! check_type "$1" >/dev/null; then
return
fi
- if check_type _init_completion >/dev/null; then
+ if type -t _init_completion >/dev/null; then
_init_completion || return
fi
@@ -455,7 +455,7 @@
fi
# Since we're probably doing file completion here, don't add a space after.
- if [[ $(check_type compopt) == "builtin" ]]; then
+ if [[ $(type -t compopt) == "builtin" ]]; then
compopt -o nospace
fi
@@ -471,7 +471,7 @@
xspec=$2
# Since we're probably doing file completion here, don't add a space after.
- if [[ $(check_type compopt) == "builtin" ]]; then
+ if [[ $(type -t compopt) == "builtin" ]]; then
compopt -o plusdirs
if [[ "${xspec}" == "" ]]; then
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -f -- "${cur}") )
@@ -512,7 +512,7 @@
}
-if [[ $(check_type compopt) == "builtin" ]]; then
+if [[ $(type -t compopt) == "builtin" ]]; then
complete -F _adb adb
else
complete -o nospace -F _adb adb
diff -ruN a/vendor/core/fastboot/fastboot.bash b/vendor/core/fastboot/fastboot.bash
--- a/vendor/core/fastboot/fastboot.bash
+++ b/vendor/core/fastboot/fastboot.bash
@@ -16,11 +16,11 @@
@@ -15,6 +15,10 @@
# limitations under the License.
#
+check_type() {
+ type -t "$1"
+}
+
_fastboot() {
- if ! check_type "$1" >/dev/null; then
+ if ! type -t "$1" >/dev/null; then
if ! check_type "$1" >/dev/null; then
return
fi
- if check_type _init_completion >/dev/null; then
+ if type -t _init_completion >/dev/null; then
_init_completion || return
fi
@@ -135,7 +135,7 @@
xspec=$2
# Since we're probably doing file completion here, don't add a space after.
- if [[ $(check_type compopt) == "builtin" ]]; then
+ if [[ $(type -t compopt) == "builtin" ]]; then
compopt -o plusdirs
if [[ "${xspec}" == "" ]]; then
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -f -- "${cur}") )
@@ -175,7 +175,7 @@
fi
}
-if [[ $(check_type compopt) == "builtin" ]]; then
+if [[ $(type -t compopt) == "builtin" ]]; then
complete -F _fastboot fastboot
else
complete -o nospace -F _fastboot fastboot