Skip to content

Commit 495ea01

Browse files
committedFeb 2, 2023
Add portal submodule
1 parent f219b73 commit 495ea01

File tree

6 files changed

+61
-1
lines changed

6 files changed

+61
-1
lines changed
 

‎.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "external/src/vulcan"]
55
path = external/src/vulcan
66
url = git@github.com:vulcan-rs/vulcan.git
7+
[submodule "external/src/portal"]
8+
path = external/src/portal
9+
url = https://github.com/portal-rs/portal

‎external/Config.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
source "$BR2_EXTERNAL_VULCAN_PATH/package/vulcan/Config.in"
1+
source "$BR2_EXTERNAL_VULCAN_PATH/package/vulcan/Config.in"
2+
source "$BR2_EXTERNAL_VULCAN_PATH/package/portal/Config.in"

‎external/package/portal/Config.in

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
config BR2_PACKAGE_PORTAL
2+
bool "vulcan"
3+
depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
4+
select BR2_PACKAGE_HOST_RUSTC
5+
help
6+
Portal is a DNS server written in pure Rust.
7+
8+
https://github.com/portal-rs/portal

‎external/package/portal/portal.mk

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
################################################################################
2+
#
3+
# portal
4+
#
5+
################################################################################
6+
7+
PORTAL_VERSION = 0.0.1
8+
PORTAL_SITE = $(BR2_EXTERNAL_VULCAN_PATH)/src/vulcan
9+
PORTAL_SITE_METHOD = local
10+
PORTAL_LICENSE = GPL-3.0+
11+
PORTAL_LICENSE_FILES = LICENSE
12+
13+
PORTAL_CARGO_MODE = release
14+
PORTAL_BIN_DIR = target/$(RUSTC_TARGET_NAME)/$(PORTAL_CARGO_MODE)
15+
16+
define VULCAN_BUILD_CMDS
17+
cd $(@D) && \
18+
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(PKG_CARGO_ENV) $(PORTAL_CARGO_ENVIRONMENT) cargo build \
19+
--workspace \
20+
--$(PORTAL_CARGO_MODE) \
21+
--target $(RUSTC_TARGET_NAME) \
22+
-Z target-applies-to-host
23+
endef
24+
25+
define PORTAL_INSTALL_TARGET_CMDS
26+
$(INSTALL) -m 0755 $(@D)/$(VULCAN_BIN_DIR)/portald $(TARGET_DIR)/usr/bin/portald
27+
$(INSTALL) -m 0755 $(@D)/$(VULCAN_BIN_DIR)/gun $(TARGET_DIR)/usr/bin/gun
28+
endef
29+
30+
define VULCAN_INSTALL_INIT_SYSTEMD
31+
$(INSTALL) -D -m 644 $(BR2_EXTERNAL_VULCAN_PATH)/package/portal/portald.service \
32+
$(TARGET_DIR)/usr/lib/systemd/system/portald.service
33+
endef
34+
35+
$(eval $(cargo-package))
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[Unit]
2+
Description=Portal DNS server
3+
Wants=network-online.target
4+
After=network-online.target
5+
6+
[Service]
7+
Type=simple
8+
ExecStart=/usr/bin/portald
9+
Restart=always
10+
11+
[Install]
12+
WantedBy=multi-user.target

‎external/src/portal

Submodule portal added at a851eaa

0 commit comments

Comments
 (0)
Please sign in to comment.