summaryrefslogtreecommitdiff
path: root/nonsystemd/openrc-desktop/PKGBUILD
blob: ea946695d840db4c64835b1b710ae2a1bface985 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Maintainer (Artix): artoo <artoo@cromnix.org>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Maintainer: David P <megver83@parabola.nu>

pkgver=20200817 # date +%Y%m%d
_commit=5cf13c1eee7fdb74078d79a2c85d1fe2fdde192c
_url="https://raw.githubusercontent.com/gentoo/gentoo/${_commit}"

pkgbase=openrc-desktop
pkgname=('acpid-openrc'
         'alsa-utils-openrc'
         'avahi-openrc'
         'bluez-openrc'
         'displaymanager-openrc'
         'gpm-openrc'
         'wpa_supplicant-openrc')
pkgrel=1
arch=('any')
url='https://github.com/gentoo/gentoo'
license=('GPL2')
groups=('openrc-desktop')
source=('acpid.confd'
        'acpid.initd'
        "alsasound.confd::${_url}/media-sound/alsa-utils/files/alsasound.confd-r4"
        "alsasound.initd::${_url}/media-sound/alsa-utils/files/alsasound.initd-r8"
        'avahi-daemon.initd'
        'avahi-dnsconfd.initd'
        'autoipd-openrc.sh'
        'bluetoothd.initd'
        'xdm.confd'
        'xdm.initd'
        'xdm-setup.initd'
        'startDM.sh'
        "gpm.confd::${_url}/sys-libs/gpm/files/gpm.conf.d"
        "gpm.initd::${_url}/sys-libs/gpm/files/gpm.rc6-2"
        "wpa_supplicant.confd::${_url}/net-wireless/wpa_supplicant/files/wpa_supplicant-conf.d"
        "wpa_supplicant.initd::${_url}/net-wireless/wpa_supplicant/files/wpa_supplicant-init.d"
        "${_url}/net-wireless/wpa_supplicant/files/wpa_cli.sh")
sha256sums=('3755d4eb8bb64a1304e5defedb949305ac550565da36fe4f94d5f31beee821ba'
            '5dcf5721a129b3782c13fc453853c390c34e2ad4ee00706388ce014454b063ee'
            'd1c55400b701a72dcb8bb85e016b5013fa3eb6a2766ffc20dae278d0ee4c1a43'
            '37495f08f2aeb934180c1fb0ef6528f8108a41b614be1fe4f596c783871ce68b'
            '876788303553fe773e64917f76f0208f5e8adf7b91d4af24aa9d6a68a147d646'
            'e128576d72981e402ff106bb481108ab6d5ba941ab1b0f5f53e96a7831fc1d15'
            '064a4cedc00f67e93a6f2ef99489e2614305a673a75a2135010283e99da6d6bf'
            'b80a38737be3a1112bc52d2474e8ece3adb405a92623cfb36c3df5aed99ebf51'
            '24dc07139087bd2261eb2de268ae5228a37a4db4fc695a7d9e647d95c36044df'
            'a65d8c3a0210e4ec336f6b19900122d3a27c097893773aaf5c7de91d96399b36'
            'cb49240e32b5bb22d7764890e765c94276ec66b597caeacd5121618f614c3bec'
            '28dbefc67b332712273047ff0a5776b379217368f9a572665b43c2f486591058'
            '73e7483fdc4b12ab4225a4cb13bbe7da71b07b9e69b17e3a6a4c63cb5e2287c8'
            'b48fd8ef0c4e64ca3f3ada72e8e2148a276f86bf3cbb1a165504058bd15385c1'
            '27833f60a091464612e74e6171cc98c3e3f994e2fde0ccc4535dd0d84ed041fa'
            '98985142371d39ea6294d757e85a3d3fc9fc21718063afbf81869e1d2ca648a7'
            'f3aa34b99a90213c53496f8ea014c487266338791f3526043a7fd97adc651fc6')

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

    local _sed_args=()
    sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \
        -e 's|/var/run|/run|g' \
        -e 's|/usr/sbin|/usr/bin|g' \
        -e 's|/sbin|/usr/bin|g' \
        -i ${pkgdir}/etc/init.d/$1
}

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

package_acpid-openrc() {
    pkgdesc="OpenRC acpid init script"
    depends=('openrc' 'acpid')
    backup=('etc/conf.d/acpid')

    _inst_confd 'acpid'
    _inst_initd 'acpid'
}

package_alsa-utils-openrc() {
    pkgdesc="OpenRC alsa-utils init script"
    depends=('openrc' 'alsa-utils')
    backup=('etc/conf.d/alsasound')

    _inst_confd 'alsasound'
    _inst_initd 'alsasound'
}

package_avahi-openrc() {
    pkgdesc="OpenRC avahi init script"
    depends=('avahi' 'dbus-openrc')

    _inst_initd 'avahi-daemon'
    _inst_initd 'avahi-dnsconfd'

    install -Dm755 autoipd-openrc.sh ${pkgdir}/usr/lib/netifrc/net/autoipd.sh
}

package_bluez-openrc() {
    pkgdesc="OpenRC bluez init script"
    depends=('bluez' 'openrc')

    _inst_initd 'bluetoothd'
}

package_displaymanager-openrc() {
    pkgdesc="OpenRC display manager init script"
    depends=('xorg-server' 'xorg-xinit' 'openrc')
    backup=('etc/conf.d/xdm')
    install=displaymanager.install

    _inst_confd 'xdm'
    _inst_initd 'xdm'
    _inst_initd 'xdm-setup'

    install -Dm755 "${srcdir}/startDM.sh" "${pkgdir}/etc/X11/startDM.sh"
}

package_gpm-openrc() {
    pkgdesc="OpenRC gpm init script"
    depends=('openrc' 'gpm')
    backup=('etc/conf.d/gpm')

    _inst_confd 'gpm'
    _inst_initd 'gpm'
}

package_wpa_supplicant-openrc() {
    pkgdesc="OpenRC wpa_supplicant init script"
    depends=('openrc' 'wpa_supplicant')
    backup=('etc/conf.d/wpa_supplicant')

    _inst_confd 'wpa_supplicant'
    _inst_initd 'wpa_supplicant'

    install -Dm755 "${srcdir}/wpa_cli.sh" "${pkgdir}/etc/wpa_supplicant/wpa_cli.sh"

    sed -e "s|gentoo-release|parabola-release|" -i "${pkgdir}/etc/wpa_supplicant/wpa_cli.sh"
}