summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 2d53a56b75a1386746bd52552907db555283f4cf (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (AUR): Trevor Bergeron <aur@sec.gd>

# # I maintain this because:
# AUR version uses http
# I use it and it is not in an official repo

pkgname=nginx-mainline-mod-rtmp
pkgver=1.2.1
pkgrel=20

_modname="nginx-rtmp-module"
_nginxver=1.19.3

pkgdesc="Module for mainline nginx that adds RTMP support"
arch=('i686' 'x86_64')
depends=("nginx-mainline=${_nginxver}")
url="https://github.com/arut/nginx-rtmp-module"
license=('BSD')

source=(
    https://nginx.org/download/nginx-$_nginxver.tar.gz
    https://nginx.org/download/nginx-$_nginxver.tar.gz.asc
    ${pkgname}-${pkgver}.tar.gz::https://github.com/arut/$_modname/archive/v$pkgver.tar.gz
)
b2sums=('96cbbb4224ca8fcddc67b8fd025acdb31b1a07ba20a0f8b665c29c02b53568bbb0b79a7e583f3a7e7b23ff51cb01b1694eee9a178f7f26ce70f96312655a2b59'
        'SKIP'
        '744ccb8031eb9653f158f9eceba64fc9c8af7b9a42e64ef996ab3bbbe1402e5ffd3efcc8e4aaca437eb5e208e4b6f2d8643fcca953b32f32543eaa1ae4d9505c')
validpgpkeys=('B0F4253373F8F6F510D42178520A9993A1C052F8')

build() {
    cd "$srcdir"/nginx-$_nginxver

    # Cribbed from aur/nginx-mainline-mod-http-xslt-filter by Sergey Shatunov
    opts=$(nginx -V 2>&1 | grep 'configure arguments' | sed -r 's@^[^:]+: @@')
    IFS=$'\n' opts=( $(xargs -n1 <<< "$opts") )
    ./configure "${opts[@]}" --add-dynamic-module=../$_modname-$pkgver

    make modules
}

package() {
    cd "$srcdir"/nginx-$_nginxver/objs
    for mod in *.so; do
        install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
    done
}