djcev.com

//

Git Repos / dotfiles / Linux.mk

Last update to this file was on 2024-01-02 at 05:12.

Show Linux.mk

### For use with Linux; last checked in 2024

# install locations, permissions, ownership.
COLORFIX=./fixcolors.sh
COLOREXT=fix
INSTALL?=/usr/bin/install
DESTDIR?=/tmp
INSTALLDIR?=$(HOME)
INTODIR=$(DESTDIR)$(INSTALLDIR)
LOCALDIR=$(INTODIR)/.local
CONFDIR=$(INTODIR)/.config
CONFSUBDIRS!=find config -type d -print | sort | cut -d'/' -f 2-
BINM=740
REGM=640
# GROUP!=stat -f '%Sg' $(INSTALLDIR)
# files that need to be processed by COLORFIX
HEXFILES= config/Xdefaults \
config/alacritty/alacritty.yml \
config/dunst/dunstrc \
config/herbstluftwm/autostart \
config/jgmenu/jgmenurc \
config/mpv/config \
config/qt5ct/colors/termlike.conf \
config/tint2/tint2full.rc \
config/tint2/tint2systray.rc \
tmux.conf
HEXNOPOUND= config/irssi/cev.theme
RGBFILES= config/qtcurve/kdeglobals \
config/qterminal.org/color-schemes/autogen.colorscheme
# static files
BINFILES!= find bin -type f -print
ROOTFILES= tmux.conf

all: fix-colors

$(HEXFILES):
$(COLORFIX) $(@).$(COLOREXT) $(@)

$(HEXNOPOUND):
$(COLORFIX) -X $(@).$(COLOREXT) $(@)

$(RGBFILES):
$(COLORFIX) -d $(@).$(COLOREXT) $(@)

clean:
for f in $(HEXFILES) $(HEXNOPOUND) $(RGBFILES) ; do \
rm $$f ; \
done

# Be careful not to name this the same as the shell script "fixcolors.sh".
fix-colors: $(HEXFILES) $(HEXNOPOUND) $(RGBFILES)

install: fix-colors install-confdirs install-static install-config

install-static: install-bin install-q3a install-root

install-confdirs:
for d in $(CONFSUBDIRS) ; do \
$(INSTALL) -d $(CONFDIR)/$$d ; \
done

install-bin:
$(INSTALL) -d $(LOCALDIR)/bin
for f in $(BINFILES) ; do \
$(INSTALL) -c -m $(BINM) $$f $(LOCALDIR)/$$f ; \
done

install-q3a:
$(INSTALL) -d $(INTODIR)/.q3a
$(INSTALL) -c -m $(REGM) q3a/cev.cfg $(INTODIR)/.q3a/
$(INSTALL) -c -m $(REGM) q3a/cvanderz_hud.cfg $(INTODIR)/.q3a/

install-root: tmux.conf
for f in $(ROOTFILES) ; do \
$(INSTALL) -c -m $(REGM) $$f $(INTODIR)/.$$f ; \
done

install-config:
# use the shell to do this part.
for f in $$(find config -type f \! -name '*.$(COLOREXT)' | sort); do \
$(INSTALL) -c -m $(REGM) $$f $(INTODIR)/.$$f; \
done
chmod $(BINM) $(INTODIR)/.config/herbstluftwm/autostart
chmod $(BINM) $(INTODIR)/.config/redshift/hooks/background.sh

.PHONY: all clean

Return to the top of this page or return to the overview of this repo.

Log Linux.mk

Date Commit Message Author + -
2024-01-02 Change from FreeBSD to Linux, other minor changes cev +86  

Return to the top of this page or return to the overview of this repo.