# Maintainer: PktSurf <smlinux@pktsurf.in>
app=mktorrent
version=1.1
build=1sml
homepage="https://github.com/pobrn/mktorrent"
download="https://github.com/pobrn/mktorrent/archive/refs/tags/v$version.tar.gz"
desc="Utility for creating torrent files used in bittorrent protocol"
requires="openssl"

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

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

build() {
  make 
  install -Dm 755 mktorrent $pkg/bin/mktorrent
  
  cp COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
d82e3bc32c256a1f204a97f9852d989f1812706fe90fb5a705db5bdf571dd6b1a315a75836d39965f67cad479aa7ef2e2c7b19e48a79411d6268edf22e40f57e  mktorrent-1.1.tar.lz
3387b71fa334def8f8005629fe3509f8012da16e542bde679176fe5c8e7f71e3393e412ce637b234dac4071e899947d9fe6f2b6f79ed055a72f1af3791693030  makefile.patch
"
