summaryrefslogtreecommitdiffstats
path: root/abs/extra/joyutils/PKGBUILD
blob: bd24a63ed5b1d58e63e9f81ab6a82df438f1b3a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Arkham <arkham at archlinux dot us>
# Contributor: dirty_d <andrew2085 at gmail dot com>

pkgname=joyutils
pkgver=1.2.15
pkgrel=2
pkgdesc="jscal, jstest, and jsattach utilities for the linux joystick driver"
arch=('i686' 'x86_64')
url="http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/"
license=('GPL')
source=(ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-$pkgver.tar.gz)
md5sums=('023500eb6986e1a94aa1a0c30af729c2')

build() {
    # Fix some warnings
    cd $srcdir/joystick-$pkgver
    sed -i 's:#include <sys/ioctl.h>:#include <stdlib.h>\n#include <sys/ioctl.h>:' jscal.c

    # Compile
    gcc -lm -o jscal jscal.c
    gcc -o jstest jstest.c
    gcc -o jsattach jsattach.c

    # Install
    install -Dm 755 jscal $pkgdir/usr/bin/jscal
    install -m 755 jstest $pkgdir/usr/bin/
    install -m 755 jsattach $pkgdir/usr/bin/
    install -Dm 644 jscal.1 $pkgdir/usr/share/man/man1/jscal.1
    install -m 644 jstest.1 $pkgdir/usr/share/man/man1/
    install -m 644 jsattach.1 $pkgdir/usr/share/man/man1/
}