From 9671aab266618aad92cf83de8fe9171464cf5306 Mon Sep 17 00:00:00 2001 From: a-gave Date: Sun, 17 Nov 2024 11:44:51 +0100 Subject: [PATCH] chore: add include libremesh.mk in more packages modify various packages to use libremesh.mk. drop the package lua-argparse since it is available in openwrt feeds. adapt packages to apk version schema. --- libremesh.mk | 29 ++++------- packages/altermundi-grafana/Makefile | 17 +------ packages/auto-usb-wwan/Makefile | 17 +------ packages/bandwidth-test/Makefile | 24 +-------- .../{bandwidth-test.lua => bandwidth-test} | 0 packages/batman-adv-auto-gw-mode/Makefile | 18 +------ packages/bmx7-auto-gw-bw-mode/Makefile | 18 ++----- packages/bmx7-auto-gw-mode/Makefile | 20 +------- packages/bmx7-mdns/Makefile | 34 ++----------- .../lib/lua/luci/model/cbi}/bmx7-mdns.lua | 0 packages/check-date-http/Makefile | 18 +------ packages/check-internet/Makefile | 18 +------ packages/deferable-reboot/Makefile | 27 +--------- packages/first-boot-wizard/Makefile | 16 +----- packages/hotplug-initd-services/Makefile | 18 +------ packages/lime-ap-watchping/Makefile | 18 +------ packages/lime-app/Makefile | 25 +++------ packages/lime-debug/Makefile | 8 ++- packages/lime-docs/Makefile | 4 +- packages/lime-hwd-ground-routing/Makefile | 25 +-------- packages/lime-hwd-openwrt-wan/Makefile | 25 +-------- packages/lime-hwd-usbradio/Makefile | 28 +--------- .../etc/hotplug.d/usb/60-lime-hwd-usbradio} | 0 .../usr/lib/lua/lime/hwd}/usbradio.lua | 0 packages/lime-proto-anygw/Makefile | 25 +-------- packages/lime-proto-bgp/Makefile | 25 +-------- packages/lime-proto-olsr/Makefile | 23 +-------- .../usr/lib/lua/lime/proto}/olsr.lua | 0 packages/lime-proto-olsr2/Makefile | 23 +-------- .../usr/lib/lua/lime/proto}/olsr2.lua | 0 packages/lime-proto-olsr6/Makefile | 23 +-------- .../usr/lib/lua/lime/proto}/olsr6.lua | 0 packages/lime-report/Makefile | 21 +------- .../files/{ => bin}/lime-report.sh | 0 packages/lime-system/Makefile | 4 +- packages/lua-argparse/Makefile | 51 ------------------- packages/lua-argparse/Readme.md | 15 ------ packages/luci-lib-jquery-flot/Makefile | 13 +---- .../resources/jquery}/jquery.flot.min.js | 0 packages/luci-mod-status/Makefile | 17 +------ packages/miniserver-client/Makefile | 17 +------ packages/pirania/Makefile | 17 +------ .../Makefile | 17 +------ .../Makefile | 17 +------ .../Makefile | 17 +------ .../Makefile | 17 +------ packages/prometheus-node-push-influx/Makefile | 17 +------ packages/random-numgen/Makefile | 21 ++------ .../files/{ => usr/bin}/random-numgen | 0 packages/safe-reboot/Makefile | 17 +------ packages/safe-upgrade/Makefile | 21 +------- packages/shared-state-async/Makefile | 6 +-- packages/shared-state-babeld_hosts/Makefile | 18 +------ packages/shared-state-bat_hosts/Makefile | 18 +------ packages/shared-state-dnsmasq_hosts/Makefile | 18 +------ packages/shared-state-dnsmasq_leases/Makefile | 18 +------ .../shared-state-dnsmasq_servers/Makefile | 18 +------ .../shared-state-nodes_and_links/Makefile | 18 +------ packages/shared-state-persist/Makefile | 18 +------ packages/shared-state-pirania/Makefile | 18 +------ .../shared-state-wifi_links_info/Makefile | 18 +------ packages/shared-state/Makefile | 18 +------ packages/soporteremoto/Makefile | 17 +------ packages/sprunge/Makefile | 19 +------ .../sprunge/{src/ix.sh => files/usr/bin/ix} | 0 .../{src/sprunge.sh => files/usr/bin/sprunge} | 0 packages/ubus-lime-batman-adv/Makefile | 17 +------ packages/ubus-lime-groundrouting/Makefile | 17 +------ packages/ubus-lime-location/Makefile | 17 +------ packages/ubus-lime-metrics/Makefile | 17 +------ packages/ubus-lime-openairview/Makefile | 17 +------ packages/ubus-lime-utils/Makefile | 17 +------ packages/ubus-tmate/Makefile | 17 +------ packages/watchping/Makefile | 17 +------ packages/wifi-unstuck-wa/Makefile | 27 +--------- 75 files changed, 91 insertions(+), 1119 deletions(-) rename packages/bandwidth-test/files/bin/{bandwidth-test.lua => bandwidth-test} (100%) mode change 100644 => 100755 rename packages/bmx7-mdns/files/{luci => usr/lib/lua/luci/model/cbi}/bmx7-mdns.lua (100%) rename packages/lime-hwd-usbradio/{src/hotplug-hook.sh => files/etc/hotplug.d/usb/60-lime-hwd-usbradio} (100%) mode change 100644 => 100755 rename packages/lime-hwd-usbradio/{src => files/usr/lib/lua/lime/hwd}/usbradio.lua (100%) mode change 100644 => 100755 rename packages/lime-proto-olsr/{src => files/usr/lib/lua/lime/proto}/olsr.lua (100%) rename packages/lime-proto-olsr2/{src => files/usr/lib/lua/lime/proto}/olsr2.lua (100%) rename packages/lime-proto-olsr6/{src => files/usr/lib/lua/lime/proto}/olsr6.lua (100%) rename packages/lime-report/files/{ => bin}/lime-report.sh (100%) mode change 100644 => 100755 delete mode 100644 packages/lua-argparse/Makefile delete mode 100644 packages/lua-argparse/Readme.md rename packages/luci-lib-jquery-flot/files/{ => www/luci-static/resources/jquery}/jquery.flot.min.js (100%) rename packages/random-numgen/files/{ => usr/bin}/random-numgen (100%) rename packages/sprunge/{src/ix.sh => files/usr/bin/ix} (100%) rename packages/sprunge/{src/sprunge.sh => files/usr/bin/sprunge} (100%) diff --git a/libremesh.mk b/libremesh.mk index abb02afc4..53a0448ce 100644 --- a/libremesh.mk +++ b/libremesh.mk @@ -2,26 +2,13 @@ include $(TOPDIR)/rules.mk PKG_NAME?=$(notdir ${CURDIR}) -# from https://github.com/openwrt/luci/blob/master/luci.mk -PKG_VERSION?=$(if $(DUMP),x,$(strip $(shell \ - if svn info >/dev/null 2>/dev/null; then \ - revision="svn-r$$(LC_ALL=C svn info | sed -ne 's/^Revision: //p')"; \ - elif git log -1 >/dev/null 2>/dev/null; then \ - revision="svn-r$$(LC_ALL=C git log -1 | sed -ne 's/.*git-svn-id: .*@\([0-9]\+\) .*/\1/p')"; \ - if [ "$$revision" = "svn-r" ]; then \ - set -- $$(git log -1 --format="%ct %h" --abbrev=7); \ - secs="$$(($$1 % 86400))"; \ - yday="$$(date --utc --date="@$$1" "+%y.%j")"; \ - revision="$$(printf 'git-%s.%05d-%s' "$$yday" "$$secs" "$$2")"; \ - fi; \ - else \ - revision="unknown"; \ - fi; \ - echo "$$revision" \ -))) -PKG_RELEASE?=1 - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) +GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g') +GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) + +PKG_SRC_VERSION:=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP) +PKG_VERSION:=$(if $(PKG_VERSION),$(PKG_VERSION),$(PKG_SRC_VERSION)) + +PKG_BUILD_DIR:=$(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(BUILD_DIR)/$(PKG_NAME)) include $(INCLUDE_DIR)/package.mk @@ -31,6 +18,8 @@ define Build/Compile $(CP) ./files ./build $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + + $(FIND) ./build -type f -executable -exec sed -i '/^\s*#\[Doc\]/d' {} + + $(FIND) ./build -type f -executable -exec sed -i '/^\s*--!.*/d' {} + endef define Package/$(PKG_NAME)/install diff --git a/packages/altermundi-grafana/Makefile b/packages/altermundi-grafana/Makefile index 1b2641168..91b36d680 100644 --- a/packages/altermundi-grafana/Makefile +++ b/packages/altermundi-grafana/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=altermundi-grafana -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -36,12 +29,4 @@ define Package/$(PKG_NAME)/description that gathers data on the node and pushes to https://grafana.altermundi.net endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/auto-usb-wwan/Makefile b/packages/auto-usb-wwan/Makefile index 1e178efd9..078601e49 100644 --- a/packages/auto-usb-wwan/Makefile +++ b/packages/auto-usb-wwan/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=auto-usb-wwan -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -28,12 +21,4 @@ define Package/$(PKG_NAME)/description By default, it will try connect to SSID "internet" with password "internet" endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/bandwidth-test/Makefile b/packages/bandwidth-test/Makefile index d748ce2b4..016e4bc51 100644 --- a/packages/bandwidth-test/Makefile +++ b/packages/bandwidth-test/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=bandwidth-test -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -24,23 +16,9 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Package/$(PKG_NAME)/config -endef - - define Package/$(PKG_NAME)/description Measure the maximum available bandwidth towards the internet, in the download direction. Downloading a list of files via HTTP connections. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/bin/ - $(INSTALL_DIR) $(1)/etc/config/ - $(INSTALL_BIN) ./files/bin/bandwidth-test.lua $(1)/bin/bandwidth-test - $(INSTALL_CONF) ./files/etc/config/bandwidth-test $(1)/etc/config/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/bandwidth-test/files/bin/bandwidth-test.lua b/packages/bandwidth-test/files/bin/bandwidth-test old mode 100644 new mode 100755 similarity index 100% rename from packages/bandwidth-test/files/bin/bandwidth-test.lua rename to packages/bandwidth-test/files/bin/bandwidth-test diff --git a/packages/batman-adv-auto-gw-mode/Makefile b/packages/batman-adv-auto-gw-mode/Makefile index fe50ff5eb..be5ac643e 100644 --- a/packages/batman-adv-auto-gw-mode/Makefile +++ b/packages/batman-adv-auto-gw-mode/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=batman-adv-auto-gw-mode -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) CATEGORY:=LibreMesh @@ -38,12 +30,4 @@ port of any (one or more) nodes, it will be autodetected and the rest of the nodes will route through it (or them) endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/bmx7-auto-gw-bw-mode/Makefile b/packages/bmx7-auto-gw-bw-mode/Makefile index b8dd677d1..16bfd3a00 100644 --- a/packages/bmx7-auto-gw-bw-mode/Makefile +++ b/packages/bmx7-auto-gw-bw-mode/Makefile @@ -4,12 +4,11 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk +include ../../libremesh.mk -PKG_NAME:=bmx7-auto-gw-bw-mode -PKG_VERSION=0.1 - -include $(INCLUDE_DIR)/package.mk +PKG_REALVERSION:=0.1 +PKG_VERSION:=0.0.1 +PKG_RELEASE:=1 define Package/$(PKG_NAME) CATEGORY:=LibreMesh @@ -26,17 +25,8 @@ define Package/$(PKG_NAME)/config select CONFIG_BUSYBOX_CONFIG_CRONTAB endef - define Package/$(PKG_NAME)/description Watchping hooks to set bmx7 Internet bandwidth announcement endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/bmx7-auto-gw-mode/Makefile b/packages/bmx7-auto-gw-mode/Makefile index 756ea34a4..eb6ae86fb 100644 --- a/packages/bmx7-auto-gw-mode/Makefile +++ b/packages/bmx7-auto-gw-mode/Makefile @@ -4,22 +4,14 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=bmx7-auto-gw-mode -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) CATEGORY:=LibreMesh TITLE:=bmx7 auto Internet gateway module MAINTAINER:=Pau Escrich URL:=http://libremesh.org - DEPENDS:= bmx7 +watchping +ip + DEPENDS:=+bmx7 +watchping +ip PKGARCH:=all endef @@ -27,12 +19,4 @@ define Package/$(PKG_NAME)/description Watchping hooks to set bmx7 Internet automatic announcements endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/bmx7-mdns/Makefile b/packages/bmx7-mdns/Makefile index d6bd9c623..4e827eb23 100644 --- a/packages/bmx7-mdns/Makefile +++ b/packages/bmx7-mdns/Makefile @@ -21,16 +21,12 @@ # Pau Escrich # -include $(TOPDIR)/rules.mk -include $(INCLUDE_DIR)/kernel.mk +include ../../libremesh.mk -PKG_NAME:=bmx7-mdns -PKG_VERSION:=0.1 +PKG_REALVERSION:=0.1 +PKG_VERSION:=0.0.1 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0+ -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) - -include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME) SECTION:=net @@ -52,26 +48,4 @@ define Package/$(PKG_NAME)/description Distributed DNS system using bmx7 sms plugin endef -define Build/Prepare - mkdir -p $(PKG_BUILD_DIR) -endef - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(INSTALL_DIR) $(1)/etc - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/etc/config - $(CP) ./files/etc/init.d/bmx7-mdns $(1)/etc/init.d/bmx7-mdns - chmod 755 $(1)/etc/init.d/bmx7-mdns - $(CP) ./files/etc/config/bmx7-mdns $(1)/etc/config/bmx7-mdns - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/ - $(CP) ./files/luci/bmx7-mdns.lua $(1)/usr/lib/lua/luci/model/cbi/bmx7-mdns.lua -endef - -$(eval $(call BuildPackage,bmx7-mdns)) +$(eval $(call BuildPackage,$(PKG_NAME))) \ No newline at end of file diff --git a/packages/bmx7-mdns/files/luci/bmx7-mdns.lua b/packages/bmx7-mdns/files/usr/lib/lua/luci/model/cbi/bmx7-mdns.lua similarity index 100% rename from packages/bmx7-mdns/files/luci/bmx7-mdns.lua rename to packages/bmx7-mdns/files/usr/lib/lua/luci/model/cbi/bmx7-mdns.lua diff --git a/packages/check-date-http/Makefile b/packages/check-date-http/Makefile index cab37f7e5..83e66401a 100644 --- a/packages/check-date-http/Makefile +++ b/packages/check-date-http/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=check-date-http -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Keep local date under NTP too far away skew @@ -30,12 +22,4 @@ define Package/$(PKG_NAME)/description reset trought date command depending on configuration. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/check-internet/Makefile b/packages/check-internet/Makefile index cf25eb911..3dfb76344 100644 --- a/packages/check-internet/Makefile +++ b/packages/check-internet/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=check-internet -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Check internet connection @@ -27,12 +19,4 @@ define Package/$(PKG_NAME)/description Simple script to verify that there is internet access. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/deferable-reboot/Makefile b/packages/deferable-reboot/Makefile index 94097d07b..968fc0f2c 100644 --- a/packages/deferable-reboot/Makefile +++ b/packages/deferable-reboot/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=deferable-reboot -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -34,21 +26,4 @@ define Package/$(PKG_NAME)/description awk '{print $1 + 120}' /proc/uptime > /tmp/deferable-reboot.defer endef -define Build/Configure -endef - -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/first-boot-wizard/Makefile b/packages/first-boot-wizard/Makefile index 1e2dc9b36..862730179 100755 --- a/packages/first-boot-wizard/Makefile +++ b/packages/first-boot-wizard/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=first-boot-wizard -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=$(PKG_NAME) @@ -22,11 +15,4 @@ define Package/$(PKG_NAME)/description Scans surrounding LibreMesh networks and joins them. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/hotplug-initd-services/Makefile b/packages/hotplug-initd-services/Makefile index be1fb06ab..647e378f1 100644 --- a/packages/hotplug-initd-services/Makefile +++ b/packages/hotplug-initd-services/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=hotplug-initd-services -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Hotplug events of init.d services @@ -29,12 +21,4 @@ define Package/$(PKG_NAME)/description stopped. Put your hooks into /etc/hotplug.d/initd/. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-ap-watchping/Makefile b/packages/lime-ap-watchping/Makefile index cf24675bb..5f665dee6 100644 --- a/packages/lime-ap-watchping/Makefile +++ b/packages/lime-ap-watchping/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-ap-watchping -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) CATEGORY:=LibreMesh @@ -29,12 +21,4 @@ define Package/$(PKG_NAME)/description So the WiFi roaming is broken and the clients are not using the AP anymore until fixed. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-app/Makefile b/packages/lime-app/Makefile index 1c0e4d335..ec8056bd8 100644 --- a/packages/lime-app/Makefile +++ b/packages/lime-app/Makefile @@ -3,17 +3,17 @@ # # This is free software, licensed under the GNU General Public License v3. -include $(TOPDIR)/rules.mk +include ../../libremesh.mk -PKG_NAME:=lime-app -PKG_VERSION:=v0.2.26 +PKG_REALVERSION:=v0.2.26 +PKG_VERSION:=0.2.26 PKG_RELEASE:=2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.gz PKG_HASH:=afb74137af470f1a07d75870d569776e0eef05cce30682f58fed601e4a457d62 -PKG_SOURCE_URL:=https://github.com/libremesh/lime-app/releases/download/$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk +PKG_SOURCE_URL:=https://github.com/libremesh/lime-app/releases/download/$(PKG_REALVERSION) +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/$(PKG_REALVERSION) +HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)/$(PKG_REALVERSION) define Package/$(PKG_NAME) CATEGORY:=LibreMesh @@ -30,17 +30,6 @@ define Package/$(PKG_NAME)/description Light webApp for LibreMesh over uhttpd endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ - $(INSTALL_DIR) $(1)/www/app/ - $(CP) $(BUILD_DIR)/build/* $(1)/www/app/ - $(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d || true -endef - define Package/$(PKG_NAME)/postinst #!/bin/sh [ -n "$${IPKG_INSTROOT}" ] || ( /etc/init.d/rpcd restart && /etc/init.d/uhttpd restart ) || true diff --git a/packages/lime-debug/Makefile b/packages/lime-debug/Makefile index acd29967a..2e4862c38 100644 --- a/packages/lime-debug/Makefile +++ b/packages/lime-debug/Makefile @@ -6,13 +6,11 @@ include $(TOPDIR)/rules.mk -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) +GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g') GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) -PKG_NAME:=lime-debug -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) +PKG_NAME=lime-debug +PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP) include $(INCLUDE_DIR)/package.mk diff --git a/packages/lime-docs/Makefile b/packages/lime-docs/Makefile index 282ea197d..8405b274a 100644 --- a/packages/lime-docs/Makefile +++ b/packages/lime-docs/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) +GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g' ) GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) PKG_NAME:=lime-docs -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) +PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/libremesh/libremesh.github.io/ diff --git a/packages/lime-hwd-ground-routing/Makefile b/packages/lime-hwd-ground-routing/Makefile index 18d2d2ef2..de1cf3ed5 100644 --- a/packages/lime-hwd-ground-routing/Makefile +++ b/packages/lime-hwd-ground-routing/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-hwd-ground-routing -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Manage 802.1q VLANs for ground routing @@ -34,17 +24,4 @@ define Package/$(PKG_NAME)/description switch port for each connected device in WDS mode. endef -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./build/files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-hwd-openwrt-wan/Makefile b/packages/lime-hwd-openwrt-wan/Makefile index a6e1896c1..ce7cb4475 100644 --- a/packages/lime-hwd-openwrt-wan/Makefile +++ b/packages/lime-hwd-openwrt-wan/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-hwd-openwrt-wan -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Respect openwrt wan interface as default @@ -24,17 +14,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./build/files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-hwd-usbradio/Makefile b/packages/lime-hwd-usbradio/Makefile index 6c5282f69..e77d148bd 100644 --- a/packages/lime-hwd-usbradio/Makefile +++ b/packages/lime-hwd-usbradio/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-hwd-usbradio -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe hardware detection usb radio support @@ -24,21 +14,5 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @cp -r ./src ./build - @sed -i '/^\s*--!.*/d' build/*.lua - @sed -i '/^\s*#\[Doc\]/d' build/*.sh -endef - -define Package/$(PKG_NAME)/install - @mkdir -p $(1)/usr/lib/lua/lime/hwd || true - @mkdir -p $(1)/etc/hotplug.d/usb || true - $(CP) ./build/usbradio.lua $(1)/usr/lib/lua/lime/hwd/usbradio.lua - $(CP) ./build/hotplug-hook.sh $(1)/etc/hotplug.d/usb/60-lime-hwd-usbradio - @chmod +x $(1)/usr/lib/lua/lime/hwd/usbradio.lua - @chmod +x $(1)/etc/hotplug.d/usb/60-lime-hwd-usbradio -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-hwd-usbradio/src/hotplug-hook.sh b/packages/lime-hwd-usbradio/files/etc/hotplug.d/usb/60-lime-hwd-usbradio old mode 100644 new mode 100755 similarity index 100% rename from packages/lime-hwd-usbradio/src/hotplug-hook.sh rename to packages/lime-hwd-usbradio/files/etc/hotplug.d/usb/60-lime-hwd-usbradio diff --git a/packages/lime-hwd-usbradio/src/usbradio.lua b/packages/lime-hwd-usbradio/files/usr/lib/lua/lime/hwd/usbradio.lua old mode 100644 new mode 100755 similarity index 100% rename from packages/lime-hwd-usbradio/src/usbradio.lua rename to packages/lime-hwd-usbradio/files/usr/lib/lua/lime/hwd/usbradio.lua diff --git a/packages/lime-proto-anygw/Makefile b/packages/lime-proto-anygw/Makefile index 10f8a3a1c..3d588ad9b 100644 --- a/packages/lime-proto-anygw/Makefile +++ b/packages/lime-proto-anygw/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-proto-anygw -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe anygw proto support @@ -28,18 +18,5 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./build/files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-proto-bgp/Makefile b/packages/lime-proto-bgp/Makefile index 7ac1dee36..0db30fb92 100644 --- a/packages/lime-proto-bgp/Makefile +++ b/packages/lime-proto-bgp/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-proto-bgp -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe BGP proto support @@ -25,18 +15,5 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./build/files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-proto-olsr/Makefile b/packages/lime-proto-olsr/Makefile index c6babb94f..b396293a9 100644 --- a/packages/lime-proto-olsr/Makefile +++ b/packages/lime-proto-olsr/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-proto-olsr -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe OLSR proto support (IPv4) @@ -26,15 +16,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @cp -r ./src ./build - @sed -i '/^--!.*/d' build/*.lua -endef - -define Package/$(PKG_NAME)/install - @mkdir -p $(1)/usr/lib/lua/lime/proto || true - $(CP) ./build/olsr.lua $(1)/usr/lib/lua/lime/proto/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-proto-olsr/src/olsr.lua b/packages/lime-proto-olsr/files/usr/lib/lua/lime/proto/olsr.lua similarity index 100% rename from packages/lime-proto-olsr/src/olsr.lua rename to packages/lime-proto-olsr/files/usr/lib/lua/lime/proto/olsr.lua diff --git a/packages/lime-proto-olsr2/Makefile b/packages/lime-proto-olsr2/Makefile index b55a70230..561a719af 100644 --- a/packages/lime-proto-olsr2/Makefile +++ b/packages/lime-proto-olsr2/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-proto-olsr2 -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe OLSR2 proto support (IPv4/v6) @@ -26,15 +16,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @cp -r ./src ./build - @sed -i '/^--!.*/d' build/*.lua -endef - -define Package/$(PKG_NAME)/install - @mkdir -p $(1)/usr/lib/lua/lime/proto || true - $(CP) ./build/olsr2.lua $(1)/usr/lib/lua/lime/proto/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-proto-olsr2/src/olsr2.lua b/packages/lime-proto-olsr2/files/usr/lib/lua/lime/proto/olsr2.lua similarity index 100% rename from packages/lime-proto-olsr2/src/olsr2.lua rename to packages/lime-proto-olsr2/files/usr/lib/lua/lime/proto/olsr2.lua diff --git a/packages/lime-proto-olsr6/Makefile b/packages/lime-proto-olsr6/Makefile index c5b6b83f3..ff9087040 100644 --- a/packages/lime-proto-olsr6/Makefile +++ b/packages/lime-proto-olsr6/Makefile @@ -4,17 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M) - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-proto-olsr6 -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LiMe OLSR proto support (IPv6) @@ -26,15 +16,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile - @rm -rf ./build || true - @cp -r ./src ./build - @sed -i '/^--!.*/d' build/*.lua -endef - -define Package/$(PKG_NAME)/install - @mkdir -p $(1)/usr/lib/lua/lime/proto || true - $(CP) ./build/olsr6.lua $(1)/usr/lib/lua/lime/proto/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-proto-olsr6/src/olsr6.lua b/packages/lime-proto-olsr6/files/usr/lib/lua/lime/proto/olsr6.lua similarity index 100% rename from packages/lime-proto-olsr6/src/olsr6.lua rename to packages/lime-proto-olsr6/files/usr/lib/lua/lime/proto/olsr6.lua diff --git a/packages/lime-report/Makefile b/packages/lime-report/Makefile index d68954120..25c91283a 100644 --- a/packages/lime-report/Makefile +++ b/packages/lime-report/Makefile @@ -2,15 +2,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=lime-report -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=LibreMesh status report utility @@ -25,15 +17,4 @@ define Package/$(PKG_NAME)/description of a LibreMesh node, useful for debugging and issues reporting. endef -define Package/$(PKG_NAME)/config -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/bin/ - $(INSTALL_BIN) ./files/lime-report.sh $(1)/bin/lime-report -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/lime-report/files/lime-report.sh b/packages/lime-report/files/bin/lime-report.sh old mode 100644 new mode 100755 similarity index 100% rename from packages/lime-report/files/lime-report.sh rename to packages/lime-report/files/bin/lime-report.sh diff --git a/packages/lime-system/Makefile b/packages/lime-system/Makefile index a56e11037..27b81eee0 100644 --- a/packages/lime-system/Makefile +++ b/packages/lime-system/Makefile @@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) +GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g' ) GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) PKG_NAME:=lime-system -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) +PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP) LIME_ID:=LiMe LIME_RELEASE:=2024.1-rc1 diff --git a/packages/lua-argparse/Makefile b/packages/lua-argparse/Makefile deleted file mode 100644 index 9a48caf1e..000000000 --- a/packages/lua-argparse/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2019 Santiago Piccinini -# -# This is free software, licensed under the GNU General Public License v2. -# - -include $(TOPDIR)/rules.mk - -PKG_NAME:=lua-argparse -PKG_VERSION:=0.6.0 -PKG_RELEASE:=2 -PKG_MAINTAINER:=Santiago Piccinini -PKG_LICENSE:=MIT - -PKG_SOURCE:=argparse-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=https://github.com/mpeterv/argparse/archive/$(PKG_VERSION)/ -PKG_HASH:=0eddda29d591536bc7310b99ce7acc3e5e00557f18d6e63ab10d56683e8952f1 -PKG_BUILD_DIR:=$(BUILD_DIR)/argparse-$(PKG_VERSION) - -include $(INCLUDE_DIR)/package.mk - -define Package/lua-argparse - SUBMENU:=Lua - SECTION:=lang - CATEGORY:=Languages - TITLE:=Lua argparse - URL:=https://github.com/mpeterv/argparse - DEPENDS:=+lua - PKGARCH:=all - MAINTAINER:=Peter Melnichenko -endef - -define Package/lua-argparse/description - Argparse is a feature-rich command line parser for Lua inspired by argparse for Python. - Argparse supports positional arguments, options, flags, optional arguments, - subcommands and more. Argparse automatically generates usage, help and error messages. -endef - - -define Build/Configure -endef - -define Build/Compile -endef - -define Package/lua-argparse/install - $(INSTALL_DIR) $(1)/usr/lib/lua - $(INSTALL_DATA) $(PKG_BUILD_DIR)/src/argparse.lua $(1)/usr/lib/lua -endef - -$(eval $(call BuildPackage,lua-argparse)) diff --git a/packages/lua-argparse/Readme.md b/packages/lua-argparse/Readme.md deleted file mode 100644 index 4bbc13362..000000000 --- a/packages/lua-argparse/Readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# lua-argparse - -Argparse is a feature-rich command line parser for Lua inspired by argparse for Python. - -Argparse supports positional arguments, options, flags, optional arguments, subcommands and more. Argparse automatically generates usage, help and error messages. - -This package is installed argparse in openwrt and is mainly used in [safe-upgrade](https://github.com/libremesh/lime-packages/blob/master/packages/safe-upgrade/files/usr/sbin/safe-upgrade). It is really useful and you can see the complete documentation in [its own repository](https://github.com/mpeterv/argparse/). - -## Contents - -* [Example](https://github.com/mpeterv/argparse/#example) -* [Installation](https://github.com/mpeterv/argparse/#installation) -* [Tutorial](https://github.com/mpeterv/argparse/#tutorial) -* [Testing](https://github.com/mpeterv/argparse/#testing) -* [License](https://github.com/mpeterv/argparse/#license) \ No newline at end of file diff --git a/packages/luci-lib-jquery-flot/Makefile b/packages/luci-lib-jquery-flot/Makefile index bcad5f993..a86ad3a14 100644 --- a/packages/luci-lib-jquery-flot/Makefile +++ b/packages/luci-lib-jquery-flot/Makefile @@ -4,13 +4,10 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-lib-jquery-flot-0-8 PKG_VERSION:=0.8.1 PKG_RELEASE:=1 -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=luci @@ -22,12 +19,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/www/luci-static/resources/jquery/ - $(CP) ./files/* $(1)/www/luci-static/resources/jquery/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/luci-lib-jquery-flot/files/jquery.flot.min.js b/packages/luci-lib-jquery-flot/files/www/luci-static/resources/jquery/jquery.flot.min.js similarity index 100% rename from packages/luci-lib-jquery-flot/files/jquery.flot.min.js rename to packages/luci-lib-jquery-flot/files/www/luci-static/resources/jquery/jquery.flot.min.js diff --git a/packages/luci-mod-status/Makefile b/packages/luci-mod-status/Makefile index a5683eeee..fc3997011 100644 --- a/packages/luci-mod-status/Makefile +++ b/packages/luci-mod-status/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=luci-mod-status -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=admin @@ -32,12 +25,4 @@ Minimal and simple web app to view some status info: * ethernet switch ports status endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/miniserver-client/Makefile b/packages/miniserver-client/Makefile index 500ab7ebf..646121954 100644 --- a/packages/miniserver-client/Makefile +++ b/packages/miniserver-client/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=miniserver-client -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -37,12 +30,4 @@ define Package/$(PKG_NAME)/description reachable on the local network. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/pirania/Makefile b/packages/pirania/Makefile index b359f01ec..50fe40a4e 100644 --- a/packages/pirania/Makefile +++ b/packages/pirania/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=pirania -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SUBMENU:=Captive Portals @@ -23,12 +16,4 @@ define Package/$(PKG_NAME)/description Captive Portal for routers that want to share their Internet connection via vouchers. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/prometheus-node-exporter-lua-location-latlon/Makefile b/packages/prometheus-node-exporter-lua-location-latlon/Makefile index a04444d95..713d38dc8 100644 --- a/packages/prometheus-node-exporter-lua-location-latlon/Makefile +++ b/packages/prometheus-node-exporter-lua-location-latlon/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus-node-exporter-lua-location-latlon -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -22,12 +15,4 @@ define Package/$(PKG_NAME) DEPENDS:= +lua +libuci-lua +iw +libubus-lua endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/prometheus-node-exporter-lua-wifi-params/Makefile b/packages/prometheus-node-exporter-lua-wifi-params/Makefile index 314296409..ded2cb91d 100644 --- a/packages/prometheus-node-exporter-lua-wifi-params/Makefile +++ b/packages/prometheus-node-exporter-lua-wifi-params/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus-node-exporter-lua-wifi-params -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -22,12 +15,4 @@ define Package/$(PKG_NAME) DEPENDS:= +lua +libuci-lua +iw endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/prometheus-node-exporter-lua-wifi-stations-extra/Makefile b/packages/prometheus-node-exporter-lua-wifi-stations-extra/Makefile index 8c2c4847d..1bacad6a5 100644 --- a/packages/prometheus-node-exporter-lua-wifi-stations-extra/Makefile +++ b/packages/prometheus-node-exporter-lua-wifi-stations-extra/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus-node-exporter-lua-wifi-stations-extra -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -22,12 +15,4 @@ define Package/$(PKG_NAME) DEPENDS:= +lua +libuci-lua +iw +libubus-lua endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/prometheus-node-exporter-lua-wifi-survey/Makefile b/packages/prometheus-node-exporter-lua-wifi-survey/Makefile index 98e401f2b..4639f2aee 100644 --- a/packages/prometheus-node-exporter-lua-wifi-survey/Makefile +++ b/packages/prometheus-node-exporter-lua-wifi-survey/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus-node-exporter-lua-wifi-survey -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -22,12 +15,4 @@ define Package/$(PKG_NAME) DEPENDS:= +lua +iw +libubus-lua endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/prometheus-node-push-influx/Makefile b/packages/prometheus-node-push-influx/Makefile index 8e929de8b..1b1ec7d1e 100644 --- a/packages/prometheus-node-push-influx/Makefile +++ b/packages/prometheus-node-push-influx/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=prometheus-node-push-influx -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -29,12 +22,4 @@ define Package/$(PKG_NAME)/description to a remote VictoriaMetrics server. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/random-numgen/Makefile b/packages/random-numgen/Makefile index 942b3cf29..a815afed5 100644 --- a/packages/random-numgen/Makefile +++ b/packages/random-numgen/Makefile @@ -2,17 +2,15 @@ # See /LICENSES for more information. # -include $(TOPDIR)/rules.mk +include ../../libremesh.mk -PKG_NAME:=random-numgen -PKG_VERSION:=0.1 +PKG_REALVERSION:=0.1 +PKG_VERSION:=0.0.1 PKG_RELEASE:=1 PKG_MAINTAINER:=Ilario Gelmetti PKG_LICENSE:=GPL-3.0-or-later -include $(INCLUDE_DIR)/package.mk - define Package/random-numgen SECTION:=utils CATEGORY:=Utilities @@ -26,15 +24,4 @@ define Package/random-numgen/description 65535 using /dev/urandom as a random data source. endef -define Build/Compile -endef - -define Build/Configure -endef - -define Package/random-numgen/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) ./files/random-numgen $(1)/usr/bin/ -endef - -$(eval $(call BuildPackage,random-numgen)) +$(eval $(call BuildPackage,$(PKG_NAME))) \ No newline at end of file diff --git a/packages/random-numgen/files/random-numgen b/packages/random-numgen/files/usr/bin/random-numgen similarity index 100% rename from packages/random-numgen/files/random-numgen rename to packages/random-numgen/files/usr/bin/random-numgen diff --git a/packages/safe-reboot/Makefile b/packages/safe-reboot/Makefile index 084ee313a..b2d42c976 100644 --- a/packages/safe-reboot/Makefile +++ b/packages/safe-reboot/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=safe-reboot -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -32,12 +25,4 @@ define Package/$(PKG_NAME)/description for the revert timeout. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) ./files/usr/sbin/safe-reboot $(1)/usr/sbin/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/safe-upgrade/Makefile b/packages/safe-upgrade/Makefile index 79ccb9cd6..e066785e7 100644 --- a/packages/safe-upgrade/Makefile +++ b/packages/safe-upgrade/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=safe-upgrade -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -28,15 +20,4 @@ define Package/$(PKG_NAME)/description confirmation step. See $(PKG_NAME)/Readme.md for more details. endef -define Build/Configure -endef - -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) ./files/usr/sbin/safe-upgrade $(1)/usr/sbin/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-async/Makefile b/packages/shared-state-async/Makefile index a2686614f..5fa61900a 100644 --- a/packages/shared-state-async/Makefile +++ b/packages/shared-state-async/Makefile @@ -17,15 +17,15 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see # -# SPDX-License-Identifier: AGPL-3.0-only +# SPDX-License-Identifier: AGPL-3.0-only include $(TOPDIR)/rules.mk -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) +GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g' ) GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) PKG_NAME:=shared-state-async -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) +PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/libremesh/shared-state-async.git diff --git a/packages/shared-state-babeld_hosts/Makefile b/packages/shared-state-babeld_hosts/Makefile index 070450e84..05a238f39 100644 --- a/packages/shared-state-babeld_hosts/Makefile +++ b/packages/shared-state-babeld_hosts/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-babeld_hosts -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=babeld-hosts module for shared-state @@ -29,12 +21,4 @@ define Package/$(PKG_NAME)/description bab2host and host2bab commands. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-bat_hosts/Makefile b/packages/shared-state-bat_hosts/Makefile index 6a8508bd8..97d32e601 100644 --- a/packages/shared-state-bat_hosts/Makefile +++ b/packages/shared-state-bat_hosts/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-bat_hosts -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=bat-hosts module for shared-state @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description Syncronize bat-hosts beween nodes, provides also mac2bat and bat2mac. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-dnsmasq_hosts/Makefile b/packages/shared-state-dnsmasq_hosts/Makefile index e4881f908..f226d8a2c 100644 --- a/packages/shared-state-dnsmasq_hosts/Makefile +++ b/packages/shared-state-dnsmasq_hosts/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-dnsmasq_hosts -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=dnsmasq hosts module for shared-state @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description Syncronize dnsmasq hosts beween nodes. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-dnsmasq_leases/Makefile b/packages/shared-state-dnsmasq_leases/Makefile index 422fa3a51..df89000b5 100644 --- a/packages/shared-state-dnsmasq_leases/Makefile +++ b/packages/shared-state-dnsmasq_leases/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-dnsmasq_leases -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=dnsmasq leases module for shared-state @@ -29,12 +21,4 @@ define Package/$(PKG_NAME)/description Syncronize dnsmasq leases beween nodes. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-dnsmasq_servers/Makefile b/packages/shared-state-dnsmasq_servers/Makefile index 70d21a2dd..4f1c1d87f 100644 --- a/packages/shared-state-dnsmasq_servers/Makefile +++ b/packages/shared-state-dnsmasq_servers/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-dnsmasq_servers -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Mesh DNS module for shared-state @@ -29,12 +21,4 @@ define Package/$(PKG_NAME)/description by other nodes in the mesh can be resolved transparently. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-nodes_and_links/Makefile b/packages/shared-state-nodes_and_links/Makefile index c17ad8477..9d23f2eed 100644 --- a/packages/shared-state-nodes_and_links/Makefile +++ b/packages/shared-state-nodes_and_links/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-nodes_and_links -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=nodes_and_links module for shared-state @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description Syncronize nodes_and_links beween nodes. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-persist/Makefile b/packages/shared-state-persist/Makefile index 28cc316f7..5d4ff6c8e 100644 --- a/packages/shared-state-persist/Makefile +++ b/packages/shared-state-persist/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-persist -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Persists shared-state in usb devices @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description Detects block-mount storage devices and configures shared-state so that status persists on those devices. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-pirania/Makefile b/packages/shared-state-pirania/Makefile index c79d1a2db..46d552f3a 100644 --- a/packages/shared-state-pirania/Makefile +++ b/packages/shared-state-pirania/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-pirania -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Pirania vaucher module for shared-state @@ -27,12 +19,4 @@ define Package/$(PKG_NAME)/description Syncronize valid pirania vauchers beween nodes endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state-wifi_links_info/Makefile b/packages/shared-state-wifi_links_info/Makefile index 2a5328ff1..9f4aebabb 100644 --- a/packages/shared-state-wifi_links_info/Makefile +++ b/packages/shared-state-wifi_links_info/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state-wifi_links_info -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=WiFI links information module for shared-state @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description Syncronize links information beween nodes. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/shared-state/Makefile b/packages/shared-state/Makefile index b377ddbc0..beb8a6a5e 100644 --- a/packages/shared-state/Makefile +++ b/packages/shared-state/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU Affero General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=shared-state -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=Very minimal state sharing betwen nodes @@ -28,12 +20,4 @@ define Package/$(PKG_NAME)/description LiMe style minimal unsecured CRDT to share light state between nodes endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/soporteremoto/Makefile b/packages/soporteremoto/Makefile index e21d48620..2b88858f0 100644 --- a/packages/soporteremoto/Makefile +++ b/packages/soporteremoto/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=soporteremoto -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -28,12 +21,4 @@ define Package/$(PKG_NAME)/description that will be granted root access endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/sprunge/Makefile b/packages/sprunge/Makefile index 7229f9404..296b67b40 100644 --- a/packages/sprunge/Makefile +++ b/packages/sprunge/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=sprunge -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) TITLE:=sprunge.us and ix.io pastebin @@ -27,13 +19,4 @@ define Package/$(PKG_NAME)/description sprunge.us and ix.io command line pastebin endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - @mkdir -p $(1)/usr/bin/ || true - $(INSTALL_BIN) ./src/sprunge.sh $(1)/usr/bin/sprunge - $(INSTALL_BIN) ./src/ix.sh $(1)/usr/bin/ix -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/sprunge/src/ix.sh b/packages/sprunge/files/usr/bin/ix similarity index 100% rename from packages/sprunge/src/ix.sh rename to packages/sprunge/files/usr/bin/ix diff --git a/packages/sprunge/src/sprunge.sh b/packages/sprunge/files/usr/bin/sprunge similarity index 100% rename from packages/sprunge/src/sprunge.sh rename to packages/sprunge/files/usr/bin/sprunge diff --git a/packages/ubus-lime-batman-adv/Makefile b/packages/ubus-lime-batman-adv/Makefile index c9da43e9b..fb4c28158 100644 --- a/packages/ubus-lime-batman-adv/Makefile +++ b/packages/ubus-lime-batman-adv/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-batman-adv -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -17,12 +10,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-lime-groundrouting/Makefile b/packages/ubus-lime-groundrouting/Makefile index fbb66a138..129188bfe 100644 --- a/packages/ubus-lime-groundrouting/Makefile +++ b/packages/ubus-lime-groundrouting/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-grondrouting -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -17,12 +10,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-lime-location/Makefile b/packages/ubus-lime-location/Makefile index 5cebad3d1..bf8309bc8 100644 --- a/packages/ubus-lime-location/Makefile +++ b/packages/ubus-lime-location/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-location -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -17,12 +10,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-lime-metrics/Makefile b/packages/ubus-lime-metrics/Makefile index 441036e2f..15a12c32f 100644 --- a/packages/ubus-lime-metrics/Makefile +++ b/packages/ubus-lime-metrics/Makefile @@ -1,12 +1,5 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-metrics -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -18,12 +11,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-lime-openairview/Makefile b/packages/ubus-lime-openairview/Makefile index e67d093b1..312d3814e 100644 --- a/packages/ubus-lime-openairview/Makefile +++ b/packages/ubus-lime-openairview/Makefile @@ -1,12 +1,5 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-openairview -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -18,12 +11,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-lime-utils/Makefile b/packages/ubus-lime-utils/Makefile index 02cfa4bf7..6a3f0d7cb 100644 --- a/packages/ubus-lime-utils/Makefile +++ b/packages/ubus-lime-utils/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-lime-utils -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=ubus @@ -19,12 +12,4 @@ define Package/$(PKG_NAME) PKGARCH:=all endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/ubus-tmate/Makefile b/packages/ubus-tmate/Makefile index 4a5005523..18a89a90e 100644 --- a/packages/ubus-tmate/Makefile +++ b/packages/ubus-tmate/Makefile @@ -1,11 +1,4 @@ -include $(TOPDIR)/rules.mk - -PKG_NAME:=ubus-tmate -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=net @@ -21,12 +14,4 @@ define Package/$(PKG_NAME)/description It allows to create remote sessions over tmate through ubus. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/watchping/Makefile b/packages/watchping/Makefile index b2d1a12ea..e6d5cb27b 100644 --- a/packages/watchping/Makefile +++ b/packages/watchping/Makefile @@ -4,14 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -PKG_NAME:=watchping -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -27,12 +20,4 @@ define Package/$(PKG_NAME)/description Configuration is done in /etc/config/system. endef -define Build/Compile -endef - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/packages/wifi-unstuck-wa/Makefile b/packages/wifi-unstuck-wa/Makefile index b5a57b767..ad30fb432 100644 --- a/packages/wifi-unstuck-wa/Makefile +++ b/packages/wifi-unstuck-wa/Makefile @@ -4,15 +4,7 @@ # This is free software, licensed under the GNU General Public License v3. # -include $(TOPDIR)/rules.mk - -GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) -GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) - -PKG_NAME:=wifi-unstuck-wa -PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) - -include $(INCLUDE_DIR)/package.mk +include ../../libremesh.mk define Package/$(PKG_NAME) SECTION:=utils @@ -28,21 +20,4 @@ define Package/$(PKG_NAME)/description radio driver bugs. endef -define Build/Configure -endef - -define Build/Compile - @rm -rf ./build || true - @mkdir ./build - $(CP) ./files ./build - $(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} + - $(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} + -endef - - -define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/ - $(CP) ./files/* $(1)/ -endef - $(eval $(call BuildPackage,$(PKG_NAME)))