Add Xapian article URI
[khome.git] / Makefile
index d083411..c3b5f06 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,45 @@
 MAKEFLAGS := --no-builtin-rules
 
-DPKG_SELECTIONS := system/debian/dpkg-selections
-APT_SOURCES     := system/debian/apt-sources.list
+DEPS := $(wildcard deps/*)
 
-.PHONY: update install install_packages
+.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps $(DEPS)
 
-install:
-       @cp  -Rp  home/bin          $(HOME)/
-       @cp  -Rp  home/lib          $(HOME)/
+home:
+       @cp  -Rp  home/bin           $(HOME)/
+       @cp  -Rp  home/lib           $(HOME)/
        @cp       home/.compton.conf $(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/.xbindkeysrc $(HOME)/
-
-# May still need to run:
-# 1. dselect update
-# 2. interactive dselect with install,
-# 3. apt update
-# 4. apt upgrade
-install_packages: $(DPKG_SELECTIONS)
-       @dpkg --set-selections < $<
-       @apt-get -u dselect-upgrade
-
-update:
-       @dpkg --get-selections > $(DPKG_SELECTIONS)
-       @cp /etc/apt/sources.list $(APT_SOURCES)
+       @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
+
+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: $(DEPS)
+
+define GEN_DEP_RULE
+$(1):
+       cd $1 && make
+endef
+
+$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))
This page took 0.028484 seconds and 4 git commands to generate.