]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
buildprocess: Add extra metadata to meta-* files
authorRobin Roevens <robin.roevens@disroot.org>
Mon, 31 Jan 2022 22:40:46 +0000 (23:40 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Fri, 11 Feb 2022 15:08:57 +0000 (15:08 +0000)
* 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>
lfs/Config
src/pakfire/meta

index 1209c1603a876084cc5005d34531c2f6918044b4..d4c3df5352b4594be50903a6078e33313e844cf1 100644 (file)
@@ -399,13 +399,16 @@ define PAK
        # Cleanup
        rm -rf $(DIR_TMP_PAK)
 
-       # Create meta file
+       # Escape SUMMARY variable and create meta file
+       summaryEscaped=$$(sed 's/[&/\]/\\&/g' <<< "$(SUMMARY)"); \
        sed \
                -e "s/NAME/$(PROG)/g" \
+               -e "s/SUMMARY/$$summaryEscaped/g" \
                -e "s/VER/$(VER)/g" \
                -e "s/RELEASE/$(PAK_VER)/g" \
                -e "s/DEPS/$(DEPS)/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)
 endef
 
@@ -413,6 +416,12 @@ define INSTALL_INITSCRIPT
        install -m 754 -v $(DIR_SRC)/src/initscripts/packages/$(1)  /etc/rc.d/init.d/$(1)
 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)"
 define UPDATE_AUTOMAKE
        for i in $$(find $(DIR_APP) -name config.guess -o -name config.sub); do \
index d97b2a0fa670f9d80bd8cd0228c8530cf403c97c..08e7d53fb8bc72237399b58b1f2ac39628eee2c4 100644 (file)
@@ -1,6 +1,8 @@
 Name: NAME
+Summary: SUMMARY
 ProgVersion: VER
 Release: RELEASE
 Size: SIZE
 Dependencies: DEPS
 File: NAME-VER-RELEASE.ipfire
+Services: SERVICES