summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38d68c115ee28e22023559138626a6423b7b3c23 (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
# $Id$
# Maintainer: Martchus <martchus@gmx.net>

pkgname=nginx-mod-slowfs-cache
pkgver=1.10
pkgrel=13
_dirname="ngx_slowfs_cache-${pkgver}"
_nginxver=1.26.0

pkgdesc='NGINX module that adds ability to cache static files'
arch=('x86_64')
depends=("nginx=$_nginxver")
makedepends=("nginx-src")
url='http://labs.frickle.com/nginx_ngx_slowfs_cache'
license=('CUSTOM')

source=("$pkgname-$pkgver::http://labs.frickle.com/files/${_dirname}.tar.gz")
sha256sums=('1e81453942e5b0877de1f1f06c56ae82918ea9818255cb935bcb673c95a758a1')

prepare() {
  cd "$srcdir/$_dirname"
  echo '
  if [ "$ngx_module_link" = DYNAMIC ] ; then
      ngx_module_type=HTTP
      ngx_module_name=ngx_http_slowfs_module
      ngx_module_srcs="$ngx_addon_dir/ngx_http_slowfs_module.c"
      . auto/module
  fi' >> config
}

build() {
  cp -r /usr/src/nginx .
  cd "$srcdir"/nginx
  ./configure --with-compat --add-dynamic-module="../$_dirname"
  make modules
}

package() {
  install -Dm755 "$srcdir/$_dirname/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
}