archrelease: copy trunk to testing-x86_64
[arch-packages.git] / lirc / trunk / PKGBUILD
blob60352361634bd358a5e7188b8bc319ebd49969d0
1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
2 # Contributor: Paul Mattal <paul@archlinux.org>
4 pkgname=lirc
5 _pkgver=0.10.1
6 [[ $_pkgver =~ [a-z]$ ]] && pkgver="${_pkgver:0:-1}.${_pkgver: -1}" || pkgver="$_pkgver"
7 pkgrel=12
8 epoch=1
9 pkgdesc="Linux Infrared Remote Control utilities"
10 arch=('x86_64')
11 url="https://www.lirc.org/"
12 license=('GPL')
13 depends=('alsa-lib' 'libx11' 'libftdi' 'libusb-compat')
14 makedepends=('help2man' 'alsa-lib' 'libx11' 'libxslt' 'python' 'python-setuptools'
15              'python-yaml' 'systemd')
16 optdepends=('python: for lirc-setup, irdb-get and pronto2lirc'
17             'python-gobject: for lirc-setup and irdb-get'
18             'python-yaml: for lirc-setup and irdb-get')
19 provides=('lirc-utils')
20 conflicts=('lirc-utils')
21 replaces=('lirc-utils')
22 backup=('etc/lirc/lirc_options.conf' 'etc/lirc/lircd.conf' 'etc/lirc/lircmd.conf')
23 source=("https://prdownloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.bz2"
24         lirc-0.10-build-fix.patch
25         lirc.logrotate
26         lirc.tmpfiles
27         python-yaml-6.patch)
28 sha1sums=('9d6f6d18ac566a96ef4ca1d6909a4e8bc517d48a'
29           '952ce902c94d822b0113d8e74bc6fda6a551ad7e'
30           '4342b004eb53d51fcbb9af2cf136bb4990874608'
31           '5cd3f206e6e60632d9bea2ce9d22dbe5283eb129'
32           '3d6d40bba363051ae36c09709dc5a41166cf2d51')
34 prepare() {
35   cd "${srcdir}/lirc-${_pkgver}"
37   patch -p1 -i ../lirc-0.10-build-fix.patch
38   patch -p1 -i ../python-yaml-6.patch # Fix build with python-yaml 6
40   autoreconf -fi
41   automake -ac
44 build() {
45   cd "${srcdir}/lirc-${_pkgver}"
47   ./configure \
48     --prefix=/usr \
49     --sbindir=/usr/bin \
50     --sysconfdir=/etc \
51     --localstatedir=/var \
52     --enable-devinput \
53     --enable-uinput
54   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
55   make
58 package() {
59   cd "${srcdir}/lirc-${_pkgver}"
61   make DESTDIR="${pkgdir}" -j1 install
63   install -Dm644 "${srcdir}"/lirc.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/lirc.conf
64   install -Dm644 "${srcdir}"/lirc.logrotate "${pkgdir}"/etc/logrotate.d/lirc
66   rmdir "${pkgdir}"/var/{run/lirc/,run/}