aboutsummaryrefslogtreecommitdiffstats
path: root/xorg-server/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
committerMattias Andrée <maandree@kth.se>2023-11-18 23:23:40 +0100
commit0f1df0db903ba576fd17b08197d3066af7a61e5f (patch)
treea59c04307b1382257afa3c3512ec3abadf7e0e47 /xorg-server/Makefile
parentUse losetup -d instead of --detach and add clean up (diff)
downloaddotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.gz
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.bz2
dotfiles-0f1df0db903ba576fd17b08197d3066af7a61e5f.tar.xz
A lot of changes
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--xorg-server/Makefile34
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