# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libdmtx
pkgver=0.7.7
pkgrel=2
pkgdesc='A software for reading and writing Data Matrix 2D barcodes'
url='https://libdmtx.sourceforge.net/'
arch=(x86_64)
license=(LicenseRef-libdmtx)
depends=(glibc)
makedepends=(git)
source=(git+https://github.com/dmtx/libdmtx#tag=v$pkgver)
sha256sums=('1cff71eb7c0fdfea658caf30639c19b8d36c2485cb31ac6267f260c5b7aaa7a6')

prepare() {
  cd $pkgname
  autoreconf -vi
}

build() {
  cd $pkgname
  ./configure \
    --prefix=/usr
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
