summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ca30468ecc676fce6358e5b6ee36883e9128c328 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: Robert Sprunk <arch-aur@sprunk.me>
# Contributor: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>

pkgname=lirc-devinput
_pkgname=lirc
_pkgver=0.10.1
[[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
pkgrel=6
epoch=1
pkgdesc="Linux Infrared Remote Control utilities with devinput enabled"
arch=('x86_64')
url="https://www.lirc.org/"
license=('GPL')
depends=('alsa-lib' 'libx11' 'libftdi' 'libusb-compat')
makedepends=('help2man' 'alsa-lib' 'libx11' 'libxslt' 'python' 'python-setuptools'
             'systemd')
optdepends=('python: for lirc-setup, irdb-get and pronto2lirc')
provides=('lirc-utils' 'lirc')
conflicts=('lirc-utils' 'lirc')
replaces=('lirc-utils')
backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
source=("https://prdownloads.sourceforge.net/${_pkgname}/${_pkgname}-${_pkgver}.tar.bz2"
        lirc-0.10-build-fix.patch
        lirc.logrotate
        lirc.tmpfiles)
sha1sums=('9d6f6d18ac566a96ef4ca1d6909a4e8bc517d48a'
          '952ce902c94d822b0113d8e74bc6fda6a551ad7e'
          '4342b004eb53d51fcbb9af2cf136bb4990874608'
          '5cd3f206e6e60632d9bea2ce9d22dbe5283eb129')

prepare() {
  cd "${srcdir}/lirc-${_pkgver}"

  patch -p1 -i ../lirc-0.10-build-fix.patch

  autoreconf -fi
  automake -ac
}

build() {
  cd "${srcdir}/lirc-${_pkgver}"

  HAVE_UINPUT=1 ./configure --prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc --localstatedir=/var --enable-devinput
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "${srcdir}/lirc-${_pkgver}"

  make DESTDIR="${pkgdir}" -j1 install

  install -Dm644 "${srcdir}"/lirc.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lirc.conf
  install -Dm644 "${srcdir}"/lirc.logrotate "${pkgdir}"/etc/logrotate.d/lirc

  rmdir "${pkgdir}"/var/{run/lirc/,run/}
}