From e0a1fb8a2b0eb4a0473229aaf3ccc45272c11888 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 10 Mar 2022 07:33:58 +0100 Subject: [PATCH] Makefile: factorize AppStream filename in own variable Makes it easier to read, and also to modify for modules outside the cockpit-project org. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7b3b841..78770d5 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ export TEST_OS TARFILE=$(RPM_NAME)-$(VERSION).tar.xz NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz SPEC=$(RPM_NAME).spec +APPSTREAMFILE=org.cockpit-project.$(PACKAGE_NAME).metainfo.xml VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS) # stamp file to check if/when npm install ran NODE_MODULES_TEST=package-lock.json @@ -40,7 +41,7 @@ po/$(PACKAGE_NAME).html.pot: $(NODE_MODULES_TEST) po/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST) po/manifest2po src/manifest.json -o $@ -po/$(PACKAGE_NAME).metainfo.pot: org.cockpit-project.$(PACKAGE_NAME).metainfo.xml +po/$(PACKAGE_NAME).metainfo.pot: $(APPSTREAMFILE) xgettext --default-domain=$(PACKAGE_NAME) --output=$@ $< po/$(PACKAGE_NAME).pot: po/$(PACKAGE_NAME).html.pot po/$(PACKAGE_NAME).js.pot po/$(PACKAGE_NAME).manifest.pot po/$(PACKAGE_NAME).metainfo.pot @@ -78,8 +79,8 @@ install: $(WEBPACK_TEST) po/LINGUAS cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) mkdir -p $(DESTDIR)/usr/share/metainfo/ msgfmt --xml -d po \ - --template org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \ - -o $(DESTDIR)/usr/share/metainfo/org.cockpit-project.$(PACKAGE_NAME).metainfo.xml + --template $(APPSTREAMFILE) \ + -o $(DESTDIR)/usr/share/metainfo/$(APPSTREAMFILE) # this requires a built source tree and avoids having to install anything system-wide devel-install: $(WEBPACK_TEST)