- @cp -Rp home/.config/ $(HOME)/
- @cp home/.profile $(HOME)/
- @cp home/.fonts.conf $(HOME)/
- @fc-cache $(HOME)/.fonts
- @cp home/.Rprofile $(HOME)/
- @cp home/.mpdconf $(HOME)/
- @cp home/.tmux.conf $(HOME)/
- @cp home/.xbindkeysrc $(HOME)/
+ @cp -Rp home/.config/ $(HOME)/
+ @cp home/.profile $(HOME)/
+ @cp home/.fonts.conf $(HOME)/
+ @fc-cache $(HOME)/.fonts
+ @cp home/.Rprofile $(HOME)/
+ @cp home/.mpdconf $(HOME)/
+ @cp home/.tmux.conf $(HOME)/
+ @cp home/.xbindkeysrc $(HOME)/
+
+pkgs:
+ $(MAKE) pkgs_deb_install
+ $(MAKE) pkgs_deb_purge
+ $(MAKE) pkgs_snap_classic
+ $(MAKE) pkgs_snap_strict
+
+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))
+
+pkgs_snap_strict: list pkgs-snap-strict.list
+ @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-strict.list),pkg_snap_strict_$(p))
+
+# 'snap' command comes from 'snapd' deb pkg
+pkg_snap_classic_%:
+ sudo snap install --classic $*
+pkg_snap_strict_%:
+ sudo snap install $*
+
+deps: $(DEPS)
+
+define GEN_DEP_RULE
+$(1):
+ cd $1 && make
+endef
+
+$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))