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>
8 pkgname=(brltty brltty-udev-generic)
11 pkgdesc="Braille display driver for Linux/Unix"
13 url="https://brltty.app"
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
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')
35 patch -Np1 -i ../$pkgbase-6.2-systemd_sysusers_groups.patch
36 patch -Np1 -i ../$pkgbase-6.4-x11_autostart.patch
41 # fat-lto-objects is required for non-mangled static libs
42 CFLAGS+=" -ffat-lto-objects"
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 \
56 # make brlapi.jar deterministic
57 find . -type f -iname "*.jar" -exec strip-nondeterminism {} \;
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)
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'
73 'libxfixes: for xbrlapi'
74 'libxtst: for xbrlapi'
75 'ocaml: OCaml support'
76 'python: Python support'
77 'speech-dispatcher: speech-dispatcher driver'
80 provides=(libbrlapi.so)
83 etc/X11/xinit/xinitrc.d/90xbrlapi
85 install=brltty.install
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"
107 install -vDm 644 90-brltty-usb-generic.rules -t "$pkgdir/usr/lib/udev/rules.d/"