# Maintainer: PktSurf <smlinux@pktsurf.in>
app=pkgconf
version=1.7.3
build=3sml
homepage="https://git.sr.ht/~kaniini/pkgconf"
download="https://distfiles.dereferenced.org/pkgconf/pkgconf-$version.tar.xz"
desc="Drop-in replacement for the bloated pkg-config utility"
requires="musl"

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

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

build() {
  ./configure \
    --prefix="" \
    --docdir="/share/doc/$app-$version" \
    --disable-static \
    --with-pkg-config-dir="/lib/pkgconfig:/share/pkgconfig"

  make
  make install DESTDIR=$pkg

  cp COPYING $pkgdocs/

  ( cd $pkg/bin ; ln -sf pkgconf pkg-config )

  mkfinalpkg
}

sha512sums="
56c89550f4c3d4cf12587e6645ad107cbfe1a768cbb1668ee74f41305943227edabba781ccf15c5b48c811c0e8918538382d074d08b80b740aca6caec086654c  pkgconf-1.7.3.tar.lz
"
