summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: afba07c84cb2b3bae402b82e06b118a0bdde40e6 (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
60
61
62
63
# Maintainer: Francois Menning <f.menning@pm.me>
# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

_modname="ngx_vod"

pkgname=nginx-mainline-mod-vod-git
pkgver=r1370.fbb8982
pkgrel=1
pkgdesc="NGINX-based MP4 Repackager"
arch=('i686' 'x86_64')
depends=(
  'nginx-mainline'
  'ffmpeg'
  'openssl'
)
optdepends=(
  'ffmpeg-libfdk_aac: audio filtering support'
  'libiconv: DFXP captions support'
  'libxml2: UTF-16 encoded SRT files support'
)
makedepends=('git' 'nginx-mainline-src')
provides=('nginx-mainline-mod-vod')
conflicts=('nginx-mainline-mod-vod')
url="https://github.com/kaltura/nginx-vod-module"
license=('CUSTOM')
source=("$_modname::git+https://github.com/kaltura/nginx-vod-module.git")
validpgpkeys=(
  'B0F4253373F8F6F510D42178520A9993A1C052F8' # Maxim Dounin <mdounin@mdounin.ru>
)
sha256sums=('SKIP')

pkgver() {
  cd "$_modname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cp -r /usr/src/nginx .

	cd "$srcdir"/$_modname
	sed 's@/usr/local@/usr@' -i config
}

build() {
  cd "$srcdir"/nginx
 
  ./configure --with-compat --add-dynamic-module=../$_modname \
    --with-file-aio \
    --with-threads \
    --with-cc-opt="-O3"
 
  make modules
}

package() {
  install -Dm644 "$srcdir"/$_modname/LICENSE \
                  "$pkgdir"/usr/share/licenses/$pkgname/LICENSE

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