db-move: moved linux from [testing] to [core] (x86_64)
[arch-packages.git] / brltty / trunk / PKGBUILD
blob984a1daafcdcc9787386045bc42083f052b30233
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Alexander Epaneshnikov <aarnaarn2@gmail.com>
3 # Contributor: Tom Gundersen <teg@jklm.no>
4 # Contributor: Jan de Groot <jgc@archlinux.org>
5 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
7 pkgbase=brltty
8 pkgname=(brltty brltty-udev-generic)
9 pkgver=6.5
10 pkgrel=4
11 pkgdesc="Braille display driver for Linux/Unix"
12 arch=(x86_64)
13 url="https://brltty.app"
14 license=(LGPL2.1)
15 makedepends=(alsa-lib at-spi2-atk at-spi2-core atk bluez-libs cython dbus
16 dracut espeak-ng expat festival gcc-libs glibc glib2 gpm icu java-environment
17 liblouis libspeechd libxaw ncurses ocaml-ctypes ocaml-findlib pcre2
18 polkit python-setuptools speech-dispatcher strip-nondeterminism systemd-libs
19 tcl)
20 options=(!emptydirs)
21 source=(
22   https://brltty.app/archive/$pkgname-$pkgver.tar.bz2
23   $pkgname-6.2-systemd_sysusers_groups.patch
24   $pkgname-6.4-x11_autostart.patch
26 sha512sums=('7aef484f8f719fe183ea4d83b75962ff1e1fb0002d38ee89bd41808c3cae768cbd65c63cbdcb9a27beecaddc442fb65d8fb9219e48c87a1a02dda4ecc55cc24f'
27             '32ba91271e2247b4a330cd213ed75b591268cb99a79c2efd9ae675804faee027c6b2f782768cb2329a65fc914ca2400b2901f35ce1fc2522c6691b343799eb02'
28             '4871512affefbc178f4204a1b285fc2b5a05ea2d181163195d695b760e9729b3d2d00b5f052abd71379df609c3859d7cbd64128bdefd16e898bbc4368500a9a0')
29 b2sums=('9d431c033d0963f6afe59477d2d109029c1bededf4ea333a3347ff8c4c17073af3439a827ff4db44dce08dd2245e1bc57cc2fe443bf44df6225f75ffab2fa244'
30         '036e36d558594bb06af1eb41ff5fc9ae52ccf4bad54556c3f4f81a5e2f31f574039835e5e756455527c327a73d563a3db54a9f32e3478545a2a22c2725aaeee2'
31         '4ebc07a725ef8362233a83118e93901e78943e8dae08f9358b668ff13ab88a65eb9e87c49d106a8c3d87eb62007b230e199107eacb01f92dc683335076c01309')
33 prepare() {
34   cd $pkgbase-$pkgver
35   patch -Np1 -i ../$pkgbase-6.2-systemd_sysusers_groups.patch
36   patch -Np1 -i ../$pkgbase-6.4-x11_autostart.patch
37   ./autogen
40 build() {
41   # fat-lto-objects is required for non-mangled static libs
42   CFLAGS+=" -ffat-lto-objects"
44   cd $pkgbase-$pkgver
45   ./configure \
46     --prefix=/usr \
47     --sysconfdir=/etc \
48     --localstatedir=/var \
49     --mandir=/usr/share/man \
50     --with-scripts-directory=/usr/lib/brltty \
51     --with-tables-directory=/usr/share/brltty \
52     --with-writable-directory=/run/brltty \
53     --enable-gpm \
54     --disable-stripping
55   make -j1
56   # make brlapi.jar deterministic
57   find . -type f -iname "*.jar" -exec strip-nondeterminism {} \;
60 package_brltty() {
61   depends=(bluez-libs gcc-libs glibc liblouis libspeechd libasound.so
62   libdbus-1.so libexpat.so libgio-2.0.so libglib-2.0.so libgobject-2.0.so
63   libicuuc.so libgpm.so libncursesw.so libsystemd.so pcre2 polkit)
64   optdepends=(
65     'at-spi2-core: X11/GNOME Apps accessibility'
66     'atk: ATK bridge for X11/GNOME accessibility'
67     'brltty-udev-generic: for initializing brltty with generic USB devices'
68     'espeak-ng: espeak-ng driver'
69     'java-runtime: Java support'
70     'libxaw: X11 support'
71     'libxt: X11 support'
72     'libx11: for xbrlapi'
73     'libxfixes: for xbrlapi'
74     'libxtst: for xbrlapi'
75     'ocaml: OCaml support'
76     'python: Python support'
77     'speech-dispatcher: speech-dispatcher driver'
78     'tcl: tcl support'
79   )
80   provides=(libbrlapi.so)
81   backup=(
82     etc/brltty.conf
83     etc/X11/xinit/xinitrc.d/90xbrlapi
84   )
85   install=brltty.install
87   cd $pkgbase-$pkgver
88   # installation does not work reliably with many cores, so set jobs to 1
89   make -j1 INSTALL_ROOT="$pkgdir" install
90   make -j1 INSTALL_ROOT="$pkgdir" install-systemd
91   make -j1 INSTALL_ROOT="$pkgdir" install-udev
92   make -j1 INSTALL_ROOT="$pkgdir" install-dracut
93   make -j1 INSTALL_ROOT="$pkgdir" install-polkit
94   install -vDm 644 Documents/$pkgbase.conf -t "$pkgdir/etc/"
96   # fix directory permission and ownership
97   install -vdm 750 -o root -g 102 "$pkgdir/usr/share/polkit-1/rules.d"
99   # move generic udev rule, as it applies too broadly
100   mv -v "$pkgdir/usr/lib/udev/rules.d/90-brltty-usb-generic.rules" ../
103 package_brltty-udev-generic() {
104   pkgdesc="Generic udev rules for brltty"
105   depends=(brltty)
107   install -vDm 644 90-brltty-usb-generic.rules -t "$pkgdir/usr/lib/udev/rules.d/"