mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-04-28 22:47:03 +00:00
buildsys: install templates for test notifications
The notification stack loads handlebar templates for notifications from /usr/share/proxmox-backup-server/templates/default/. This commit modifies the build system to install template files from the 'templates' directory at that location. First, we only have templates for test notifications. Signed-off-by: Lukas Wagner <l.wagner@proxmox.com> Tested-by: Gabriel Goller <g.goller@proxmox.com> Reviewed-by: Gabriel Goller <g.goller@proxmox.com> Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
57570bda1d
commit
d9f0ec5769
5
Makefile
5
Makefile
@ -4,7 +4,7 @@ include defines.mk
|
|||||||
PACKAGE := proxmox-backup
|
PACKAGE := proxmox-backup
|
||||||
ARCH := $(DEB_BUILD_ARCH)
|
ARCH := $(DEB_BUILD_ARCH)
|
||||||
|
|
||||||
SUBDIRS := etc www docs
|
SUBDIRS := etc www docs templates
|
||||||
|
|
||||||
# Binaries usable by users
|
# Binaries usable by users
|
||||||
USR_BIN := \
|
USR_BIN := \
|
||||||
@ -93,7 +93,7 @@ build:
|
|||||||
cp -a debian \
|
cp -a debian \
|
||||||
Cargo.toml src \
|
Cargo.toml src \
|
||||||
$(SUBCRATES) \
|
$(SUBCRATES) \
|
||||||
docs etc examples tests www zsh-completions \
|
docs etc examples tests www zsh-completions templates \
|
||||||
defines.mk Makefile \
|
defines.mk Makefile \
|
||||||
./build/
|
./build/
|
||||||
rm -f build/Cargo.lock
|
rm -f build/Cargo.lock
|
||||||
@ -211,6 +211,7 @@ install: $(COMPILED_BINS)
|
|||||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
||||||
$(MAKE) -C www install
|
$(MAKE) -C www install
|
||||||
$(MAKE) -C docs install
|
$(MAKE) -C docs install
|
||||||
|
$(MAKE) -C templates install
|
||||||
|
|
||||||
.PHONY: upload
|
.PHONY: upload
|
||||||
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
|
upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
|
||||||
|
3
debian/proxmox-backup-server.install
vendored
3
debian/proxmox-backup-server.install
vendored
@ -41,3 +41,6 @@ usr/share/zsh/vendor-completions/_pmtx
|
|||||||
usr/share/zsh/vendor-completions/_proxmox-backup-debug
|
usr/share/zsh/vendor-completions/_proxmox-backup-debug
|
||||||
usr/share/zsh/vendor-completions/_proxmox-backup-manager
|
usr/share/zsh/vendor-completions/_proxmox-backup-manager
|
||||||
usr/share/zsh/vendor-completions/_proxmox-tape
|
usr/share/zsh/vendor-completions/_proxmox-tape
|
||||||
|
usr/share/proxmox-backup/templates/default/test-body.txt.hbs
|
||||||
|
usr/share/proxmox-backup/templates/default/test-body.html.hbs
|
||||||
|
usr/share/proxmox-backup/templates/default/test-subject.txt.hbs
|
||||||
|
15
templates/Makefile
Normal file
15
templates/Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
include ../defines.mk
|
||||||
|
|
||||||
|
NOTIFICATION_TEMPLATES= \
|
||||||
|
default/test-body.txt.hbs \
|
||||||
|
default/test-body.html.hbs \
|
||||||
|
default/test-subject.txt.hbs \
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
||||||
|
install:
|
||||||
|
install -dm755 $(DESTDIR)$(DATAROOTDIR)/proxmox-backup/templates/default
|
||||||
|
$(foreach i,$(NOTIFICATION_TEMPLATES), \
|
||||||
|
install -m644 $(i) $(DESTDIR)$(DATAROOTDIR)/proxmox-backup/templates/$(i) ;)
|
1
templates/default/test-body.html.hbs
Normal file
1
templates/default/test-body.html.hbs
Normal file
@ -0,0 +1 @@
|
|||||||
|
This is a test of the notification target '{{ target }}'.
|
1
templates/default/test-body.txt.hbs
Normal file
1
templates/default/test-body.txt.hbs
Normal file
@ -0,0 +1 @@
|
|||||||
|
This is a test of the notification target '{{ target }}'.
|
1
templates/default/test-subject.txt.hbs
Normal file
1
templates/default/test-subject.txt.hbs
Normal file
@ -0,0 +1 @@
|
|||||||
|
Test notification
|
Loading…
Reference in New Issue
Block a user