Skip to content

Commit

Permalink
Move custom install steps into Makefile
Browse files Browse the repository at this point in the history
It can be shared between different packaging then

QubesOS/qubes-issues#4186
  • Loading branch information
marmarek committed May 20, 2021
1 parent e509b65 commit bf5e486
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 31 deletions.
50 changes: 50 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
default: help

help:
@echo "Use setup.py to build"
@echo "Extra make targets available:"
@echo " install-autostart - install autostart files (xdg, systemd)"
@echo " install-icons - install icons"
@echo " install - calls both of the above (but calling setup.py is still necessary)"

install-icons:
mkdir -p $(DESTDIR)/usr/share/icons/Adwaita/22x22/devices/
mkdir -p $(DESTDIR)/usr/share/icons/Adwaita/22x22/status/
cp icons/22x22/generic-usb.png $(DESTDIR)/usr/share/icons/Adwaita/22x22/devices/generic-usb.png
cp icons/outdated.png $(DESTDIR)/usr/share/icons/Adwaita/22x22/status/
mkdir -p $(DESTDIR)/usr/share/applications
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/16x16/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/24x24/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/40x40/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/72x72/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/96x96/apps/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/
cp icons/16x16/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/16x16/apps/qui-domains.png
cp icons/24x24/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/24x24/apps/qui-domains.png
cp icons/32x32/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/32x32/apps/qui-domains.png
cp icons/40x40/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/40x40/apps/qui-domains.png
cp icons/48x48/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/qui-domains.png
cp icons/72x72/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/72x72/apps/qui-domains.png
cp icons/96x96/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/96x96/apps/qui-domains.png
cp icons/128x128/qui-domains.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/qui-domains.png

install-autostart:
mkdir -p $(DESTDIR)/etc/xdg/autostart
cp autostart/qui-domains.desktop $(DESTDIR)/etc/xdg/autostart
cp autostart/qui-devices.desktop $(DESTDIR)/etc/xdg/autostart
cp autostart/qui-clipboard.desktop $(DESTDIR)/etc/xdg/autostart
cp autostart/qui-disk-space.desktop $(DESTDIR)/etc/xdg/autostart
cp autostart/qui-updates.desktop $(DESTDIR)/etc/xdg/autostart
mkdir -p $(DESTDIR)/usr/share/applications
cp qubes-update-gui.desktop $(DESTDIR)/usr/share/applications/
mkdir -p $(DESTDIR)/usr/bin
cp qui/widget-wrapper $(DESTDIR)/usr/bin/widget-wrapper
mkdir -p $(DESTDIR)/lib/systemd/user/
cp linux-systemd/[email protected] $(DESTDIR)/lib/systemd/user/

install: install-autostart install-icons

.PHONY: clean
clean:
32 changes: 1 addition & 31 deletions rpm_spec/qubes-desktop-linux-manager.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,7 @@ A collection of GUI application for enhancing the Qubes UX.

%install
%py3_install
mkdir -p $RPM_BUILD_ROOT/etc/xdg/autostart
cp autostart/qui-domains.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
cp autostart/qui-devices.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
cp autostart/qui-clipboard.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
cp autostart/qui-disk-space.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
cp autostart/qui-updates.desktop $RPM_BUILD_ROOT/etc/xdg/autostart
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/Adwaita/22x22/devices/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/Adwaita/22x22/status/
cp icons/22x22/generic-usb.png $RPM_BUILD_ROOT/usr/share/icons/Adwaita/22x22/devices/generic-usb.png
cp icons/outdated.png $RPM_BUILD_ROOT/usr/share/icons/Adwaita/22x22/status/
mkdir -p $RPM_BUILD_ROOT/usr/share/applications
cp qubes-update-gui.desktop $RPM_BUILD_ROOT/usr/share/applications/
cp qui/widget-wrapper $RPM_BUILD_ROOT/usr/bin/widget-wrapper
mkdir -p $RPM_BUILD_ROOT/lib/systemd/user/
cp linux-systemd/[email protected] $RPM_BUILD_ROOT/lib/systemd/user/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/16x16/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/24x24/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/40x40/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/72x72/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/96x96/apps/
mkdir -p $RPM_BUILD_ROOT/usr/share/icons/hicolor/128x128/apps/
cp icons/16x16/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/16x16/apps/qui-domains.png
cp icons/24x24/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/24x24/apps/qui-domains.png
cp icons/32x32/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/32x32/apps/qui-domains.png
cp icons/40x40/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/40x40/apps/qui-domains.png
cp icons/48x48/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/qui-domains.png
cp icons/72x72/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/72x72/apps/qui-domains.png
cp icons/96x96/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/96x96/apps/qui-domains.png
cp icons/128x128/qui-domains.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/128x128/apps/qui-domains.png
make install DESTDIR=$RPM_BUILD_ROOT

%post
touch --no-create %{_datadir}/icons/Adwaita &>/dev/null || :
Expand Down

0 comments on commit bf5e486

Please sign in to comment.