Skip to content

Commit 9b77d6d

Browse files
committed
Makefile.in: introduce extra-install-appstream rule
This is part of the AppImage build workflow, but it has been turned into a generic Make rule in case a package wants the AppStream-friendly files.
1 parent e95e00e commit 9b77d6d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile.in

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,18 @@ extra-install-apport:
232232
echo " [CP] resources/apport/apport_crashdb.conf"
233233
cp resources/apport/apport_crashdb.conf $(DESTDIR)$(SYSCONFDIR)/apport/crashdb.conf.d/craftos_pc-crashdb.conf
234234

235+
# Not installed by default, since this is not always wanted.
236+
extra-install-appstream:
237+
echo " [MKDIR] $(DESTDIR)$(SHAREDIR)/metainfo"
238+
mkdir -p "$(DESTDIR)$(SHAREDIR)/metainfo"
239+
echo " [CP] resources/appdata.xml"
240+
cp resources/appdata.xml $(DESTDIR)$(SHAREDIR)/metainfo/cc.craftos-pc.CraftOS-PC.appdata.xml
241+
echo " [MKDIR] $(DESTDIR)$(SHAREDIR)/applications"
242+
mkdir -p "$(DESTDIR)$(SHAREDIR)/applications"
243+
# XXX: Should we be installing the .desktop file into the AppStream-friendly location by default?
244+
echo " [CP] resources/CraftOS-PC.desktop"
245+
cp resources/CraftOS-PC.desktop "$(DESTDIR)$(SHAREDIR)/applications/cc.craftos-pc.CraftOS-PC.desktop"
246+
235247
uninstall:
236248
echo " [RM] $(DESTDIR)$(BINDIR)/craftos"
237249
rm -f "$(DESTDIR)$(BINDIR)/craftos"
@@ -255,5 +267,5 @@ uninstall:
255267
test: craftos
256268
./craftos --headless --script $(shell pwd)/resources/CraftOSTest.lua -d "$(shell mktemp -d)"
257269

258-
.PHONY: all macapp clean rebuild install install-bin install-headers install-liblua install-linux install-darwin extra-install-linux-plugin extra-install-apport uninstall test
270+
.PHONY: all macapp clean rebuild install install-bin install-headers install-liblua install-linux install-darwin extra-install-linux-plugin extra-install-apport extra-install-appstream uninstall test
259271
.SILENT:

0 commit comments

Comments
 (0)