diff options
Diffstat (limited to 'xorg-server/Makefile')
-rw-r--r-- | xorg-server/Makefile | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/xorg-server/Makefile b/xorg-server/Makefile index 72de69f..a4b433b 100644 --- a/xorg-server/Makefile +++ b/xorg-server/Makefile @@ -1,5 +1,6 @@ .POSIX: -include ../common.mk + +XKBDBIND_GIT_HASH = 2ab5473fc48d91ecce1f11c49e5decdcf821e3d4 install: if test -L ~/.config/backgrounds; then \ @@ -12,21 +13,36 @@ install: if test ! -L ~/.config/background && test ! -e ~/.config/background; then \ ln -s backgrounds/default ~/.config/background; \ fi - $(CHECK_INSTALLED) asroot - $(CHECK_INSTALLED) xorg-setxkbmap - $(CHECK_INSTALLED) xorg-xmodmap + ../check-installed-shebang setkeys + ../check-in-path sponge + ../check-any-installed asroot asroot-libpassphrase + ../check-any-installed xorg-setxkbmap x11-xkb-utils + ../check-any-installed xorg-xmodmap x11-xserver-utils mkdir -p -- ~/.local/bin - ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/ - test -d xkbdbind || git clone 'git://git.maandree.se/xkbdbind' + test ! -e ~/.local/bin/setkeys || test -L ~/.local/bin/setkeys + ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/setkeys + if test -d xkbdbind; then \ + if test -d xkbdbind/.git; then \ + if ! git log '--format=format:%H' | grep '^$(XKBDBIND_GIT_HASH)$$' >/dev/null; then \ + (cd -- xkbdbind && git pull) || :; \ + fi; \ + fi; \ + else \ + git clone 'git://git.maandree.se/xkbdbind' || cp -r /usr/src/xkbdbind/ .; \ + fi gpp -s '%%' < xkbdbind.config.h.gpp > xkbdbind/config.h - make -C xkbdbind - ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/ + cd xkbdbind && $(MAKE) + test ! -e ~/.local/bin/xkbdbind || test -L ~/.local/bin/xkbdbind + ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/xkbdbind uninstall: + +! ../check-installed xorg-server + +! ../check-installed xserver-xorg-core -unlink -- ~/.config/backgrounds -unlink -- ~/.config/background -unlink -- ~/.local/bin/setkeys -unlink -- ~/.local/bin/xkdbind -rm -rf -- xkbdbind -.PHONY: install uninstall +clean: + -rm -rf -- xkbdbind |