mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 11:35:13 +08:00
🎨 Sync 2026-08-19 20:43:52
This commit is contained in:
1 parent
5f4f97a473
commit
7c3ffdd761
17 files changed
+4255
No files matched your search
@@ -0,0 +1,77 @@
|
||||
#
|
||||
# Copyright (C) 2026 Josef Schlehofer
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=librespeed-common
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/librespeed-common
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=LibreSpeed measurement orchestration
|
||||
DEPENDS:=+librespeed-cli +rpcd-mod-ucode +jsonfilter
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/librespeed-common/description
|
||||
Runs LibreSpeed measurements from UCI configuration: a single entry point
|
||||
used both interactively and from cron, a schedule kept in step with UCI by
|
||||
the init script, and results recorded as JSON for anything that wants to
|
||||
read them, such as luci-app-librespeed, and a ubus interface for anything else.
|
||||
endef
|
||||
|
||||
define Package/librespeed-common/conffiles
|
||||
/etc/config/librespeed
|
||||
endef
|
||||
|
||||
# rpcd only enumerates its plugin directory at startup, so the librespeed ubus
|
||||
# object appears (and disappears) with a reload, not with the file.
|
||||
define Package/librespeed-common/postinst
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/rpcd reload
|
||||
exit 0
|
||||
endef
|
||||
|
||||
define Package/librespeed-common/postrm
|
||||
#!/bin/sh
|
||||
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/rpcd reload
|
||||
exit 0
|
||||
endef
|
||||
|
||||
# No source archive to unpack: the license text ships beside the Makefile and
|
||||
# is staged so PKG_LICENSE_FILES points at a real file.
|
||||
define Build/Prepare
|
||||
$(INSTALL_DATA) ./LICENSE $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/librespeed-common/install
|
||||
$(INSTALL_DIR) $(1)/usr/libexec
|
||||
$(INSTALL_BIN) ./files/librespeed-run $(1)/usr/libexec/librespeed-run
|
||||
$(INSTALL_BIN) ./files/librespeed-aggregate $(1)/usr/libexec/librespeed-aggregate
|
||||
$(SED) 's/%%VERSION%%/$(PKG_VERSION)-$(PKG_RELEASE)/g' \
|
||||
$(1)/usr/libexec/librespeed-run \
|
||||
$(1)/usr/libexec/librespeed-aggregate
|
||||
$(INSTALL_DIR) $(1)/usr/share/rpcd/ucode
|
||||
$(INSTALL_DATA) ./files/librespeed.uc $(1)/usr/share/rpcd/ucode/librespeed.uc
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_CONF) ./files/librespeed.config $(1)/etc/config/librespeed
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/librespeed.init $(1)/etc/init.d/librespeed
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,librespeed-common))
|
||||
Reference in new issue
Block a user