Skip to content

Commit f9f5a3d

Browse files
committed
treewide: reword lime_release and extend the usage of libremesh.mk
libremesh.mk: extend the usage to all packages without a pkg_source_url lime-debug: use libremesh.mk lime-docs: fix banner not displayed lime-system: use libremesh.mk lime-system: drop compatibility script for v2020.4 migrate-wifi-bands lime-system: reword /etc/lime_release 'development' to 'nightly' which is shorter and emphasizes the fact that the code is usable but it is not a fixed/stable release. While 'development' is more vague. lime-system: reword lime_description and add it to /etc/os-release from: LiMe master development (master rev. 0b6b5c5 20260810_1130) to: LibreMesh 25.12.5 r26.222.40775~0b6b5c5 nightly This text then displayed: - in the lime-app status page - via ssh after the banner via the profile.d/10-lime-banner.sh - via cli running `ubus call system board` shared-state-async: symlink script and add the missing dependency on shared-state
1 parent 8b5ebdb commit f9f5a3d

15 files changed

Lines changed: 59 additions & 260 deletions

File tree

‎libremesh.mk‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,19 @@ include $(INCLUDE_DIR)/package.mk
2323
define Build/Compile
2424
@rm -rf ./build || true
2525
@mkdir ./build
26-
$(CP) ./files ./build
26+
[ ! -d files ] || $(CP) ./files ./build
2727
$(FIND) ./build -name '*.sh' -exec sed -i '/^\s*#\[Doc\]/d' {} +
2828
$(FIND) ./build -name '*.lua' -exec sed -i '/^\s*--!.*/d' {} +
2929
$(FIND) ./build -type f -executable -exec sed -i '/^\s*#\[Doc\]/d' {} +
3030
$(FIND) ./build -type f -executable -exec sed -i '/^\s*--!.*/d' {} +
3131
endef
3232

