|
| 1 | +# |
| 2 | +# Copyright (C) 2026 Florian Klink |
| 3 | +# |
| 4 | +# This is free software, licensed under the GNU General Public License v2. |
| 5 | +# See /LICENSE for more information. |
| 6 | +# |
| 7 | + |
| 8 | +include $(TOPDIR)/rules.mk |
| 9 | + |
| 10 | +PKG_NAME:=swgp-go |
| 11 | +PKG_VERSION:=1.10.0 |
| 12 | +PKG_RELEASE:=1 |
| 13 | + |
| 14 | +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 15 | +PKG_SOURCE_URL:=https://codeload.github.com/database64128/swgp-go/tar.gz/v$(PKG_VERSION)? |
| 16 | +PKG_HASH:=0d7e5ebce9c07237e71028eac31b27c51d155c5a72eefc7bceac4cc816725d23 |
| 17 | + |
| 18 | +PKG_MAINTAINER:=Florian Klink <flokli@flokli.de> |
| 19 | +PKG_LICENSE:=AGPL-3.0-or-later |
| 20 | +PKG_LICENSE_FILES:=LICENSE |
| 21 | + |
| 22 | +PKG_BUILD_DEPENDS:=golang/host |
| 23 | +PKG_BUILD_PARALLEL:=1 |
| 24 | +PKG_BUILD_FLAGS:=no-mips16 |
| 25 | + |
| 26 | +GO_PKG:=github.com/database64128/swgp-go |
| 27 | +GO_PKG_TAGS:=swgpgo_nopprof |
| 28 | + |
| 29 | +include $(INCLUDE_DIR)/package.mk |
| 30 | +include ../../lang/golang/golang-package.mk |
| 31 | + |
| 32 | +define Package/swgp-go |
| 33 | + SECTION:=net |
| 34 | + CATEGORY:=Network |
| 35 | + TITLE:= Simple WireGuard proxy |
| 36 | + URL:= https://github.com/database64128/swgp-go |
| 37 | + DEPENDS:=$(GO_ARCH_DEPENDS) |
| 38 | +endef |
| 39 | + |
| 40 | +define Package/swgp-go/description |
| 41 | + Simple WireGuard proxy with minimal overhead for WireGuard traffic. |
| 42 | +endef |
| 43 | + |
| 44 | +define Package/swgp-go/conffiles |
| 45 | +/etc/swgp-go.json |
| 46 | +endef |
| 47 | + |
| 48 | +define Package/swgp-go/install |
| 49 | + $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config |
| 50 | + $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/swgp-go $(1)/usr/sbin |
| 51 | + $(INSTALL_BIN) ./files//swgp-go.init $(1)/etc/init.d/swgp-go |
| 52 | + $(INSTALL_DATA) ./files//swgp-go.json $(1)/etc/swgp-go.json |
| 53 | +endef |
| 54 | + |
| 55 | +$(eval $(call BuildPackage,swgp-go)) |
0 commit comments