summaryrefslogtreecommitdiff
path: root/sentinel-proxy/Makefile
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-04-02 10:10:16 +0200
committerKarel Kočí <cynerd@email.cz>2020-04-02 10:10:16 +0200
commit1419b8fb1325f6aeca43c6e7f33d0b9626a9fcce (patch)
treebe654f791a6a3f88f14cfd310bd994dd8b8add37 /sentinel-proxy/Makefile
parenta1d5a6718803a5b9042045be0f114b8b99a2eacd (diff)
downloadopenwrt-personal-pkgs-1419b8fb1325f6aeca43c6e7f33d0b9626a9fcce.tar.gz
openwrt-personal-pkgs-1419b8fb1325f6aeca43c6e7f33d0b9626a9fcce.tar.bz2
openwrt-personal-pkgs-1419b8fb1325f6aeca43c6e7f33d0b9626a9fcce.zip
Add sentinel-proxy
Diffstat (limited to 'sentinel-proxy/Makefile')
-rw-r--r--sentinel-proxy/Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/sentinel-proxy/Makefile b/sentinel-proxy/Makefile
new file mode 100644
index 0000000..2721647
--- /dev/null
+++ b/sentinel-proxy/Makefile
@@ -0,0 +1,60 @@
+#
+## Copyright (C) 2018-2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
+#
+## This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+# #
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sentinel-proxy
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_BRANCH:=token_crc
+
+PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
+PKG_LICENSE:=GPL-3.0
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/autopkg-branch.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/sentinel-proxy
+ SECTION:=net
+ CATEGORY:=Network
+ SUBMENU:=Sentinel
+ TITLE:=Proxy
+ URL:=https://gitlab.labs.nic.cz/turris/sentinel/proxy
+ DEPENDS:=+czmq +libpaho-mqtt-c +zlib +libopenssl +sentinel-certgen
+endef
+
+define Package/sentinel-proxy/description
+ Central daemon proxying all Sentinel trafic on router to Turris servers.
+endef
+
+define Package/sentinel-proxy/install
+ $(INSTALL_DIR) $(1)/etc/sentinel
+ $(INSTALL_BIN) ./files/ca.pem $(1)/etc/sentinel/ca.pem
+
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/sentinel_proxy $(1)/usr/bin/sentinel-proxy
+
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) files/init $(1)/etc/init.d/sentinel-proxy
+
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_BIN) files/uci $(1)/etc/config/sentinel
+
+ $(INSTALL_DIR) $(1)/etc/sentinel-certgen_hooks.d
+ $(INSTALL_BIN) files/restart-proxy-hook.sh $(1)/etc/sentinel-certgen_hooks.d/restart-proxy
+
+ $(INSTALL_DIR) $(1)/etc/cron.d
+ $(INSTALL_DATA) files/renew.cron $(1)/etc/cron.d/certgen-certs-renew
+endef
+
+define Package/sentinel-proxy/conffiles
+/etc/config/sentinel
+endef
+
+$(eval $(call BuildPackage,sentinel-proxy))