summaryrefslogtreecommitdiffstats
path: root/abs/core/iguanair/PKGBUILD
blob: 4da37e02a8a605bce5b2b34e219ce788a3c7d80f (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
32
33
34
35
36
37
38
39
40
41
pkgname=iguanair
pkgver=1.0.1
pkgrel=2
_kernver=2.6.37-LinHES
url="http://iguanaworks.net"
pkgdesc="Linux Infrared Remote Control usb from iguanaworks"
license=('GPL2' 'LGPL')
arch=('i686' 'x86_64')
depends=('swig' 'libusb')
replaces=('iguanaIR')
source=(http://iguanaworks.net/downloads/iguanaIR-${pkgver}.tar.bz2)

build() {
        cd ${srcdir}/iguanaIR-${pkgver} || return 1
        ./configure
        make || return 1
}
package() {
        cd ${srcdir}/iguanaIR-${pkgver} || return 1
        make PREFIX=${pkgdir}/usr DESTDIR=${pkgdir} install || return 1
        install -D -m755 igclient ${pkgdir}/usr/bin/
        cp igd* ${pkgdir}/usr/bin/

        install -d ${pkgdir}/usr/share/docs/${pkgname}
        cp -r ${srcdir}/iguanaIR-${pkgver}/docs/* ${pkgdir}/usr/share/docs/${pkgname}
        rm -f ${pkgdir}/usr/share/docs/${pkgname}/Makefile

        install -d ${pkgdir}/usr/share/${pkgname}/utils
        install -d ${pkgdir}/usr/share/${pkgname}/scripts
        cp -r ${srcdir}/iguanaIR-${pkgver}/utils/* ${pkgdir}/usr/share/${pkgname}/utils
        cp -r ${srcdir}/iguanaIR-${pkgver}/scripts/* ${pkgdir}/usr/share/${pkgname}/scripts

        # python2 fix
        cd ${pkgdir}/usr/share/${pkgname}/utils
        sed -i -e "s|\#\!/usr/bin/python\ \-tt|\#\!/usr/bin/python2\ \-tt|" \
               -e "s|\#\!/usr/bin/python$|\#\!/usr/bin/python2|" $(ls)
        cd ${pkgdir}/usr/share/${pkgname}/scripts
        sed -i -e "s|\#\!/usr/bin/python\ \-tt|\#\!/usr/bin/python2\ \-tt|" \
               -e "s|\#\!/usr/bin/python$|\#\!/usr/bin/python2|" $(ls)
}
md5sums=('cf9e6e7939ff9d76aa985fab8c6f5af7')