PKGBUILDs/extra/lirc/PKGBUILD
2014-08-16 14:20:07 +00:00

88 lines
2.6 KiB
Bash

# $Id$
# Maintainer: Paul Mattal <paul@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed dependencies to the kernel
pkgbase=lirc
pkgname=('lirc' 'lirc-utils')
pkgver=0.9.1
pkgrel=1
epoch=1
arch=('i686' 'x86_64')
url="http://www.lirc.org/"
license=('GPL')
makedepends=('help2man' 'alsa-lib' 'libx11' 'libftdi-compat' 'libirman' 'python2')
options=('!makeflags' '!strip')
source=("http://prdownloads.sourceforge.net/${pkgbase}/${pkgbase}-${pkgver}.tar.bz2"
"wpc8769l-build-fix.patch"
lirc.logrotate
irexec.service
lirc.tmpfiles)
md5sums=('3b78c3cc872d5e2fa78b796c2efd46db'
'9ec33169b3407f74264062d7679dd269'
'3deb02604b37811d41816e9b4385fcc3'
'32df3b9bc859565d6acf5f0e5b747083'
'febf25c154a7d36f01159e84f26c2d9a')
prepare() {
cd "${srcdir}/lirc-${pkgver}"
patch -Np1 -i "${srcdir}/wpc8769l-build-fix.patch"
sed -i '/AC_PATH_XTRA/d' configure.ac
sed -e 's/@X_CFLAGS@//g' \
-e 's/@X_LIBS@//g' \
-e 's/@X_PRE_LIBS@//g' \
-e 's/@X_EXTRA_LIBS@//g' -i Makefile.am tools/Makefile.am
libtoolize
autoreconf
}
build() {
cd "${srcdir}/lirc-${pkgver}"
PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \
--with-driver=userspace --sbindir=/usr/bin --with-transmitter
# Remove drivers already in kernel
sed -e "s:lirc_dev::" -e "s:lirc_bt829::" -e "s:lirc_igorplugusb::" \
-e "s:lirc_imon::" -e "s:lirc_parallel::" -e "s:lirc_sasem::" \
-e "s:lirc_serial::" -e "s:lirc_sir::" -e "s:lirc_ttusbir::" \
-e "s:lirc_atiusb::" -e "s:lirc_i2c::" \
-i Makefile drivers/Makefile drivers/*/Makefile tools/Makefile
make
}
package_lirc() {
pkgdesc="Linux Infrared Remote Control drivers"
depends=('lirc-utils')
replaces=('lirc+pctv')
cd "${srcdir}/lirc-${pkgver}/drivers"
make DESTDIR="${pkgdir}" install
}
package_lirc-utils() {
pkgdesc="Linux Infrared Remote Control utils"
depends=('alsa-lib' 'libx11' 'libftdi-compat' 'libirman')
optdepends=('python2: pronto2lirc utility')
options=('strip')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
install=lirc-utils.install
cd "${srcdir}/lirc-${pkgver}"
make DESTDIR="${pkgdir}" install
install -Dm644 "${srcdir}"/irexec.service "${pkgdir}"/usr/lib/systemd/system/irexec.service
install -Dm644 "${srcdir}"/lirc.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lirc.conf
cp -rp remotes "${pkgdir}/usr/share/lirc"
chmod -R go-w "${pkgdir}/usr/share/lirc/"
# install the logrotate config
install -Dm644 "${srcdir}/lirc.logrotate" "${pkgdir}/etc/logrotate.d/lirc"
}