1 # Maintainer: Aliaksiej ArtamonaĆ <aliaksiej.artamonau@gmail.com>
6 pkgdesc='An utility library for talking to the LEGO Mindstorms NXT intelligent brick'
9 url='http://code.google.com/p/libnxt/'
11 depends=('libusb-compat>=0.1' 'libusb-compat<0.2')
14 source=(http://libnxt.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
17 md5sums=('05be5f5b8822f10e4fc4e1dea7d5e770'
18 'f9eb13200f74c6697acef81b020777f2'
19 'baa352b8bc0ea33e25674e7bbfb27e66')
22 cp ${srcdir}/SConstruct ${srcdir}/${pkgname}-${pkgver} || return 1
24 _soname=${pkgname}.so.0 _shname=${pkgname}.so.${pkgver} \
25 scons -C ${srcdir}/${pkgname}-${pkgver} || return 1
27 install -d -m755 ${pkgdir}/usr/include/libnxt || return 1
28 install -m644 -t ${pkgdir}/usr/include/libnxt \
29 ${srcdir}/${pkgname}-${pkgver}/*.h || return 1
31 install -d -m755 ${pkgdir}/usr/bin || return 1
32 install -m755 -t ${pkgdir}/usr/bin \
33 ${srcdir}/${pkgname}-${pkgver}/{fwexec,fwflash} || return 1
35 install -d -m755 ${pkgdir}/usr/lib || return 1
36 install -m644 -t ${pkgdir}/usr/lib \
37 ${srcdir}/${pkgname}-${pkgver}/libnxt.a || return 1
39 install -m755 -t ${pkgdir}/usr/lib \
40 ${srcdir}/${pkgname}-${pkgver}/${pkgname}.so.${pkgver} || \
42 ldconfig -N ${pkgdir}/usr/lib || return 1
43 ln -sf ${pkgname}.so.0 ${pkgdir}/usr/lib/${pkgname}.so || return 1
45 install -d -m755 ${pkgdir}/usr/lib/pkgconfig || return 1
46 install -m644 -t ${pkgdir}/usr/lib/pkgconfig ${srcdir}/libnxt.pc || return 1