overture: add new package
authorRichard Yu <redacted>
Wed, 26 Jun 2019 09:37:19 +0000 (17:37 +0800)
committerRichard Yu <redacted>
Sun, 8 Mar 2020 13:41:57 +0000 (21:41 +0800)
Signed-off-by: Richard Yu <redacted>
net/overture/Makefile [new file with mode: 0644]
net/overture/files/domain_alternative_sample [new file with mode: 0644]
net/overture/files/domain_primary_sample [new file with mode: 0644]
net/overture/files/domain_ttl_sample [new file with mode: 0644]
net/overture/files/hosts_sample [new file with mode: 0644]
net/overture/files/ip_network_alternative_sample [new file with mode: 0644]
net/overture/files/ip_network_primary_sample [new file with mode: 0644]
net/overture/files/overture.init [new file with mode: 0644]

diff --git a/net/overture/Makefile b/net/overture/Makefile
new file mode 100644 (file)
index 0000000..642d063
--- /dev/null
@@ -0,0 +1,51 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=overture
+PKG_VERSION:=1.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/shawn1m/overture/tar.gz/v${PKG_VERSION}?
+PKG_HASH:=a7a568cc65f2a1714f036c555b95d3be27234b98ae951cb748198fecce1bb1e4
+
+PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=LICENSE
+
+PKG_BUILD_DEPENDS:=golang/host
+PKG_BUILD_PARALLEL:=1
+PKG_USE_MIPS16:=0
+
+GO_PKG:=github.com/shawn1m/overture
+GO_PKG_BUILD_PKG:=$(GO_PKG)/main
+
+include $(INCLUDE_DIR)/package.mk
+include ../../lang/golang/golang-package.mk
+
+define Package/overture
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=IP Addresses and Names
+  TITLE:=A customized DNS forwarder written in Go
+  URL:=https://github.com/shawn1m/overture
+  DEPENDS:=$(GO_ARCH_DEPENDS)
+endef
+
+define Package/overture/description
+  Overture is a DNS server/forwarder/dispatcher written in Go.
+endef
+
+define Package/overture/install
+       $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
+
+       $(INSTALL_DIR) $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/main $(1)/usr/bin/$(PKG_NAME)
+       $(INSTALL_DIR) $(1)/etc/$(PKG_NAME)/
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/config.sample.json $(1)/etc/$(PKG_NAME)/config.json
+       $(INSTALL_DATA) ./files/*_sample $(1)/etc/$(PKG_NAME)/
+       $(INSTALL_DIR) $(1)/etc/init.d/
+       $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+endef
+
+$(eval $(call GoBinPackage,overture))
+$(eval $(call BuildPackage,overture))
diff --git a/net/overture/files/domain_alternative_sample b/net/overture/files/domain_alternative_sample
new file mode 100644 (file)
index 0000000..79e25d6
--- /dev/null
@@ -0,0 +1 @@
+alternative.example
\ No newline at end of file
diff --git a/net/overture/files/domain_primary_sample b/net/overture/files/domain_primary_sample
new file mode 100644 (file)
index 0000000..3fbdab2
--- /dev/null
@@ -0,0 +1 @@
+primary.example
\ No newline at end of file
diff --git a/net/overture/files/domain_ttl_sample b/net/overture/files/domain_ttl_sample
new file mode 100644 (file)
index 0000000..126e48d
--- /dev/null
@@ -0,0 +1 @@
+ttl.example 1000
\ No newline at end of file
diff --git a/net/overture/files/hosts_sample b/net/overture/files/hosts_sample
new file mode 100644 (file)
index 0000000..67d68a7
--- /dev/null
@@ -0,0 +1 @@
+127.0.0.1 localhost
\ No newline at end of file
diff --git a/net/overture/files/ip_network_alternative_sample b/net/overture/files/ip_network_alternative_sample
new file mode 100644 (file)
index 0000000..d99ed31
--- /dev/null
@@ -0,0 +1 @@
+127.0.0.10/32
\ No newline at end of file
diff --git a/net/overture/files/ip_network_primary_sample b/net/overture/files/ip_network_primary_sample
new file mode 100644 (file)
index 0000000..ce09333
--- /dev/null
@@ -0,0 +1 @@
+127.0.0.9/32
\ No newline at end of file
diff --git a/net/overture/files/overture.init b/net/overture/files/overture.init
new file mode 100644 (file)
index 0000000..fb7c1c2
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+start_service() {
+       procd_open_instance
+       procd_set_param command /usr/bin/overture -c /etc/overture/config.json
+       procd_set_param file /etc/overture/config.json
+       procd_set_param stdout 1
+       procd_set_param stderr 1
+       procd_set_param respawn
+       procd_close_instance
+}
git clone https://git.99rst.org/PROJECT