# Maintainer: PktSurf <smlinux@pktsurf.in>
app=slapt-get
version=0.11.1
build=2sml
homepage="https://github.com/jaos/slapt-get"
desc="An apt-like front-end to Slackware's pkgtools"
requires="curl libassuan"

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

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

build() {
  make
  install -Dm 644 src/slapt.h $pkg/include/slapt.h

  install -Dm 755 src/libslapt.so.0.11.1 $pkg/lib/libslapt.so.0.11.1
  (cd $pkg/lib ; ln -s libslapt.so.0.11.1 libslapt.so)

  install -Dm 755 slapt-get $pkg/bin/slapt-get
  install -Dm 644 doc/libslapt.3 $pkg/share/man/man3/libslapt.3
  install -Dm 644 doc/slapt-get.8 $pkg/share/man/man8/slapt-get.8
  install -Dm 644 $srcdir/example.slapt-getrc $pkg/etc/slapt-get/slapt-getrc
  mkdir -p $pkg/var/cache/slapt-get

  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
da067237bfae0eb15edd0af96b366e044871d4c5b6a7d0839baaafc2ff9b0390df81c9ac414db93db15257c8331932dde6d9eb4340d281d04da6d55dbe682621  slapt-get-0.11.1.tar.lz
"
