-
Notifications
You must be signed in to change notification settings - Fork 36
/
build_debian_package.sh
executable file
·54 lines (48 loc) · 1.43 KB
/
build_debian_package.sh
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
#!/usr/bin/env bash
set -u
set -e
VERSION='1.0.4'
DEBUG='false'
clean() {
mkdir -p target
rm -rf target/*
}
build_package() {
cd target
fpm \
--force \
--output-type deb \
--input-type dir \
--version "${VERSION}" \
--deb-no-default-config-files \
--deb-user 'root' \
--deb-group 'nagios' \
--depends 'icinga2' \
--depends 'curl' \
--architecture 'all' \
--name 'icinga2-slack-notifications' \
--description 'Icinga2 notification integration with slack' \
--vendor 'https://envimate.com/' \
--maintainer 'Nune Isabekyan <[email protected]>, Richard Hauswald <[email protected]>' \
--url 'https://github.com/nisabek/icinga2-slack-notifications' \
--license 'Apache License Version 2.0, January 2004' \
--category 'universe/admin' \
--deb-priority 'extra' \
--deb-field 'Bugs: https://github.com/nisabek/icinga2-slack-notifications/issues' \
../src/slack-notifications=/etc/icinga2/conf.d
if [ "${DEBUG}" = "true" ]; then
mkdir debug
cp "icinga2-slack-notifications_${VERSION}_all.deb" debug/
cd debug
tar -xzf "icinga2-slack-notifications_${VERSION}_all.deb"
mkdir control
mv control.tar.gz control/
cd control
tar -xzf control.tar.gz
cd ..
cd ..
fi
cd ..
}
clean
build_package