]> git.corax.cc Git - toolbox/commitdiff
Makefile: Install JSON Schema files and validator
authorMatthias Kruk <m@m10k.eu>
Fri, 11 Aug 2023 08:33:06 +0000 (17:33 +0900)
committerMatthias Kruk <m@m10k.eu>
Fri, 11 Aug 2023 08:33:06 +0000 (17:33 +0900)
When installing toolbox, neither the JSON Schemas for IPC messages
nor the validator are installed. Thus, it is not possible to use the
validator to validate received messages. However, the validator is
necessary to implement incoming message validation in the ipc module.

This commit modifies the Makefile so that the JSON Schema files and
validator are installed by the `install' target.

Makefile

index a3f68cbaec0a80fee2e755c9ccf86ce2ba1dc9c7..3cc71e45c42b72bcfb39aaba5fd84196c28c6492 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,11 +25,13 @@ install:
        cp toolbox.sh $(DESTDIR)/$(PREFIX)/share/toolbox/.
        cp -r include $(DESTDIR)/$(PREFIX)/share/toolbox/.
        cp -r utils   $(DESTDIR)/$(PREFIX)/share/toolbox/.
+       cp -r spec    $(DESTDIR)/$(PREFIX)/share/toolbox/.
        chown -R root:root $(DESTDIR)/$(PREFIX)/share/toolbox
        find $(DESTDIR)/$(PREFIX)/share/toolbox -type d -exec chmod 755 {} \;
        find $(DESTDIR)/$(PREFIX)/share/toolbox -type f -exec chmod 644 {} \;
        chmod -R 755 $(DESTDIR)/$(PREFIX)/share/toolbox
        ln -sf $(PREFIX)/share/toolbox/toolbox.sh $(DESTDIR)/$(PREFIX)/bin/toolbox.sh
+       ln -sf $(PREFIX)/share/toolbox/spec/validate.py $(DESTDIR)/$(PREFIX)/bin/toolbox-json-validate
        ln -sf $(PREFIX)/share/toolbox/utils/ipc-tap.sh $(DESTDIR)/$(PREFIX)/bin/ipc-tap
        ln -sf $(PREFIX)/share/toolbox/utils/ipc-inject.sh $(DESTDIR)/$(PREFIX)/bin/ipc-inject
        ln -sf $(PREFIX)/share/toolbox/utils/ipc-sshtunnel.sh $(DESTDIR)/$(PREFIX)/bin/ipc-sshtunnel