aboutsummaryrefslogtreecommitdiff
path: root/development/android-tools/android-tools.SlackBuild
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2021-08-31 10:42:46 +0200
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-09-06 08:50:30 +0700
commitac6dd57682fb7996d9e53d2b1918520c1b49cced (patch)
tree5373dcf7237b81f24252f3df7903c0560d7db9b4 /development/android-tools/android-tools.SlackBuild
parent7b9d8fadc76e5f5e469fe4b862a8e0e9b8b541a6 (diff)
development/android-tools: Updated for version 31.0.2.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/android-tools/android-tools.SlackBuild')
-rw-r--r--development/android-tools/android-tools.SlackBuild83
1 files changed, 16 insertions, 67 deletions
diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild
index 0e63d7069374d..5b3eb73f2e026 100644
--- a/development/android-tools/android-tools.SlackBuild
+++ b/development/android-tools/android-tools.SlackBuild
@@ -27,17 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=android-tools
-VERSION=${VERSION:-29.0.5}
-SRC1=avb-355c69ae673220da533696c44acbfa489702d1ff.tar.gz
-SRC2=base-d634d2306033599c00b83e68c9ecb60e3206d40c.tar.gz
-SRC3=boringssl-a7a75f208caea8a303615724d4cc5f4e8dfb9695.tar.gz
-SRC4=core-fa4254a53a368a8f9b6604442eace6a7b6b63b6d.tar.gz
-SRC5=e2fsprogs-5fab03bbdc3789515748af8181b9e82dd99beb3b.tar.gz
-SRC6=extras-6748c3dd53494096ffeebfeeb12e3b3efad90a83.tar.gz
-SRC7=f2fs-tools-39ec3b4c2edc136d32392ddc7a7f222b4c68e88c.tar.gz
-SRC8=mkbootimg-e29814dcf6434e8d14379062e4ea1c1b58ff11d0.tar.gz
-SRC9=native-b9005758dcf78f89c6640ffb119b5b527a417928.tar.gz
-SRC10=selinux-9e188fde016babc76150098e0ab288e053cf92e2.tar.gz
+VERSION=${VERSION:-31.0.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -81,68 +71,27 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $TMP/android-tools
-mkdir $TMP/android-tools
-cd $TMP/android-tools
-
-mkdir avb
-tar -xvf $CWD/$SRC1 -C avb
-mkdir base
-tar -xvf $CWD/$SRC2 -C base
-mkdir boringssl
-tar -xvf $CWD/$SRC3 -C boringssl
-mkdir core
-tar -xvf $CWD/$SRC4 -C core
-mkdir e2fsprogs
-tar -xvf $CWD/$SRC5 -C e2fsprogs
-mkdir extras
-tar -xvf $CWD/$SRC6 -C extras
-mkdir f2fs-tools
-tar -xvf $CWD/$SRC7 -C f2fs-tools
-mkdir mkbootimg
-tar -xvf $CWD/$SRC8 -C mkbootimg
-mkdir native
-tar -xvf $CWD/$SRC9 -C native
-mkdir selinux
-tar -xvf $CWD/$SRC10 -C selinux
-cp -a $CWD/deployagent.jar .
-
-# generate_build.rb borrowed from Arch Linux
-# And thanks to Alan Alberghini for the make_ext4fs patch.
-PKGVER=$VERSION LDFLAGS='-Wl,-z,relro,-z,now' ruby $CWD/generate_build.rb > build.ninja
-
-cd core
-patch -p1 < $CWD/fix_build_core.patch
-cd ..
-
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
chown -R root:root .
-find . \
+find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Build boringssl
-mkdir -p boringssl/build
-cd boringssl/build
-cmake -GNinja ..
-"${NINJA:=ninja}"
-$NINJA crypto/libcrypto.a
-cd ../..
-
-$NINJA
-
-mkdir -p $PKG/usr/bin
-install -D -m 0755 adb $PKG/usr/bin/adb
-install -D -m 0755 fastboot $PKG/usr/bin/fastboot
-install -D -m 0755 mke2fs.android $PKG/usr/bin/mke2fs.android
-install -D -m 0755 e2fsdroid $PKG/usr/bin/e2fsdroid
-install -D -m 0755 ext2simg $PKG/usr/bin/ext2simg
-install -D -m 0755 avb/avbtool $PKG/usr/bin/avbtool
-install -D -m 0755 mkbootimg/mkbootimg.py $PKG/usr/bin/mkbootimg
-install -D -m 0755 mkbootimg/unpack_bootimg.py $PKG/usr/bin/unpack_bootimg
-
-install -D -m 0644 $CWD/bash_completion.fastboot $PKG/usr/share/bash-completion/completions/fastboot
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -GNinja \
+ -DCMAKE_BUILD_TYPE=Release ..
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true