updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / libnxt / PKGBUILD
blob77574e84c76a3bcbd6e047d9aeab53e47b2986e7
1 # Maintainer: Aliaksiej ArtamonaĆ­ <aliaksiej.artamonau@gmail.com>
3 pkgname=libnxt
4 pkgver=0.3
5 pkgrel=2
6 pkgdesc='An utility library for talking to the LEGO Mindstorms NXT intelligent brick'
8 arch=('i686' 'x86_64')
9 url='http://code.google.com/p/libnxt/'
10 license=('GPL2')
11 depends=('libusb-compat>=0.1' 'libusb-compat<0.2')
12 makedepends=('scons')
14 source=(http://libnxt.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
15         SConstruct
16         libnxt.pc)
17 md5sums=('05be5f5b8822f10e4fc4e1dea7d5e770'
18          'f9eb13200f74c6697acef81b020777f2'
19          'baa352b8bc0ea33e25674e7bbfb27e66')
21 build() {
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} || \
41         return 1
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