updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / libk8055 / PKGBUILD
blob674a803908fcf089e4a6f0a5a65bb4d9be05b4d5
1 # Maintainer: Bernd Amend <berndamend web de>
3 pkgname=libk8055
4 pkgver=0.4.1
5 pkgrel=1
6 pkgdesc="Userspace usb driver and api for the Velleman K8055 USB Board"
7 arch=('i686' 'x86_64')
8 url="http://${pkgname}.sourceforge.net/"
9 license=('LGPL')
11 # for the moment we keep the old udev rules file
12 source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgname}.0.4/${pkgname}.${pkgver}.tar.gz"
13                 70-libk8055.rules)
15 sha1sums=('a64f064e0aa32c8c8b6df43faba780d347f8844a'
16           '733a6088c506ba5fbf535a7ce1d6dadf6172976d')
18 build() {
19         cd "${srcdir}/src"
20         
21         # compile library
22         gcc -O2 -DDAEMON -DVERSION='"0.4.1"' -Wall -c -g -fPIC ${pkgname}.c
23         gcc -o ${pkgname}.so -lusb -shared ${pkgname}.o
25         # build the program
26         gcc main.c -o k8055 -L. -lk8055 -lm
28         install -d -m755 "${pkgdir}/usr/share/man/man1/" "${pkgdir}/usr/include/" "${pkgdir}/usr/lib/" "${pkgdir}/usr/bin/" "${pkgdir}/lib/udev/rules.d/"
30         install -m644 man/k8055.1.gz "${pkgdir}/usr/share/man/man1/"
31         install -m644 k8055.h "${pkgdir}/usr/include/"
32         install -m644 "${srcdir}/70-libk8055.rules" "${pkgdir}/lib/udev/rules.d/"
33         install -m755 ${pkgname}.so "${pkgdir}/usr/lib/"
34         install -m755 k8055 "${pkgdir}/usr/bin/"
36         cd "${pkgdir}/usr/lib"
37         ln -s ${pkgname}.so ${pkgname}.so.0.4
38         ln -s ${pkgname}.so ${pkgname}.so.${pkgver}