Refactor package list file names
[khome.git] / Makefile
index c7130db..31d0fdf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
 MAKEFLAGS := --no-builtin-rules
 
-.PHONY: install_home install_pkgs
+.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps
 
-install_home:
+home:
        @cp  -Rp  home/bin           $(HOME)/
        @cp  -Rp  home/lib           $(HOME)/
        @cp       home/.compton.conf $(HOME)/
@@ -15,5 +15,23 @@ install_home:
        @cp       home/.tmux.conf    $(HOME)/
        @cp       home/.xbindkeysrc  $(HOME)/
 
-install_pkgs: list pkgs-install
-       sudo apt install $(shell ./list pkgs-install)
+pkgs:
+       $(MAKE) pkgs_deb_install
+       $(MAKE) pkgs_deb_purge
+       $(MAKE) pkgs_snap_classic
+
+pkgs_deb_install: list pkgs-deb-install.list
+       sudo apt install $(shell ./list pkgs-deb-install.list)
+
+pkgs_deb_purge: list pkgs-deb-purge.list
+       sudo apt purge $(shell ./list pkgs-deb-purge.list)
+
+pkgs_snap_classic: list pkgs-snap-classic.list
+       @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p))
+
+# Depends on 'snapd' deb pkg being already installed
+pkg_snap_classic_%:
+       sudo snap install --classic $*
+
+deps:
+       @$(foreach d,$(wildcard deps/*),cd $(d) && make)
This page took 0.026961 seconds and 4 git commands to generate.