summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d91610b025a23d39c898334c4a71fc5857171968 (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
# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com>
# Contributor: zaplo

_basename=webrtc-audio-processing
pkgname=lib32-webrtc-audio-processing
pkgver=0.3.1
pkgrel=3
pkgdesc="AudioProcessing library based on Google's implementation of WebRTC"
url="https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/"
arch=(x86_64)
license=(custom)
depends=(lib32-gcc-libs webrtc-audio-processing)
makedepends=(git)
_commit=e882a5442ac22c93648e12837248d651d18b9247  # tags/v0.3.1^0
source=("git+https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
    cd $_basename

    git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
    cd $_basename

    NOCONFIGURE=1 ./autogen.sh
}

build() {
    cd $_basename

    export CC='gcc -m32'
    export CXX='g++ -m32'
    export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

    ./configure \
        --build=i686-pc-linux-gnu \
        --prefix=/usr \
        --libdir=/usr/lib32 \
        --disable-static

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    make
}

package() {
    cd $_basename

    make DESTDIR=${pkgdir} install

    rm -r "$pkgdir/usr/include"

    install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}