Commit | Line | Data |
---|---|---|
80cc9199 SK |
1 | MAKEFLAGS := --no-builtin-rules |
2 | ||
f908f2dc SK |
3 | DEPS := $(wildcard deps/*) |
4 | ||
2b497be2 SK |
5 | .PHONY: \ |
6 | $(DEPS) \ | |
7 | deps \ | |
8 | home \ | |
9 | mpdconf \ | |
10 | pkgs_brew_cask_install \ | |
11 | pkgs_brew_install \ | |
12 | pkgs_deb_install \ | |
13 | pkgs_deb_purge \ | |
14 | pkgs_debian \ | |
15 | pkgs_mac \ | |
c51a3e0d | 16 | pkgs_pip \ |
2b497be2 SK |
17 | pkgs_snap_classic \ |
18 | pkgs_snap_strict | |
80cc9199 | 19 | |
9d953881 | 20 | home: mpdconf |
9e667c0c SK |
21 | @cp -Rp home/bin $(HOME)/ |
22 | @cp -Rp home/lib $(HOME)/ | |
57667523 | 23 | @cp home/.compton.conf $(HOME)/ |
9e667c0c | 24 | @cp -Rp home/.config/ $(HOME)/ |
f1950371 | 25 | @cp -Rp home/.newsboat/ $(HOME)/ |
9e667c0c SK |
26 | @cp home/.profile $(HOME)/ |
27 | @cp home/.fonts.conf $(HOME)/ | |
28 | @fc-cache $(HOME)/.fonts | |
29 | @cp home/.Rprofile $(HOME)/ | |
9e667c0c SK |
30 | @cp home/.tmux.conf $(HOME)/ |
31 | @cp home/.xbindkeysrc $(HOME)/ | |
b2efbb10 | 32 | |
9d953881 SK |
33 | mpdconf: |
34 | @mkdir -p ~/Archives/Audio | |
35 | @mkdir -p ~/var/lib/mpd/playlists | |
36 | @mkdir -p ~/var/log/mpd | |
37 | @mkdir -p ~/var/run/mpd | |
38 | @cp home/.mpdconf $(HOME)/ | |
39 | ||
70300ea4 | 40 | pkgs_debian: |
649af0dd SK |
41 | $(MAKE) pkgs_deb_install |
42 | $(MAKE) pkgs_deb_purge | |
c51a3e0d | 43 | $(MAKE) pkgs_pip |
6ce65841 | 44 | $(MAKE) pkgs_snap_classic |
7ae05795 | 45 | $(MAKE) pkgs_snap_strict |
600d3b0b | 46 | |
70300ea4 SK |
47 | pkgs_mac: |
48 | $(MAKE) pkgs_brew_install | |
49 | $(MAKE) pkgs_brew_cask_install | |
50 | ||
c51a3e0d SK |
51 | pkgs_pip: |
52 | sudo pip3 install $(shell ./list pkgs-pip.list) | |
53 | ||
70300ea4 SK |
54 | pkgs_brew_install: list pkgs-brew-install.list |
55 | brew install $(shell ./list pkgs-brew-install.list) | |
56 | ||
57 | pkgs_brew_cask_install: list pkgs-brew-cask-install.list | |
58 | brew cask install $(shell ./list pkgs-brew-cask-install.list) | |
59 | ||
649af0dd SK |
60 | pkgs_deb_install: list pkgs-deb-install.list |
61 | sudo apt install $(shell ./list pkgs-deb-install.list) | |
600d3b0b | 62 | |
649af0dd SK |
63 | pkgs_deb_purge: list pkgs-deb-purge.list |
64 | sudo apt purge $(shell ./list pkgs-deb-purge.list) | |
b59a4c3b | 65 | |
649af0dd SK |
66 | pkgs_snap_classic: list pkgs-snap-classic.list |
67 | @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p)) | |
6ce65841 | 68 | |
7ae05795 SK |
69 | pkgs_snap_strict: list pkgs-snap-strict.list |
70 | @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-strict.list),pkg_snap_strict_$(p)) | |
71 | ||
72 | # 'snap' command comes from 'snapd' deb pkg | |
6ce65841 SK |
73 | pkg_snap_classic_%: |
74 | sudo snap install --classic $* | |
7ae05795 SK |
75 | pkg_snap_strict_%: |
76 | sudo snap install $* | |
6ce65841 | 77 | |
f908f2dc SK |
78 | deps: $(DEPS) |
79 | ||
80 | define GEN_DEP_RULE | |
81 | $(1): | |
82 | cd $1 && make | |
83 | endef | |
84 | ||
85 | $(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d)))) |