-
Notifications
You must be signed in to change notification settings - Fork 2
/
rockcraft.yaml
72 lines (63 loc) · 1.61 KB
/
rockcraft.yaml
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
64
65
66
67
68
69
70
71
72
name: glauth
base: bare
build-base: [email protected]
version: "2.3.1"
summary: GLAuth
description: |
GLAuth LDAP authentication server
license: Apache-2.0
run-user: _daemon_
platforms:
amd64:
services:
glauth:
override: replace
command: glauth -c /etc/config/glauth.cfg
startup: enabled
parts:
util:
plugin: nil
stage-packages:
# This is needed to pipe the stdout/stderr to a file for log forwarding
- coreutils
prime:
- usr/bin/tee
shell:
plugin: nil
stage-packages:
# This is needed to pipe the stdout/stderr to a file for log forwarding
- dash
config:
plugin: dump
source: ./config
source-type: local
organize:
glauth.cfg: etc/config/
stage:
- etc/config/glauth.cfg
glauth:
plugin: make
build-snaps:
- go/1.21/stable
source: https://github.com/glauth/glauth
source-type: git
source-tag: v2.3.1
source-subdir: v2
override-pull: |
git config --global url."https://github.com/".insteadOf [email protected]:
git config -l
craftctl default
override-build: |
export GOARCH=$(go env GOARCH)
U=https://github.com/glauth/glauth-postgres \
M=pkg/plugins/glauth-postgres \
make -C $CRAFT_PART_SRC_WORK pull-plugin-dependencies
PLUGIN_ARCH=$GOARCH \
make -C $CRAFT_PART_SRC_WORK -j$CRAFT_PARALLEL_BUILD_COUNT \
plugin_postgres_linux_$GOARCH linux$GOARCH
mkdir -p $CRAFT_PART_INSTALL/bin
cp -r $CRAFT_PART_SRC_WORK/bin/*/{glauth,postgres.so} \
$CRAFT_PART_INSTALL/bin/
stage:
- bin/glauth
- bin/postgres.so