summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f039b2a2f11f8f9d8cbb32d5f6843cb603f037de (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
# Maintainer: Yves G. <theYinYeti@yalis.fr>

pkgname=simple-sso-git
pkgver=0.alpha
pkgrel=2
pkgdesc="Simple Single Sign-On written in LUA and embedded into Nginx, using the OpenResty environment"
arch=(any)
url="https://yalis.fr/git/yves/simple-sso"
license=('GPL')
depends=(openresty)
makedepends=('git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=()
options=()
install=
source=('simple-sso::git+https://yalis.fr/git/yves/simple-sso.git#branch=develop')
noextract=()
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname%-git}"

  # Git, tags available
  printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"

  # Git, no tags available
  #printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  :
}

build() {
  :
}

check() {
  :
}

package() {
  local etcdest="$pkgdir/etc/nginx/ssso"
  local usrdest="$pkgdir/usr/share/doc/${pkgname%-git}"

  cd "$srcdir/${pkgname%-git}"
  mkdir -p "$etcdest/sites" "$usrdest"

  cp    src/*.lua                  "$etcdest/"
  cp -r doc/samples/{login,portal} "$etcdest/"
  cp -r doc/* README.md            "$usrdest/"
}