mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
buildprocess: Add extra metadata to meta-* files
* Add a Summary and Services field to the meta-* addon files. * Add an INSTALL_INITSCRIPTS macro that takes a space seperated list of initscripts to install. * I kept the original INSTALL_INITSCRIPT as a method to install individual initscripts for backwards compatibility and possible corner cases. Signed-off-by: Robin Roevens <robin.roevens@disroot.org> Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
This commit is contained in:
committed by
Peter Müller
parent
fbc6b9e0c1
commit
a9d98b3491
11
lfs/Config
11
lfs/Config
@@ -399,13 +399,16 @@ define PAK
|
|||||||
# Cleanup
|
# Cleanup
|
||||||
rm -rf $(DIR_TMP_PAK)
|
rm -rf $(DIR_TMP_PAK)
|
||||||
|
|
||||||
# Create meta file
|
# Escape SUMMARY variable and create meta file
|
||||||
|
summaryEscaped=$$(sed 's/[&/\]/\\&/g' <<< "$(SUMMARY)"); \
|
||||||
sed \
|
sed \
|
||||||
-e "s/NAME/$(PROG)/g" \
|
-e "s/NAME/$(PROG)/g" \
|
||||||
|
-e "s/SUMMARY/$$summaryEscaped/g" \
|
||||||
-e "s/VER/$(VER)/g" \
|
-e "s/VER/$(VER)/g" \
|
||||||
-e "s/RELEASE/$(PAK_VER)/g" \
|
-e "s/RELEASE/$(PAK_VER)/g" \
|
||||||
-e "s/DEPS/$(DEPS)/g" \
|
-e "s/DEPS/$(DEPS)/g" \
|
||||||
-e "s/SIZE/$$(stat --format=%s /install/packages/$(PROG)-$(VER)-$(PAK_VER).ipfire)/g" \
|
-e "s/SIZE/$$(stat --format=%s /install/packages/$(PROG)-$(VER)-$(PAK_VER).ipfire)/g" \
|
||||||
|
-e "s/SERVICES/$(SERVICES)/g" \
|
||||||
< /usr/src/src/pakfire/meta > /install/packages/meta-$(PROG)
|
< /usr/src/src/pakfire/meta > /install/packages/meta-$(PROG)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -413,6 +416,12 @@ define INSTALL_INITSCRIPT
|
|||||||
install -m 754 -v $(DIR_SRC)/src/initscripts/packages/$(1) /etc/rc.d/init.d/$(1)
|
install -m 754 -v $(DIR_SRC)/src/initscripts/packages/$(1) /etc/rc.d/init.d/$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define INSTALL_INITSCRIPTS
|
||||||
|
for initscript in $(1); do \
|
||||||
|
$(call INSTALL_INITSCRIPT,$$initscript) || exit 1; \
|
||||||
|
done
|
||||||
|
endef
|
||||||
|
|
||||||
ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)"
|
ifeq "$(BUILD_ARCH)" "$(filter $(BUILD_ARCH),aarch64 riscv64)"
|
||||||
define UPDATE_AUTOMAKE
|
define UPDATE_AUTOMAKE
|
||||||
for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \
|
for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
Name: NAME
|
Name: NAME
|
||||||
|
Summary: SUMMARY
|
||||||
ProgVersion: VER
|
ProgVersion: VER
|
||||||
Release: RELEASE
|
Release: RELEASE
|
||||||
Size: SIZE
|
Size: SIZE
|
||||||
Dependencies: DEPS
|
Dependencies: DEPS
|
||||||
File: NAME-VER-RELEASE.ipfire
|
File: NAME-VER-RELEASE.ipfire
|
||||||
|
Services: SERVICES
|
||||||
|
|||||||
Reference in New Issue
Block a user