Makefile: factorize AppStream filename in own variable
Makes it easier to read, and also to modify for modules outside the cockpit-project org.
This commit is contained in:
parent
6c123f94ec
commit
e0a1fb8a2b
1 changed files with 4 additions and 3 deletions
7
Makefile
7
Makefile
|
|
@ -9,6 +9,7 @@ export TEST_OS
|
||||||
TARFILE=$(RPM_NAME)-$(VERSION).tar.xz
|
TARFILE=$(RPM_NAME)-$(VERSION).tar.xz
|
||||||
NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz
|
NODE_CACHE=$(RPM_NAME)-node-$(VERSION).tar.xz
|
||||||
SPEC=$(RPM_NAME).spec
|
SPEC=$(RPM_NAME).spec
|
||||||
|
APPSTREAMFILE=org.cockpit-project.$(PACKAGE_NAME).metainfo.xml
|
||||||
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
|
VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)
|
||||||
# stamp file to check if/when npm install ran
|
# stamp file to check if/when npm install ran
|
||||||
NODE_MODULES_TEST=package-lock.json
|
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/$(PACKAGE_NAME).manifest.pot: $(NODE_MODULES_TEST)
|
||||||
po/manifest2po src/manifest.json -o $@
|
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=$@ $<
|
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
|
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)
|
cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME)
|
||||||
mkdir -p $(DESTDIR)/usr/share/metainfo/
|
mkdir -p $(DESTDIR)/usr/share/metainfo/
|
||||||
msgfmt --xml -d po \
|
msgfmt --xml -d po \
|
||||||
--template org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \
|
--template $(APPSTREAMFILE) \
|
||||||
-o $(DESTDIR)/usr/share/metainfo/org.cockpit-project.$(PACKAGE_NAME).metainfo.xml
|
-o $(DESTDIR)/usr/share/metainfo/$(APPSTREAMFILE)
|
||||||
|
|
||||||
# this requires a built source tree and avoids having to install anything system-wide
|
# this requires a built source tree and avoids having to install anything system-wide
|
||||||
devel-install: $(WEBPACK_TEST)
|
devel-install: $(WEBPACK_TEST)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue