Hello all,

This is my first submission to AUR, the attachment is the PKGBUILD for nginx-http-flv-module, a media streaming module for nginx, based on the work of nginx-rtmp. It has all the features that nginx-rtmp has, and added the http trigger for flv streaming. With this, it is possible to create http request-triggered on-demand rtmp live flow.

Reviews and comments are welcomed.

Thanks,
TZ
# Maintainer: Tony Zhou (tonytz...@gmail.com)
# Modified from Trevor Bergeron <a...@sec.gd>'s PKGBUILD for nginx-rtmp-module

pkgname=nginx-http-flv-module
pkgver=1.2.3
pkgrel=1

_modname="nginx-http-flv-module"
_nginxver="$(/bin/nginx -v 2>&1 | grep -Eo '([[:digit:]]|\.)+')"

pkgdesc="Media server mod for nginx based on nginx-rtmp-module"
arch=('x86_64' 'armv7h')
depends=('nginx')
conflicts=('nginx-rtmp' 'nginx-mod-rtmp' 'nginx-mainline-rtmp' 
'nginx-mainline-mod-rtmp')
url="https://github.com/winshining/nginx-http-flv-module";
license=('BSD')

source=(
    http://nginx.org/download/nginx-$_nginxver.tar.gz
    https://github.com/winshining/$_modname/archive/v$pkgver.tar.gz
)
sha256sums=('SKIP'
            '9cd8988d668e815043e2dbf08c6ba5431eed3462367602476a3d89a761104a70')

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
}

Reply via email to