summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 26908326fd032b29b1da968fea7bf557a1084574 (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
# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com>
# Contributor: orumin <dev@orum.in>

pkgname=lib32-sbc
pkgver=2.0
pkgrel=1
pkgdesc="Bluetooth Subband Codec (SBC) library (32-bit)"
url="https://git.kernel.org/pub/scm/bluetooth/sbc.git"
arch=(x86_64)
license=(GPL LGPL)
depends=(lib32-glibc sbc)
makedepends=(git lib32-gcc-libs)
_commit=8dc5d5ba381512ad5b1afa45c63ec6b0a3833244 # tags/2.0^0
source=("git+$url#commit=$_commit")
b2sums=('SKIP')

pkgver() {
    cd sbc

    git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
    cd sbc

    autoreconf -fvi
}

build() {
    cd sbc

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

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

    make
}

check() {
    cd sbc

    make check
}

package() {
    cd sbc

    make DESTDIR="$pkgdir" install

    cd "$pkgdir"/usr

    rm -r bin include
}