# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=libnjb pkgver=2.2.7 pkgrel=3 pkgdesc="A software library for talking to the Creative Nomad Jukeboxes and Dell DJs" url="http://libnjb.sourceforge.net/" arch="all" license="BSD" depends="" depends_dev="libusb-compat-dev" makedepends="$depends_dev eudev-dev zlib-dev ncurses-dev" install="" subpackages="$pkgname-dev $pkgname-examples" source="http://download.sourceforge.net/libnjb/libnjb-$pkgver.tar.gz" _builddir="$srcdir"/libnjb-$pkgver prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 } examples() { pkgdesc="Example programs for libnjb" mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } md5sums="73f25f3297abe316dd0abec921781d50 libnjb-2.2.7.tar.gz"