diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 56899355b..661622df8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,25 +9,41 @@ on:
- v*
- '!v2020*'
paths:
- - ".github/workflows/*"
+ - ".github/workflows/build.yml"
- "libremesh.mk"
- "packages/**"
+ workflow_dispatch:
jobs:
+ # Build all packages for x86_64 using the openwrt sdk
+ # use latest branch of openwrt with opkg to produce feed at https://feed.libremesh.org/master
+ # use main branch of openwrt with apk to produce feed at https://feed.libremesh.org/apk/master
+ # NOTE: this doesn't sign packages for apk
build:
- name: Build ${{ github.ref }}
+ name: Build ${{ matrix.version }} ${{ github.ref }}
runs-on: ubuntu-latest
-
+ strategy:
+ fail-fast: false
+ max-parallel: 1
+ matrix:
+ include:
+ - { version: main, output_path: 'apk/'}
+ - { version: openwrt-23.05, output_path: ''}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v4
- name: Build packages
uses: openwrt/gh-action-sdk@v7
env:
- ARCH: "x86_64-openwrt-23.05"
+ ARCH: "x86_64-${{ matrix.version }}"
FEEDNAME: "libremesh"
IGNORE_ERRORS: "n m y"
- KEY_BUILD: "${{ secrets.KEY_BUILD }}"
+ KEY_BUILD: "${{ matrix.version != 'main' && secrets.KEY_BUILD || '' }}"
+ INDEX: 1
+ NO_DEFAULT_FEEDS: 1
+ NO_REFRESH_CHECK: 1
+ NO_SHFMT_CHECK: 1
+ # V: sc
- name: Set package destination
run: |
@@ -36,12 +52,12 @@ jobs:
echo "DEST_DIR=$TAG" >> $GITHUB_ENV
- name: Upload packages to GitHub Pages
- uses: peaceiris/actions-gh-pages@v3
+ uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: libremesh/lime-feed
publish_dir: bin/packages/x86_64/libremesh/
- destination_dir: ${{ env.DEST_DIR }}
+ destination_dir: ${{ matrix.output_path }}${{ env.DEST_DIR }}
# - name: Upload packages to S3
# uses: jakejarvis/s3-sync-action@master
@@ -54,4 +70,3 @@ jobs:
# AWS_S3_ENDPOINT: ${{ secrets.AWS_S3_ENDPOINT }}
# SOURCE_DIR: bin/packages/x86_64/libremesh/
# DEST_DIR: ${{ env.DEST_DIR }}
-
diff --git a/.github/workflows/multi-arch-build.yml b/.github/workflows/multi-arch-build.yml
index 241027325..1e05c8468 100644
--- a/.github/workflows/multi-arch-build.yml
+++ b/.github/workflows/multi-arch-build.yml
@@ -9,79 +9,135 @@ on:
- v*
- '!v2020*'
paths:
+ - ".github/workflows/multi-arch-build.yml"
- 'packages/shared-state-async/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
+# Build packages using the openwrt sdk
+# for each architecture supported
+# in openwrt branches 'main', 'stable', 'old-stable'
+#
+# NOTE:
+# This list of branches will be updated manually
+# - at next openwrt release, ideally adding '25.xx' and removing '23.05'
+# - whether it will be identified an incompatibility of the current libremesh code with an openwrt branch
+env:
+ BUILD_BRANCHES: "main 24.10 23.05"
+
+# workaround: build a package that selects '+shared-state-async'
+# as 'make package/shared-state-async/check' fails with 'Package HASH check failed'
+ PACKAGES: "shared-state-bat_hosts"
+
jobs:
+ generate_matrix:
+ name: 'Generate matrix'
+ runs-on: ubuntu-latest
+ outputs:
+ matrix_builds: ${{ steps.define_matrix.outputs.matrix_builds }}
+ steps:
+ - name: Set package destination
+ run: |
+ export TAG=$(echo "${{ github.ref }}" | cut -d '/' -f 3- | perl -pe 's/v([0-9])/$1/')
+ echo "$TAG"
+ echo "DEST_DIR=$TAG" >> $GITHUB_ENV
+
+ - name: Define matrix of branches and archs
+ id: define_matrix
+ run: |
+ JSON='['
+ FIRST_BUILD=1
+ echo "${{ env.BUILD_BRANCHES }}"
+ for version in ${{ env.BUILD_BRANCHES }}; do
+
+ VERSION=$([ "$version" == "main" ] \
+ && echo "main" || echo "openwrt-$version")
+ echo $VERSION
+
+ VERSION_PATH=$([ "$version" == "main" ] \
+ && echo "snapshots/packages" || echo "releases/packages-$version")
+ echo $VERSION_PATH
+
+ OPENWRT_BRANCH_PATH=$([ "$version" == "main" ] \
+ && echo "openwrt-main" || echo "openwrt-$version")
+ echo $OPENWRT_BRANCH_PATH
+
+ wget -r -nH --no-parent --level 1 --accept html -P. \
+ --directory-prefix=. https://downloads.openwrt.org/$VERSION_PATH/
+
+ for arch in $(ls ./$VERSION_PATH/ | grep -v html); do
+ [[ $FIRST_BUILD -ne 1 ]] && JSON="$JSON"','
+ FIRST_BUILD=0
+
+ JSON="$JSON"'{"version": "'"$VERSION"'" ,"arch": "'"$arch"'", "openwrt_branch_path": "'"$OPENWRT_BRANCH_PATH"'" }'
+ echo $JSON
+ done
+ done
+
+ matrix_include='{"include": '"$JSON"']}'
+ echo "matrix_builds=${matrix_include}" >> "$GITHUB_OUTPUT"
+
build:
- name: build ${{ matrix.arch }} ${{ github.ref }}
+ name: build ${{ matrix.arch }}-${{ matrix.version }}
runs-on: ubuntu-latest
+ needs: generate_matrix
strategy:
fail-fast: false
- max-parallel: 1
- matrix:
- arch:
- - aarch64_cortex-a53
- - aarch64_cortex-a72
- - aarch64_generic
- - arm_arm1176jzf-s_vfp
- - arm_arm926ej-s
- - arm_cortex-a15_neon-vfpv4
- - arm_cortex-a5_vfpv4
- - arm_cortex-a7
- - arm_cortex-a7_neon-vfpv4
- - arm_cortex-a7_vfpv4
- - arm_cortex-a8_vfpv3
- - arm_cortex-a9
- - arm_cortex-a9_neon
- - arm_cortex-a9_vfpv3-d16
- - arm_fa526
- - arm_mpcore
- - arm_xscale
- - i386_pentium-mmx
- - i386_pentium4
- - mips64_octeonplus
- - mips_24kc
- - mips_4kec
- - mips_mips32
- - mipsel_24kc
- - mipsel_24kc_24kf
- - mipsel_74kc
- - mipsel_mips32
- - powerpc_464fp
- - powerpc_8548
- - riscv64_riscv64
- - x86_64
-
+ max-parallel: 10
+ matrix: ${{ fromJson(needs.generate_matrix.outputs.matrix_builds) }}
+ # matrix:
+ # include:
+ # - { version: main, arch: x86_64, openwrt_branch_path: 'openwrt-main'}
+ # - { version: main, arch: arc_archs, openwrt_branch_path: 'openwrt-main'}
steps:
- uses: actions/checkout@v4
- - name: Build packages ${{ matrix.arch }}
+ - name: Build packages ${{ matrix.arch }}-${{ matrix.version }}
uses: openwrt/gh-action-sdk@v7
env:
- ARCH: "${{ matrix.arch }}"
+ ARCH: "${{ matrix.arch }}-${{ matrix.version }}"
FEEDNAME: "libremesh"
IGNORE_ERRORS: "n m y"
- KEY_BUILD: "${{ secrets.KEY_BUILD }}"
- PACKAGES: "shared-state-bat_hosts"
+ KEY_BUILD: "${{ matrix.version != 'main' && secrets.KEY_BUILD || '' }}"
+ PACKAGES: "${{ env.PACKAGES }}"
INDEX: 1
NO_DEFAULT_FEEDS: 1
NO_REFRESH_CHECK: 1
NO_SHFMT_CHECK: 1
- - name: Set package destination
- run: |
- export TAG=$(echo "${{ github.ref }}" | cut -d '/' -f 3- | perl -pe 's/v([0-9])/$1/')
- echo "$TAG"
- echo "DEST_DIR=$TAG" >> $GITHUB_ENV
+ - name: upload artifact
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.arch }}-${{ matrix.version }}
+ path: bin/packages/${{ matrix.arch }}/libremesh/
+
+ publish:
+ name: publish ${{ github.ref }}
+ runs-on: ubuntu-latest
+ if: ${{ always() }}
+ needs: [generate_matrix, build]
+ strategy:
+ fail-fast: false
+ max-parallel: 1
+ matrix: ${{ fromJson(needs.generate_matrix.outputs.matrix_builds) }}
+ # matrix:
+ # include:
+ # - { version: main, arch: x86_64, openwrt_branch_path: 'openwrt-main'}
+ # - { version: main, arch: arc_archs, openwrt_branch_path: 'openwrt-main'}
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/download-artifact@v4
+ with:
+ name: "${{ matrix.arch }}-${{ matrix.version }}"
+ path: artifacts
- name: Upload packages to GitHub Pages
- uses: peaceiris/actions-gh-pages@v3
+ uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: libremesh/lime-feed
- publish_dir: bin/packages/${{ matrix.arch }}/libremesh/
- destination_dir: arch_packages/${{ env.DEST_DIR }}/${{ matrix.arch }}
-
+ publish_dir: ./artifacts/
+ destination_dir: arch_packages/${{ env.DEST_DIR }}/${{ matrix.openwrt_branch_path }}/${{ matrix.arch }}/
diff --git a/README.md b/README.md
index 29ea7d419..fd1e7d8da 100644
--- a/README.md
+++ b/README.md
@@ -56,22 +56,41 @@ Start an ImageBuilder of your choice, for example ath79-generic if your device i
```shell
mkdir ./images/
-docker run -it -v $(pwd)/images:/images/ ghcr.io/openwrt/imagebuilder:ath79-generic-v23.05.3
+docker run -it -v $(pwd)/images:/images/ ghcr.io/openwrt/imagebuilder:ath79-generic-v23.05.5
```
If your device is not part of ath79-generic profiles, you can replace it with another <target>-<subtarget> combination. For knowing which target and subtarget is best suited for your router, check out the page about it in the [OpenWrt's Table of Hardware][OpenWrt-ToH].
Within the container, add the `lime-packages` feeds:
+**opkg on openwrt 24.10.x and previous**
+
```shell
echo "src/gz libremesh https://feed.libremesh.org/master" >> repositories.conf
echo "src/gz libremesh_profiles https://feed.libremesh.org/profiles" >> repositories.conf
-echo "src/gz libremesh_arch_packages https://feed.libremesh.org/arch_packages/master/mips_24kc" >> repositories.conf
echo "untrusted comment: signed by libremesh.org key a71b3c8285abd28b" > keys/a71b3c8285abd28b
echo "RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8" >> keys/a71b3c8285abd28b
```
+To use the new `shared-state-async` add this repo:
+- replace `openwrt_23.05` with the openwrt branch
+- replace `mips_24kc` with the architecture of your device based on target/subtarget
+
+```shell
+echo "src/gz libremesh_arch_packages https://feed.libremesh.org/arch_packages/master/openwrt_23.05/mips_24kc" >> repositories.conf
+```
-If your device is not part of ath79-generic replace `mips_24kc` with the architecture of the selected <target>/<subtarget>.
+**apk on openwrt main branch**
+```
+echo "https://feed.libremesh.org/apk/master/packages.adb" >> repositories
+echo "https://feed.libremesh.org/apk/profiles/packages.adb" >> repositories
+```
+To use the new `shared-state-async` add this repo:
+- replace `openwrt_main` with the openwrt branch
+- replace `mips_24kc` with the architecture of your device based on target/subtarget
+
+```shell
+echo "https://feed.libremesh.org/arch_packages/master/openwrt_main/mips_24kc/packages.adb" >> repositories
+```
Ideally add your own `lime-community` files within the container in the folder
`./files/etc/config/`. To find possible options consult the
@@ -94,14 +113,9 @@ Your images should be available outside of the container in the `./images/` fold
Go to . Find your device. Click on the folder symbol right after "Links: ". Alternatively, find your device in [OpenWrt's Table of Hardware][OpenWrt-ToH], find the image download link, remove the filename from the right side of the link and put the result in your browsers address bar. Scroll down and download openwrt-imagebuilder-*. Unpack the file and open a terminal inside the directory. Add the `lime-packages` feed:
-```shell
-echo "src/gz libremesh https://feed.libremesh.org/master" >> repositories.conf
-echo "src/gz libremesh_profiles https://feed.libremesh.org/profiles" >> repositories.conf
-echo "src/gz libremesh_arch_packages https://feed.libremesh.org/arch_packages/master/mips_24kc" >> repositories.conf
-echo "untrusted comment: signed by libremesh.org key a71b3c8285abd28b" > keys/a71b3c8285abd28b
-echo "RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8" >> keys/a71b3c8285abd28b
-```
-If your device is not part of ath79-generic replace `mips_24kc` with the architecture of the selected <target>/<subtarget>.
+Follow the same steps at With Docker
+- **opkg on openwrt 24.10.x and previous**
+- **apk on openwrt main branch**
Create an image with
```shell
diff --git a/libremesh.mk b/libremesh.mk
index abb02afc4..52023c81b 100644
--- a/libremesh.mk
+++ b/libremesh.mk
@@ -3,25 +3,20 @@ include $(TOPDIR)/rules.mk
PKG_NAME?=$(notdir ${CURDIR})
# from https://github.com/openwrt/luci/blob/master/luci.mk
+# default package version follow this scheme:
+# [year].[day_of_year].[seconds_of_day]~[commit_short_hash] eg. 24.322.80622~a403707
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" \
+ if git log -1 >/dev/null 2>/dev/null; then \
+ set -- $$(git log -1 --format="%ct %h" --abbrev=7); \
+ secs="$$(($$1 % 86400))"; \
+ yday="$$(date --utc --date="@$$1" "+%y.%j")"; \
+ printf '%s.%05d~%s' "$$yday" "$$secs" "$$2"; \
+ else \
+ echo "0"; \
+ fi; \
)))
-PKG_RELEASE?=1
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_BUILD_DIR?=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
@@ -31,6 +26,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 7ac250246..0158450f5 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 d327c9c54..63e0ab5a5 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:=$(shell git branch | sed -n '/\* /s///p')
diff --git a/packages/lime-system/files/etc/uci-defaults/92_add-lime-repos b/packages/lime-system/files/etc/uci-defaults/92_add-lime-repos
index 59a05fc28..6b7a49270 100755
--- a/packages/lime-system/files/etc/uci-defaults/92_add-lime-repos
+++ b/packages/lime-system/files/etc/uci-defaults/92_add-lime-repos
@@ -5,31 +5,65 @@
exit 0
}
-feeds_file="/etc/opkg/limefeeds.conf"
+[ -f /etc/apk/repositories.d/distfeeds.list ] && {
+ repo='apk'
+ feeds_file='/etc/apk/repositories.d/limefeeds.list'
+ dist_feeds_file='/etc/apk/repositories.d/distfeeds.list'
+ main_feed_path='apk/'
+ arch="$(cat /etc/apk/arch)"
+} || ([ -f /etc/opkg/distfeed.conf ] && {
+ repo='opkg'
+ feeds_file='/etc/opkg/limefeeds.conf'
+ dist_feeds_file='/etc/opkg/distfeeds.conf'
+ main_feed_path=''
+ arch="$(grep OPENWRT_ARCH /etc/os-release | sed 's/OPENWRT_ARCH=\"\(.*\)\"/\1/')"
+ key_name="a71b3c8285abd28b"
+ key_content="RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8"
+})
+
+[ -z "$repo" ] && {
+ echo "Package manager not found - skipping"
+ exit 0
+}
[ -f "$feeds_file" ] && {
- echo "LibreMesh opkg feeds already defined - skipping"
- exit 0
+ echo "LibreMesh $repo feeds already defined - skipping"
+ exit 0;
}
-arch_packages="$(grep OPENWRT_ARCH /etc/os-release | sed 's/OPENWRT_ARCH=\"\(.*\)\"/\1/')"
+openwrt_branch_ref="$(grep -m 1 "openwrt.org/" $dist_feeds_file | sed 's|.*openwrt.org/\(.*\)|\1|' )"
+
+if [ '' != "$openwrt_branch_ref" ]; then
+$(echo $openwrt_branch_ref | grep -q 'snapshots') && {
+ openwrt_branch='openwrt-main'
+} || ($(echo $openwrt_branch_ref | grep -q 'releases') && {
+ branch_n="$(echo $openwrt_branch_ref | sed 's/releases\///')"
+ openwrt_branch="openwrt-${branch_n:0:5}"
+})
+else
+ echo "String not found 'openwrt.org' in default ${repo} feeds, cannot determine openwrt branch"
+fi
[ "$LIME_CODENAME" == "development" ] && {
- packages_url="http://feed.libremesh.org/master";
- arch_packages_url="http://feed.libremesh.org/arch_packages/master/$arch_packages";
+ packages_url="http://feed.libremesh.org/${main_feed_path}master";
+ arch_packages_url="http://feed.libremesh.org/arch_packages/master/$openwrt_branch/$arch";
} || {
- packages_url="http://feed.libremesh.org/$LIME_RELEASE"
- arch_packages_url="http://feed.libremesh.org/arch_packages/$LIME_RELEASE/$arch_packages";
+ packages_url="http://feed.libremesh.org/${main_feed_path}$LIME_RELEASE"
+ arch_packages_url="http://feed.libremesh.org/arch_packages/$LIME_RELEASE/$openwrt_branch/$arch";
}
-profiles_url="http://feed.libremesh.org/profiles"
-
-key_name="a71b3c8285abd28b"
-key_content="RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8"
+profiles_url="http://feed.libremesh.org/${main_feed_path}profiles"
-echo "Configuring official LibreMesh opkg feeds"
+echo "Configuring official LibreMesh $repo feeds"
+[ $repo == 'apk' ] && {
+echo "$packages_url/packages.adb" > "$feeds_file"
+echo "${arch_packages_url}/packages.adb" >> "$feeds_file"
+echo "$profiles_url/packages.adb" >> "$feeds_file"
+} || (
+[ $repo == 'opkg' ] && {
echo "src/gz libremesh $packages_url" > "$feeds_file"
echo "src/gz libremesh_arch_packages $arch_packages_url" >> "$feeds_file"
echo "src/gz profiles $profiles_url" >> "$feeds_file"
echo "untrusted comment: signed by libremesh.org key $key_name" > "/etc/opkg/keys/$key_name"
echo "$key_content" >> "/etc/opkg/keys/$key_name"
+})
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 ed2a59d19..367cf1c56 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
@@ -27,12 +19,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)))