MAKEFLAGS := --no-builtin-rules
+DIFF := diff --color=always
DEPS := $(wildcard deps/*)
.PHONY: \
+ default \
+ clean \
$(DEPS) \
deps \
home \
pkgs_deb_purge \
pkgs_debian \
pkgs_mac \
+ pkgs_pip \
pkgs_snap_classic \
pkgs_snap_strict
-home: mpdconf
+default:
+ @echo '================================================================================'
+ @echo '| Default target disabled. Specify a concrete one.'
+ @echo '================================================================================'
+ @exit 1
+
+home: mpdconf compiled
+ @cp -Rp bin $(HOME)/
@cp -Rp home/bin $(HOME)/
@cp -Rp home/lib $(HOME)/
@cp home/.compton.conf $(HOME)/
@cp -Rp home/.config/ $(HOME)/
+ @cp -Rp home/.newsboat/ $(HOME)/
@cp home/.profile $(HOME)/
@cp home/.fonts.conf $(HOME)/
- @fc-cache $(HOME)/.fonts
@cp home/.Rprofile $(HOME)/
@cp home/.tmux.conf $(HOME)/
@cp home/.xbindkeysrc $(HOME)/
@mkdir -p ~/var/run/mpd
@cp home/.mpdconf $(HOME)/
-pkgs_debian:
- $(MAKE) pkgs_deb_install
- $(MAKE) pkgs_deb_purge
- $(MAKE) pkgs_snap_classic
- $(MAKE) pkgs_snap_strict
+compiled:
+ mkdir -p bin
+ cd src && make
+ mv src/clockloop bin/
+
+font_cache:
+ @fc-cache -fv
+
+#
+# Golang
+#
+pkgs_golang: list pkgs-golang.list
+ go get $(shell ./list pkgs-golang.list)
+
+#
+# Ubuntu
+#
+pkgs_ubuntu: list pkgs-ubuntu.list
+ sudo apt install $(shell ./list pkgs-ubuntu.list)
+
+pkgs_ubuntu_debfiles: list pkgs-ubuntu-debfiles.list
+ ./install-debfiles pkgs-ubuntu-debfiles.list
+
+#
+# PIP
+#
+pkgs_pip:
+ sudo pip3 install $(shell ./list pkgs-pip.list)
+
+#
+# Homebrew/Mac
+#
pkgs_mac:
$(MAKE) pkgs_brew_install
$(MAKE) pkgs_brew_cask_install
+# TODO: Test pkgs_brew_tap when list contains multiple items
+pkgs_brew_tap: list pkgs-brew-tap.list
+ brew tap $(shell ./list pkgs-brew-tap.list)
+
pkgs_brew_install: list pkgs-brew-install.list
brew install $(shell ./list pkgs-brew-install.list)
pkgs_brew_cask_install: list pkgs-brew-cask-install.list
brew cask install $(shell ./list pkgs-brew-cask-install.list)
+#
+# Debian
+#
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)
+#
+# Snap
+#
pkgs_snap_classic: list pkgs-snap-classic.list
@$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p))
endef
$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))
+
+diff:
+ $(DIFF) $(HOME)/.Rprofile home/.Rprofile || true
+ $(DIFF) $(HOME)/.compton.conf home/.compton.conf || true
+ $(DIFF) $(HOME)/.config/dunst/dunstrc home/.config/dunst/dunstrc || true
+ $(DIFF) $(HOME)/.config/mimeapps.list home/.config/mimeapps.list || true
+ $(DIFF) $(HOME)/.config/neofetch/config.conf home/.config/neofetch/config.conf || true
+ $(DIFF) $(HOME)/.config/ranger/rc.conf home/.config/ranger/rc.conf || true
+ $(DIFF) $(HOME)/.config/screengrab/screengrab.conf home/.config/screengrab/screengrab.conf || true
+ $(DIFF) $(HOME)/.fonts.conf home/.fonts.conf || true
+ $(DIFF) $(HOME)/.mpdconf home/.mpdconf || true
+ $(DIFF) $(HOME)/.newsboat/config home/.newsboat/config || true
+ $(DIFF) $(HOME)/.profile home/.profile || true
+ $(DIFF) $(HOME)/.tmux.conf home/.tmux.conf || true
+ $(DIFF) $(HOME)/.xbindkeysrc home/.xbindkeysrc || true
+ $(DIFF) $(HOME)/lib/login_aliases.sh home/lib/login_aliases.sh || true
+ $(DIFF) $(HOME)/lib/login_functions.sh home/lib/login_functions.sh || true
+ $(DIFF) $(HOME)/lib/login_variables.sh home/lib/login_variables.sh || true
+ $(DIFF) $(HOME)/lib/login_variables_dpi_high.sh home/lib/login_variables_dpi_high.sh || true
+ $(DIFF) $(HOME)/lib/login_variables_dpi_norm.sh home/lib/login_variables_dpi_norm.sh || true
+
+clean:
+ rm -rf ./debfiles
+ cd src && make clean