33+
ifndef Package/$(PKG_NAME)/install
3334
define Package/$(PKG_NAME)/install
3435
$(INSTALL_DIR) $(1)/
35-
$(CP) ./build/files/* $(1)/
36+
[ ! -d ./build/files ] || $(CP) ./build/files/* $(1)/
3637
endef
38+
endif
3739

3840
define Build/Configure
3941
endef

‎packages/lime-debug/Makefile‎

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@
22
#
33
# Copyright (C) 2006-2014 OpenWrt.org
44

5-
include $(TOPDIR)/rules.mk
6-
7-
GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g')
8-
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . )
9-
10-
PKG_NAME=lime-debug
11-
PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP)
12-
13-
include $(INCLUDE_DIR)/package.mk
5+
include ../../libremesh.mk
146

157
define Package/$(PKG_NAME)
168
TITLE:=libremesh debug utils
@@ -35,11 +27,4 @@ define Package/$(PKG_NAME)/config
3527
select BUSYBOX_CONFIG_NC_SERVER
3628
endef
3729

38-
define Build/Compile
39-
endef
40-
41-
define Package/$(PKG_NAME)/install
42-
$(INSTALL_DIR) $(1)/
43-
endef
44-
4530
$(eval $(call BuildPackage,$(PKG_NAME)))

‎packages/lime-docs/files/etc/profile.d/15-lime-docs-banner‎

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
cat <<EOF
3+
Find offline documentation in /docs or http://thisnode.info/docs/
4+
------------------------------------------------------
5+
EOF

‎packages/lime-system/Makefile‎

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,14 @@
22
#
33
# Copyright (C) 2006-2014 OpenWrt.org
44

5-
include $(TOPDIR)/rules.mk
5+
include ../../libremesh.mk
66

7-
GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . | sed 's|-|.|g' )
8-
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . )
9-
10-
PKG_NAME:=lime-system
11-
PKG_VERSION=$(GIT_COMMIT_DATE)~$(GIT_COMMIT_TSTAMP)
12-
13-
LIME_ID:=LiMe
14-
LIME_RELEASE:=$(shell git branch | sed -n '/\* /s///p')
15-
LIME_CODENAME:=development
7+
LIME_ID:=LibreMesh
8+
LIME_RELEASE:=
9+
LIME_CODENAME:=nightly
1610
LIME_BRANCH:=$(shell git branch | sed -n '/\* /s///p')
17-
LIME_REVISION:=$(shell git log -n 1 --pretty=%h)
18-
LIME_BUILDDATE:=$(shell date +%Y%m%d_%H%M)
19-
LIME_DESCRIPTION:=$(LIME_ID) $(LIME_RELEASE) $(LIME_CODENAME) ($(LIME_BRANCH) rev. $(LIME_REVISION) $(LIME_BUILDDATE))
20-
21-
include $(INCLUDE_DIR)/package.mk
11+
LIME_REVISION:=r$(PKG_VERSION)
12+
LIME_BUILD_DATE:=$(shell date +%s)
2213

2314
define Package/$(PKG_NAME)
2415
TITLE:=LibreMesh system core
@@ -32,28 +23,25 @@ define Package/$(PKG_NAME)
3223
endef
3324

3425
define Package/$(PKG_NAME)/description
35-
LibreMesh is a modular meta-firmare this package provide the core of it
26+
LibreMesh is a modular meta-firmware this package provide the core of it
3627
which articulates all LiMe modules around it
3728
endef
3829

39-
define Build/Compile
40-
endef
41-
42-
LIME_VERSION_SED:=$(SED) 's,%LIME_ID%,$(LIME_ID),g' \
43-
-e 's,%LIME_RELEASE%,$(LIME_RELEASE),g' \
44-
-e 's,%LIME_CODENAME%,$(LIME_CODENAME),g' \
45-
-e 's,%LIME_BRANCH%,$(LIME_BRANCH),g' \
46-
-e 's,%LIME_REVISION%,$(LIME_REVISION),g' \
47-
-e 's,%LIME_BUILDDATE%,$(LIME_BUILDDATE),g' \
48-
-e 's,%LIME_DESCRIPTION%,$(LIME_DESCRIPTION),g'
30+
LIME_VERSION_SED:=$(SED) 's,%LIME_ID%,$(LIME_ID),g' \
31+
-e 's,%LIME_RELEASE%,$(LIME_RELEASE),g' \
32+
-e 's,%LIME_CODENAME%,$(LIME_CODENAME),g' \
33+
-e 's,%LIME_BRANCH%,$(LIME_BRANCH),g' \
34+
-e 's,%LIME_REVISION%,$(LIME_REVISION),g' \
35+
-e 's,%LIME_BUILD_DATE%,$(LIME_BUILD_DATE),g'
4936

5037
define Package/$(PKG_NAME)/install
5138
$(INSTALL_DIR) $(1)/
52-
$(CP) ./files/* $(1)/
39+
[ ! -d ./build/files ] || $(CP) ./build/files/* $(1)/
5340
$(INSTALL_DIR) $(1)/etc/hotplug.d/lime-config/
54-
$(LIME_VERSION_SED) \
55-
$(1)/etc/lime_release \
56-
$(1)/etc/profile.d/10-lime-banner.sh
41+
$(INSTALL_DIR) $(1)/etc/lime-assets/community/
42+
$(INSTALL_DIR) $(1)/etc/lime-assets/node/
43+
44+
$(LIME_VERSION_SED) $(1)/etc/lime_release
5745
endef
5846

5947
define Package/$(PKG_NAME)/postinst

‎packages/lime-system/files/etc/lime-assets/community/.placeholder‎

Whitespace-only changes.

‎packages/lime-system/files/etc/lime-assets/node/.placeholder‎

Whitespace-only changes.

‎packages/lime-system/files/etc/lime_release‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ LIME_CODENAME="%LIME_CODENAME%"
44
LIME_BRANCH="%LIME_BRANCH%"
55
LIME_REVISION="%LIME_REVISION%"
66
LIME_DESCRIPTION="%LIME_DESCRIPTION%"
7-
LIME_BUILDDATE="%LIME_BUILDDATE%"
8-
7+
LIME_BUILD_DATE="%LIME_BUILD_DATE%"
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
2-
3-
echo " ___ __ __ _______ __"
4-
echo " | |_|__| |--.----.-----.| | |-----.-----| |--."
5-
echo " | | | _ | _| -__|| | -__|__ --| |"
6-
echo " |_____|__|_____|__| |_____||__|_|__|_____|_____|__|__|"
7-
echo ""
8-
echo " ------------------------------------------------------"
9-
echo " %LIME_DESCRIPTION%"
10-
echo " ------------------------------------------------------"
11-
echo " https://libremesh.org"
12-
echo " ------------------------------------------------------"
2+
cat <<EOF
3+
___ __ __ _______ __
4+
| |_|__| |--.----.-----.| | |-----.-----| |--.
5+
| | | _ | _| -__|| | -__|__ --| |
6+
|_____|__|_____|__| |_____||__|_|__|_____|_____|__|__|
7+
------------------------------------------------------
8+
%LIME_DESCRIPTION%
9+
------------------------------------------------------
10+
https://libremesh.org
11+
------------------------------------------------------
12+
EOF

‎packages/lime-system/files/etc/uci-defaults/89_lime-release‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@
44
. /etc/openwrt_release
55
. /etc/lime_release
66

7-
sed -i -e s/"^DISTRIB_ID=.*"/"DISTRIB_ID='$LIME_ID'"/g \
8-
-e s/"^DISTRIB_RELEASE=.*"/"DISTRIB_RELEASE='$LIME_RELEASE'"/g \
9-
-e s/"^DISTRIB_REVISION=.*"/"DISTRIB_REVISION='$LIME_REVISION'"/g \
10-
-e s/"^DISTRIB_CODENAME=.*"/"DISTRIB_CODENAME='$LIME_CODENAME'"/g \
11-
-e s/"^DISTRIB_DESCRIPTION=.*"/"DISTRIB_DESCRIPTION='$LIME_DESCRIPTION'"/g \
12-
/etc/openwrt_release
7+
LIME_VERSION_CODE="$LIME_RELEASE $LIME_REVISION $LIME_CODENAME"
8+
if [ -z "$LIME_RELEASE" ]; then
9+
LIME_VERSION_CODE="$LIME_REVISION $LIME_CODENAME"
10+
fi
11+
12+
LIME_DESCRIPTION="$LIME_ID $DISTRIB_RELEASE $LIME_VERSION_CODE"
13+
14+
sed -i -e "s,^\(OPENWRT_RELEASE=\).*$/\1$LIME_DESCRIPTION/g" \
15+
/etc/os-release
16+
17+
sed -i -e "s,%LIME_DESCRIPTION%,$LIME_DESCRIPTION,g" \
18+
/etc/profile.d/10-lime-banner.sh \
19+
/etc/lime_release
1320

1421
exit 0

0 commit comments

Comments
 (0)