Makefile: make desktop entries installation optional

This commit is contained in:
Silvan Calarco 2022-06-25 11:54:07 +02:00
parent d093d38eba
commit 85f8abe6f4

View File

@ -3,6 +3,8 @@
include VERSION include VERSION
WITH_DISTROMENU:=
ARCH:=`uname -m` ARCH:=`uname -m`
ifeq ($(ARCH), arm) ifeq ($(ARCH), arm)
@ -111,19 +113,19 @@ install-locales: locales
done done
install-distromenu: dist-update install-distromenu: dist-update
@$(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir) @if [ "$(WITH_DISTROMENU)" ]; then \
$(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir); \
$(INSTALL_DATA) menu/netsrpms.directory \ $(INSTALL_DATA) menu/netsrpms.directory \
$(DESTDIR)$(xdg_directorydir)/netsrpms.directory $(DESTDIR)$(xdg_directorydir)/netsrpms.directory; \
@$(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir) $(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir); \
$(INSTALL_DATA) menu/netsrpms.menu \ $(INSTALL_DATA) menu/netsrpms.menu \
$(DESTDIR)$(xdg_mergedmenudir)/netsrpms.menu $(DESTDIR)$(xdg_mergedmenudir)/netsrpms.menu; \
@$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir) $(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir); \
@$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir)
for pck in $(pck_srpms); do\ for pck in $(pck_srpms); do\
$(INSTALL_DATA) menu/$$pck.desktop \ $(INSTALL_DATA) menu/$$pck.desktop \
$(DESTDIR)$(xdg_appsdir)/$$pck.desktop;\ $(DESTDIR)$(xdg_appsdir)/$$pck.desktop;\
done done; \
fi
install-srpms: install-srpms:
@$(INSTALL_DIR) $(DESTDIR)$(netsrpmsdir) @$(INSTALL_DIR) $(DESTDIR)$(netsrpmsdir)