summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6f30e1814175fdf148607a19afbb60f7ab1c41d0 (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: GordonGR <ntheo1979@gmail.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: xduugu
# Contributor: Elis Hughes <elishughes@googlemail.com>

pkgname=lib32-rtmpdump
pkgver=2.4.r99.f1b83c1
pkgrel=1
epoch=1
pkgdesc='A toolkit for RTMP streams (32 bit)'
arch=(x86_64)
url=http://rtmpdump.mplayerhq.hu/
license=(GPL2 LGPL2.1)
depends=(lib32-glibc lib32-gnutls lib32-zlib rtmpdump)
makedepends=(git)
_commit=f1b83c10d8beb43fcc70a6e88cf4325499f25857
source=(git+https://git.ffmpeg.org/rtmpdump#commit=${_commit})
sha256sums=('SKIP')

pkgver() {
    cd rtmpdump

    echo "2.4.r$(git rev-list --count c28f1bab7822de97353849e7787b59e50bbb1428..HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
    cd rtmpdump

    sed -e 's/^CRYPTO=OPENSSL/#CRYPTO=OPENSSL/' -e 's/#CRYPTO=GNUTLS/CRYPTO=GNUTLS/' -i Makefile -i librtmp/Makefile
    sed -i -e 's:gcc:gcc -m32:' Makefile librtmp/Makefile
    sed -i -e 's/host_cpu\=\"\${host\%\%-\*}\"/host_cpu\="i386"/' Makefile librtmp/Makefile
    sed -i -e 's/march\=\"\${march\%\%-\*}\"/march\="i386"/' Makefile librtmp/Makefile
}

build() {
    cd rtmpdump

    sed -e 's/^CRYPTO=OPENSSL/#CRYPTO=OPENSSL/' -e 's/#CRYPTO=GNUTLS/CRYPTO=GNUTLS/' -i Makefile -i librtmp/Makefile

    make \
        OPT="$CFLAGS" \
        XLDFLAGS="$LDFLAGS"
}

package() {
    cd rtmpdump

    make \
        DESTDIR="${pkgdir}" \
        prefix=/usr \
        sbindir=/usr/bin \
        mandir=/usr/share/man \
        libdir=/usr/lib32 \
        install

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