aboutsummaryrefslogblamecommitdiffstats
path: root/xorg-server/Makefile
blob: 72de69f6b9301be56aa4057de700b4935de264db (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                                                                                                  


                                                                                   




                                                               



                                                                         


                                        
                                       
                                       

                                       

                         
.POSIX:
include ../common.mk

install:
	if test -L ~/.config/backgrounds; then \
		test "$$(readlink -- ~/.config/backgrounds)" = ~/.dotfiles/.secrets/backgrounds; \
	else \
		test ! -e ~/.config/backgrounds && \
		ln -sf -- ~/.dotfiles/.secrets/backgrounds ~/.config/backgrounds; \
	fi
	mkdir -p -- ../.secrets/backgrounds
	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
	mkdir -p -- ~/.local/bin
	ln -sf -- ~/.dotfiles/xorg-server/setkeys ~/.local/bin/
	test -d xkbdbind || git clone 'git://git.maandree.se/xkbdbind'
	gpp -s '%%' < xkbdbind.config.h.gpp > xkbdbind/config.h
	make -C xkbdbind
	ln -sf -- ~/.dotfiles/xorg-server/xkbdbind/xkbdbind ~/.local/bin/

uninstall:
	-unlink -- ~/.config/backgrounds
	-unlink -- ~/.config/background
	-unlink -- ~/.local/bin/setkeys
	-unlink -- ~/.local/bin/xkdbind
	-rm -rf -- xkbdbind

.PHONY: install uninstall