summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bf6c1275357b2c6c20c97cfb22972a3f2f96151a (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: josephgbr <rafael.f.f1 at gmail dot com>
# Contributor: GordonGR <ntheo1979@gmail.com>

_basename=faac
pkgname=lib32-faac
pkgver=1.30
pkgrel=3
pkgdesc="Freeware Advanced Audio Coder"
arch=(x86_64)
url="https://www.audiocoding.com/"
license=('GPL2' 'custom')
depends=(lib32-glibc faac)
source=("${_basename}-${pkgver}.tar.gz::https://github.com/knik0/${_basename}/archive/${pkgver/./_}.tar.gz"
        "${_basename}-1.30-pkgconfig.patch::https://github.com/knik0/faac/commit/11215a2dc792d28a8fa7bbef059c6798d248a0ea.patch")
sha512sums=('8582cd580dba2a347d15dc4fab42020d7120d0552c54ab74cfaf59ba1b270abb94c67e39d42459a14cbc6e98f3fd00cbda589e1b4f0c7278e41bdef6ae7b6554'
            '3dafe1c6921758a4610a49d8ae106e9fb6dccdd0d5cc3a3eedf8c91c01f1eaa0ee6b65cadfb86ae47093f35499baa8d795397457f7b34280b02199095c6f9e29')
b2sums=('ee3cf1ad44c14ec289036c9a6f087df3a1cf81c9b0f60b6a2121f5badba3f3cab983001437bb6051ab2306c0e5e14ee8e3c9439116bd82c370f808d912ce2c13'
        'ccb6d86c8a23ded205c6f0baa24172f753e98649e35c98031c401a9154444bac923ec0d89a811cc1a6ac868347d46878cd2443028abec8fdc24020084c4c725b')

prepare() {
    mv -v "${_basename}-${pkgver/./_}" "${_basename}-${pkgver}"

    cd "${_basename}-${pkgver}"

    # add pkg-config file
    patch -Np1 -i ../"${_basename}-1.30-pkgconfig.patch"

    autoreconf -vfi
}

build() {
    cd "${_basename}-${pkgver}"

    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

    make
}

package() {
    cd "${_basename}-${pkgver}"

    make DESTDIR="$pkgdir" install

    rm -rf "$pkgdir"/usr/{bin,include,share}

    install -Dm644 "${srcdir}"/${_basename}-${pkgver}/COPYING \
     "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}