# Maintainer: PktSurf <smlinux@pktsurf.in>
app=ipset
version=7.11
build=1sml
homepage="http://ipset.netfilter.org/"
download="https://ipset.netfilter.org/ipset-$version.tar.bz2"
desc="High-performance IP hashing and administration tool for kernel IP sets"
requires="musl kernel-source"

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

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

build() {
  # The kernel source directory requires the kernel build config file.
  # zcat /proc/config.gz > /share/linux-5.4.41
  ./configure \
    --prefix="" \
    --sbindir=/bin \
    --disable-static \
    --with-kbuild=/share/linux-5.4.41

  make
  make install DESTDIR=$pkg 

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
ed4dfc85371aafe6758191553ecc8cc82ad27a4c9f334d695ee533fbfde3d338db86cde91b0445795fcd73b6b7a0f87a84035375f031ddf1c95ff1af38e82e56  ipset-7.11.tar.lz
"
