summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c4df8beaac6e73a20101bb003f38b18237876ccb (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
# Maintainer: Jat <chat@jat.email>

pkgname='pulseaudio-module-xrdp'
pkgver='0.7'
pkgrel='1'
pkgdesc='PulseAudio modules for xrdp.'
arch=('i686' 'x86_64' 'armv6h' 'armv7l' 'aarch64')
url="https://github.com/neutrinolabs/pulseaudio-module-xrdp"
license=('LGPL-2.1')
depends=('pulseaudio' 'xrdp')
makedepends=('meson' 'check' 'doxygen' 'perl-xml-parser')
install="${pkgname}.install"

_pulseaudio_ver="$(pulseaudio --version | awk '{print $NF}')"
: "${_pulseaudio_ver:=17.0}"

source=(
    "${url}/archive/refs/tags/v${pkgver}.tar.gz"
    "https://freedesktop.org/software/pulseaudio/releases/pulseaudio-${_pulseaudio_ver}.tar.xz"
)
sha256sums=(
    'be101538ebe891bd4ae9d533559b99cf07abf0bbce399f50f2d248f35c160a9d'
    "$(curl -fs "${source[1]}.sha256sum" | awk '{print $1}')"
)

prepare() {
    cd "${srcdir}/pulseaudio-${_pulseaudio_ver}"

    meson build
}

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"

    sed -i '\#-I $(PULSE_DIR)/src#a -I $(PULSE_DIR)/build \\' src/Makefile.am

    ./bootstrap
    ./configure "PULSE_DIR=${srcdir}/pulseaudio-${_pulseaudio_ver}"
    make
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"

    make DESTDIR="$pkgdir" install
}