X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=Makefile;h=c3b5f0696adcc7d8fb625332871ef706702c72da;hb=20ff3b14f4ebcd9d18f39ef9ffe846de33bf6659;hp=98825bddca182aa3c2c279cc6ba1759470839ea8;hpb=28ac473b8b0727aeb8ca1c101fc16d40c0f14b8d;p=khome.git diff --git a/Makefile b/Makefile index 98825bd..c3b5f06 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,45 @@ MAKEFLAGS := --no-builtin-rules -.PHONY: install install_packages +DEPS := $(wildcard deps/*) -install: - @cp -Rp home/bin $(HOME)/ - @cp -Rp home/lib $(HOME)/ - @cp home/.profile $(HOME)/ - @cp home/.fonts.conf $(HOME)/ - @fc-cache $(HOME)/.fonts +.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps $(DEPS) -install_packages: system/debian/dpkg-selections - @dpkg --set-selections < $< - @apt-get -u dselect-upgrade +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/.tmux.conf $(HOME)/ + @cp home/.xbindkeysrc $(HOME)/ -system/debian/dpkg-selections: - @dpkg --get-selections > $@ +pkgs: + $(MAKE) pkgs_deb_install + $(MAKE) pkgs_deb_purge + $(MAKE) pkgs_snap_classic -system/debian/apt-sources.list: - @cp /etc/apt/sources.list $@ +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))))