# Maintainer: PktSurf <smlinux@pktsurf.in>
app=bubblewrap
version=0.4.1
build=1sml
homepage="https://github.com/containers/bubblewrap"
download=""
desc="Unprivileged sandboxing tool to reduce attack surfaces"
requires="libcap"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions

  applypatch $srcdir/realpath-workaround.patch
}

build() {
  ./configure \
    --prefix=/usr \
    --bindir=/bin \
    --with-priv-mode=setuid \
    --disable-man

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
075a6824a228ad733e2118ef0406a3e8b2ef34525ca95655fb7f86e1710f254ef1a665d59e5efd56e7ebcb73ef1f1eaca1fa85199f084b0afeb60d26ff00c4cd  bubblewrap-0.4.1.tar.lz
7e8395aa7801263056b0c072194240f0ae1ee1a3b0acd874baf112a7b7b5e53ac5f688ece9099067bfc1e28e52e81f107964a3288a615cc1eedb1af5f82bbd8e  realpath-workaround.patch
"
