diff options
| author | Will Hawkins <[email protected]> | 2023-02-01 17:58:28 -0500 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-07-21 13:00:27 -0400 |
| commit | 0ee7e42425ba977f028e0bc51ffcc3d5a36e4561 (patch) | |
| tree | d02bbab9076749c57c9ae8129df9bd6bf88b2fb1 /openwrt/Makefile | |
| parent | af7dd5fa1e683be9bc25dce18c339ed07eaef215 (diff) | |
[Feature] Add package support for OpenWRT bundling
Including instructions for how to build.
Signed-off-by: Will Hawkins <[email protected]>
Diffstat (limited to 'openwrt/Makefile')
| -rw-r--r-- | openwrt/Makefile | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/openwrt/Makefile b/openwrt/Makefile new file mode 100644 index 0000000..378eddf --- /dev/null +++ b/openwrt/Makefile @@ -0,0 +1,52 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=networkQuality +PKG_VERSION:=0.1 +PKG_RELEASE:=0.1 +PKG_MAINTAINER:=Will Hawkins ([email protected]) +PKG_LICENSE:=GPL-2.0-only + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/network-quality/goresponsiveness.git +#We can configure this once we have a hash that we want to be the source +#of the first release. See +#https://openwrt.org/docs/guide-developer/packages#use_source_repository +#for information on how to use it. +PKG_MIRROR_HASH:=skip +#Note: You will want to make sure that this hash is the one you want! +#Temporarily set the package to build from the HEAD of main. +PKG_SOURCE_VERSION:=af7dd5fa1e683be9bc25dce18c339ed07eaef215 + +PKG_BUILD_DEPENDS=golang/host +PKG_BUILD_PARALLEL:=1 +PKG_USE_MIPS16:=0 + +GO_PKG:=github.com/network-quality/goresponsiveness +GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk +include ../../lang/golang/golang-package.mk + +define Package/networkQuality + SECTION:=net + CATEGORY:=Network + TITLE:=Responsiveness Under Working Conditions client + DEPENDS:=$(GO_ARCH_DEPENDS) +endef + +define Package/networkQuality/description + Official open-source client for the Responsiveness Under Working Conditions IETF spec. +endef + +define Package/networkQuality/install + $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) + + #Because we cannot control the `go build` invocation to get a + #executable name that we want, let's do this little workaround + #to make sure that our binary is named `networkQuality`! + $(INSTALL_DIR) $(1)/usr/bin/ + $(CP) $(PKG_INSTALL_DIR)/usr/bin/goresponsiveness $(1)/usr/bin/networkQuality +endef + +$(eval $(call GoBinPackage,networkQuality)) +$(eval $(call BuildPackage,networkQuality)) |
