# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=udftools
pkgver=%version%
pkgrel=%release%
pkgdesc='Linux tools for UDF filesystems and DVD/CD-R(W) drives'
url='https://github.com/pali/udftools'
arch=('x86_64')
license=('GPL')
depends=('ncurses' 'readline')
makedepends=('systemd')
source=("https://github.com/pali/$pkgname/releases/download/$pkgver/$pkgname-${pkgver}.tar.gz")
sha256sums=('750dcf5c797765eb42265e0a56d1a99f97f94b7f6f4534263a5410503f0caf59')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  sed -i 's|/lib/|$(libdir)/|' pktsetup/Makefile.am
  autoreconf -fi
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man \
    --sbindir=/usr/bin
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  make DESTDIR="$pkgdir" install
}

