summaryrefslogtreecommitdiff
path: root/pcr/openrc-accessible/PKGBUILD
blob: 837b0dc6e73be65aa4036248e4be3f67806eb6f1 (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
# Maintainer (artix): artoo <artoo@cromnix.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_url="https://raw.githubusercontent.com/gentoo/gentoo/master"

pkgbase=openrc-accessible
pkgname=('brltty-openrc'
         'espeakup-openrc')
pkgver=20170927
pkgrel=1
pkgdesc="OpenRC init scripts"
arch=('any')
url="https://github.com/artix-linux"
license=('GPL2')
groups=('openrc-accessible')
conflicts=('systemd-sysvcompat')
source=("brltty.initd::${_url}/app-accessibility/brltty/files/brltty.rc"
        "espeakup.confd::${_url}/app-accessibility/espeakup/files/espeakup.confd"
        "espeakup.initd::${_url}/app-accessibility/espeakup/files/espeakup.rc")
sha256sums=('4dd0338d2f9943165d5922c8964ca3456e8e8b67b37cf5f2652435bc1f644c41'
            '32e6de11417ebb199a7bf46eb8cf77054b1af1c9f4bcc80b856b34758830eb9f'
            '9bfaf3950744a9376cdd74240c3e6b9a92d7b17a16a3b9eb0485f5fd279ff963')

pkgver() {
    date +%Y%m%d
}

_inst_initd(){
    install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1
}

_inst_confd(){
    install -Dm755 ${srcdir}/$1.confd ${pkgdir}/etc/conf.d/$1
}

package_brltty-openrc() {
    pkgdesc="OpenRC brltty init script"
    depends=('openrc' 'brltty')

    _inst_initd 'brltty'

    sed -e 's|/bin/brltty|/usr/bin/brltty|' \
        -i "${pkgdir}/etc/init.d/brltty"
}

package_espeakup-openrc() {
    pkgdesc="OpenRC espeakup init script"
    depends=('openrc' 'espeakup')
#    optdepends=('alsa-utils-openrc: alsa support')
    backup=('etc/conf.d/espeakup')

    _inst_confd 'espeakup'
    _inst_initd 'espeakup'
}