makedeb


hardened-malloc-light 11-1


Hardened memory allocator from GraphaneOS project - Optimized to minimize breakages

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for hardened-malloc-light.

# Maintainer: Ege Öz <ege.oz@tutanota.com> 
pkgname=hardened-malloc-light
pkgver=11
pkgrel=1
pkgdesc="Hardened memory allocator from GraphaneOS project - Optimized to minimize breakages"
arch=('any')
makedepends=('gcc')

source=("https://github.com/GrapheneOS/hardened_malloc/archive/refs/tags/${pkgver}.tar.gz")
sha256sums=('14331990899b91f9323230c280d66f0d1a77c386eb5d206d4cd0d8b5683098da')

build() {
	cd hardened_malloc-${pkgver}
	make -j$(nproc) VARIANT=light
}

package() {
	cd hardened_malloc-${pkgver}
	mkdir -p "${pkgdir}/usr/local/lib/"
	mkdir -p "${pkgdir}/etc/sysctl.d/"

	echo "vm.max_map_count = 1048576" > "${pkgdir}/etc/sysctl.d/hardened_malloc-light.conf"
	install -Dm775 out-light/libhardened_malloc-light.so "${pkgdir}/usr/local/lib/"
}