Skip to content
Open
33 changes: 33 additions & 0 deletions cross/ddns-go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PKG_NAME = ddns-go
PKG_VERS = 6.12.0
WEB_VERSION = $(PKG_VERS)
PKG_EXT = tar.gz
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/jeessy2/ddns-go/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

BUILD_DEPENDS = native/go

# lacking support for atomics
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)
# not supported by go
UNSUPPORTED_ARCHS += $(PPC_ARCHS)

HOMEPAGE = https://github.com/jeessy2/ddns-go
COMMENT = Automatically obtain your public IPv4 or IPv6 address and resolve it to the corresponding domain name service.
LICENSE = MIT

COMPILE_TARGET = ddns-go_compile_target
INSTALL_TARGET = ddns-go_install

include ../../mk/spksrc.cross-go.mk

.PHONY: ddns-go_compile_target
ddns-go_compile_target:
@$(RUN) $(MAKE) VERSION=$(shell git describe --tags `git rev-list --tags --max-count=1` 2>/dev/null || git rev-parse --short HEAD) BUILD_TIME="$$(date -u +'%Y-%m-%dT%H:%M:%SZ')" build

.PHONY: ddns-go_install
ddns-go_install:
@mkdir -p $(STAGING_INSTALL_PREFIX)/bin
@install -m 755 $(WORK_DIR)/$(PKG_DIR)/ddns-go $(STAGING_INSTALL_PREFIX)/bin/
1 change: 1 addition & 0 deletions cross/ddns-go/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/ddns-go
3 changes: 3 additions & 0 deletions cross/ddns-go/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ddns-go-6.12.0.tar.gz SHA1 97d0115e88312f5e12f5658adee2b4d1c6a3cb3d
ddns-go-6.12.0.tar.gz SHA256 59f5a705f08f539c011e12c01b4e82791130bfb4ccfb332f2b6545945fa70e38
ddns-go-6.12.0.tar.gz MD5 5571704118f4fe49e206a8fda48363d5
27 changes: 27 additions & 0 deletions spk/ddns-go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
SPK_NAME = ddns-go
SPK_VERS = 6.12.0
SPK_REV = 1
SPK_ICON = src/ddns-go.png

DEPENDS = cross/ddns-go

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)
# not supported by go:
UNSUPPORTED_ARCHS += $(PPC_ARCHS)

MAINTAINER = GrandDuke1106
DESCRIPTION = Automatically obtain your public IPv4 or IPv6 address and resolve it to the corresponding domain name service.
DISPLAY_NAME = ddns-go
CHANGELOG = "Initial package release."

HOMEPAGE = https://github.com/jeessy2/ddns-go
LICENSE = MIT

SERVICE_SETUP = src/service-setup.sh

STARTABLE = yes
SERVICE_USER = auto
SERVICE_PORT = 9876
ADMIN_PORT = $(SERVICE_PORT)

include ../../mk/spksrc.spk.mk
Binary file added spk/ddns-go/src/ddns-go.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions spk/ddns-go/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DDNS_GO="${SYNOPKG_PKGDEST}/bin/ddns-go -l :9876"
CONFIG_FILE="${SYNOPKG_PKGVAR}/config.yaml"

SERVICE_COMMAND="${DDNS_GO} -c ${CONFIG_FILE}"
SVC_BACKGROUND=yes
SVC_WRITE_PID=yes