pmaports/main/libsparse/APKBUILD
Pablo Castellano ff968a751e Implement sparse system images (fix #299) (#303)
* Packaged libsparse

libsparse from the Android project provides multiple tools like img2simg
and simg2img.
These are used to split a large image for the system partition into
separate smaller chunks with sparse headers

This is required for several devices (at least bullhead, fp2 and titan)
because it fixes the "Invalid sparse file format at header magi" error

https://github.com/postmarketOS/pmbootstrap/issues/299

* Added new variable deviceinfo_flash_sparse (fixes #299)

Right after the system image is generated, pmbootstrap checks this
variable. In case it is true, run img2simg on it

* motorola-titan: enable deviceinfo_flash_sparse

* libsparse: use source from github: anestisb/android-simg2img

It is not that easy to use the upstream archive because everytime
you download it, the files have the current date as creation date
and that makes the file have a different checksum every download
https://github.com/postmarketOS/pmbootstrap/pull/303#issuecomment-319017197
2017-08-02 16:21:50 +00:00

29 lines
846 B
Text

pkgname=libsparse
pkgver="1.0.0"
pkgrel=1
pkgdesc="Android Sparse library"
url="https://android.googlesource.com"
arch="all"
license="APACHE2"
depends="python3"
makedepends="zlib-dev"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/anestisb/android-simg2img/archive/${pkgver}.tar.gz"
options="!check"
build() {
cd "$srcdir"/android-simg2img-"$pkgver"
sed -i -e 's./usr/bin/env python./usr/bin/env python3.' simg_dump.py
make sparse
make
}
package() {
cd "$srcdir"/android-simg2img-"$pkgver"
for i in append2simg img2simg simg2img simg2simg simg_dump.py; do
install -D -m755 "$i" "$pkgdir"/usr/bin/"$i" || return 1
done
}
sha512sums="e43ad20760243ee88441d3016dea776224373377a5f0d367fca2da8b44f4dcc17c779ad2aed79b2f04861f4e56ec3472c0f2dc5c8fc12dc87f57d608cfc8faf6 libsparse-1.0.0.tar.gz"