diff options
Diffstat (limited to 'development/android-tools/android-tools.SlackBuild')
-rw-r--r-- | development/android-tools/android-tools.SlackBuild | 70 |
1 files changed, 41 insertions, 29 deletions
diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild index 8e141f5fbdfde..8fde5c30a4e2d 100644 --- a/development/android-tools/android-tools.SlackBuild +++ b/development/android-tools/android-tools.SlackBuild @@ -25,13 +25,17 @@ PRGNAM=android-tools -VERSION=${VERSION:-8.0.0_r24} -SRC1=core-6cd85e2a89347e0a107f59e38ece61fa19e6da78.tar.gz -SRC2=extras-af2dce5151ad478673401211dd71ae1579d2b5be.tar.gz -SRC3=selinux-be29c2550c3ff6551a56048c075a88da01b46cab.tar.gz -SRC4=f2fs-tools-b8baf1712d991541141bb0bdddd625f527e6d41f.tar.gz -SRC5=boringssl-58e449904e248f34bdfc2be7a609c58bcb0257b7.tar.gz - +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 BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -71,34 +75,36 @@ 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/$SRC1 -C core +tar -xvf $CWD/$SRC4 -C core +mkdir e2fsprogs +tar -xvf $CWD/$SRC5 -C e2fsprogs mkdir extras -tar -xvf $CWD/$SRC2 -C extras -mkdir selinux -tar -xvf $CWD/$SRC3 -C selinux +tar -xvf $CWD/$SRC6 -C extras mkdir f2fs-tools -tar -xvf $CWD/$SRC4 -C f2fs-tools -mkdir boringssl -tar -xvf $CWD/$SRC5 -C boringssl - -#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/core -#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/extras -#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/libselinux -#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/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 ruby $CWD/generate_build.rb > build.ninja +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 .. -cd selinux -patch -p1 < $CWD/fix_build_selinux.patch -cd .. - chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -110,16 +116,22 @@ find . \ mkdir -p boringssl/build cd boringssl/build cmake -GNinja .. -ninja +ninja crypto/libcrypto.a cd ../.. ninja mkdir -p $PKG/usr/bin -install -Dm 755 adb $PKG/usr/bin/adb -install -Dm 755 fastboot $PKG/usr/bin/fastboot -install -Dm 755 core/mkbootimg/mkbootimg $PKG/usr/bin/mkbootimg -install -Dm 755 make_ext4fs $PKG/usr/bin/make_ext4fs +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 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 |