From 85f8abe6f40f5d60fa01bfd3c40f55b29c809183 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 25 Jun 2022 11:54:07 +0200 Subject: [PATCH] Makefile: make desktop entries installation optional --- Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index d5c377c..d8b6e6d 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ include VERSION +WITH_DISTROMENU:= + ARCH:=`uname -m` ifeq ($(ARCH), arm) @@ -111,19 +113,19 @@ install-locales: locales done install-distromenu: dist-update - @$(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir) + @if [ "$(WITH_DISTROMENU)" ]; then \ + $(INSTALL_DIR) $(DESTDIR)$(xdg_directorydir); \ $(INSTALL_DATA) menu/netsrpms.directory \ - $(DESTDIR)$(xdg_directorydir)/netsrpms.directory - @$(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir) + $(DESTDIR)$(xdg_directorydir)/netsrpms.directory; \ + $(INSTALL_DIR) $(DESTDIR)$(xdg_mergedmenudir); \ $(INSTALL_DATA) menu/netsrpms.menu \ - $(DESTDIR)$(xdg_mergedmenudir)/netsrpms.menu - @$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir) - - @$(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir) + $(DESTDIR)$(xdg_mergedmenudir)/netsrpms.menu; \ + $(INSTALL_DIR) $(DESTDIR)$(xdg_appsdir); \ for pck in $(pck_srpms); do\ $(INSTALL_DATA) menu/$$pck.desktop \ $(DESTDIR)$(xdg_appsdir)/$$pck.desktop;\ - done + done; \ + fi install-srpms: @$(INSTALL_DIR) $(DESTDIR)$(netsrpmsdir)