PKGBUILDs/extra/lirc/PKGBUILD

93 lines
2.8 KiB
Bash
Raw Normal View History

2014-08-16 14:20:07 +00:00
# $Id$
# Maintainer: Paul Mattal <paul@archlinux.org>
2012-07-19 12:28:28 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2014-08-16 14:20:07 +00:00
# - removed dependencies to the kernel
pkgbase=lirc
pkgname=('lirc' 'lirc-utils')
2014-08-16 23:51:09 +00:00
_pkgver=0.9.1a
[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
2014-10-06 15:49:14 +00:00
pkgrel=5
epoch=1
arch=('i686' 'x86_64')
url="http://www.lirc.org/"
license=('GPL')
2013-12-03 18:19:31 +00:00
makedepends=('help2man' 'alsa-lib' 'libx11' 'libftdi-compat' 'libirman' 'python2')
options=('!makeflags' '!strip')
2014-08-16 23:51:09 +00:00
source=("http://prdownloads.sourceforge.net/${pkgbase}/${pkgbase}-${_pkgver}.tar.bz2"
2014-08-18 11:14:33 +00:00
wpc8769l-build-fix.patch
2014-08-20 11:14:04 +00:00
lirc-0.9.1a-fix-segfaults.patch
2014-08-16 14:20:07 +00:00
lirc.logrotate
irexec.service
lirc.tmpfiles)
2014-08-16 23:51:09 +00:00
md5sums=('1f1fac162ed309dd50f307e96a292957'
2014-08-16 14:20:07 +00:00
'9ec33169b3407f74264062d7679dd269'
2014-08-20 11:14:04 +00:00
'cd00acf480e82a0bf050032732d0d733'
'3deb02604b37811d41816e9b4385fcc3'
2014-08-16 14:20:07 +00:00
'32df3b9bc859565d6acf5f0e5b747083'
2012-10-02 12:48:11 +00:00
'febf25c154a7d36f01159e84f26c2d9a')
2013-12-03 18:19:31 +00:00
prepare() {
2014-08-16 23:51:09 +00:00
cd "${srcdir}/lirc-${_pkgver}"
2014-08-16 14:20:07 +00:00
patch -Np1 -i "${srcdir}/wpc8769l-build-fix.patch"
2014-08-20 11:14:04 +00:00
patch -Np1 -i "${srcdir}/lirc-0.9.1a-fix-segfaults.patch"
2013-10-08 23:00:40 +00:00
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
2014-08-16 14:20:07 +00:00
libtoolize
autoreconf
2013-12-03 18:19:31 +00:00
}
2013-12-03 18:19:31 +00:00
build() {
2014-08-16 23:51:09 +00:00
cd "${srcdir}/lirc-${_pkgver}"
2014-08-16 14:20:07 +00:00
PYTHON=python2 ./configure --enable-sandboxed --prefix=/usr \
2013-05-27 21:12:14 +00:00
--with-driver=userspace --sbindir=/usr/bin --with-transmitter
2014-08-16 14:20:07 +00:00
# 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() {
2014-08-16 14:20:07 +00:00
pkgdesc="Linux Infrared Remote Control drivers"
depends=('lirc-utils')
replaces=('lirc+pctv')
2014-08-16 23:51:09 +00:00
cd "${srcdir}/lirc-${_pkgver}/drivers"
2014-08-16 14:20:07 +00:00
make DESTDIR="${pkgdir}" install
}
package_lirc-utils() {
pkgdesc="Linux Infrared Remote Control utils"
2013-12-03 18:19:31 +00:00
depends=('alsa-lib' 'libx11' 'libftdi-compat' 'libirman')
optdepends=('python2: pronto2lirc utility')
2014-08-16 14:20:07 +00:00
options=('strip')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
2012-10-02 12:48:11 +00:00
install=lirc-utils.install
2014-08-16 23:51:09 +00:00
cd "${srcdir}/lirc-${_pkgver}"
2014-08-16 14:20:07 +00:00
make DESTDIR="${pkgdir}" install
2014-08-16 14:20:07 +00:00
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"
}