github.com/network-quality/goresponsiveness@v0.0.0-20240129151524-343954285090/openwrt/Makefile (about)

     1  include $(TOPDIR)/rules.mk
     2  
     3  PKG_NAME:=networkQuality
     4  PKG_VERSION:=0.1
     5  PKG_RELEASE:=0.1
     6  PKG_MAINTAINER:=Will Hawkins (whh8b@obs.cr)
     7  PKG_LICENSE:=GPL-2.0-only
     8  
     9  PKG_SOURCE_PROTO:=git
    10  PKG_SOURCE_URL:=https://github.com/network-quality/goresponsiveness.git
    11  #We can configure this once we have a hash that we want to be the source
    12  #of the first release. See
    13  #https://openwrt.org/docs/guide-developer/packages#use_source_repository
    14  #for information on how to use it.
    15  PKG_MIRROR_HASH:=skip
    16  #Note: You will want to make sure that this hash is the one you want!
    17  #Temporarily set the package to build from the HEAD of main.
    18  PKG_SOURCE_VERSION:=af7dd5fa1e683be9bc25dce18c339ed07eaef215
    19  
    20  PKG_BUILD_DEPENDS=golang/host
    21  PKG_BUILD_PARALLEL:=1
    22  PKG_USE_MIPS16:=0
    23  
    24  GO_PKG:=github.com/network-quality/goresponsiveness
    25  GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION)
    26  
    27  include $(INCLUDE_DIR)/package.mk
    28  include ../../lang/golang/golang-package.mk
    29  
    30  define Package/networkQuality
    31    SECTION:=net
    32    CATEGORY:=Network
    33    TITLE:=Responsiveness Under Working Conditions client
    34    DEPENDS:=$(GO_ARCH_DEPENDS)
    35  endef
    36  
    37  define Package/networkQuality/description
    38    Official open-source client for the Responsiveness Under Working Conditions IETF spec.
    39  endef
    40  
    41  define Package/networkQuality/install
    42  	$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
    43  
    44    #Because we cannot control the `go build` invocation to get a
    45    #executable name that we want, let's do this little workaround
    46    #to make sure that our binary is named `networkQuality`!
    47  	$(INSTALL_DIR) $(1)/usr/bin/
    48  	$(CP) $(PKG_INSTALL_DIR)/usr/bin/goresponsiveness $(1)/usr/bin/networkQuality
    49  endef
    50  
    51  $(eval $(call GoBinPackage,networkQuality))
    52  $(eval $(call BuildPackage,networkQuality))