djcev.com

//

Git Repos / dotfiles / FreeBSD.mk

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

Show FreeBSD.mk

### For use with FreeBSD; last checked in 2023

# install locations, permissions, ownership.
COLORFIX= ./fixcolors.sh
COLOREXT= fix
INSTALL?= /usr/bin/install
DESTDIR?=
INSTALLDIR?= $(HOME)
INTODIR= $(DESTDIR)/$(INSTALLDIR)
CONFDIR= $(INTODIR)/.config
CONFSUBDIRS!= find -s config -type d -print | 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 -s bin -type f -print
ROOTFILES= login_conf profile shrc tmux.conf xsession

all: fix-colors

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

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

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

clean:
. for f in $(HEXFILES) $(HEXNOPOUND) $(RGBFILES)
rm -f $(f)
. endfor

# 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)
$(INSTALL) -d $(CONFDIR)/$(d)
. endfor

install-bin:
$(INSTALL) -d $(INTODIR)/bin
. for f in $(BINFILES)
$(INSTALL) -c -m $(BINM) $(f) $(INTODIR)/$(f)
. endfor

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)
$(INSTALL) -c -m $(REGM) $(f) $(INTODIR)/.$(f)
. endfor

install-config:
# use the shell to do this part.
for f in $$(find -s config -type f \! -name '*.$(COLOREXT)'); 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 FreeBSD.mk

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