use local fortunes directory

This stops interference with package managers, who never respond kindly
to outside interference.
This commit is contained in:
Malin Freeborn
2025-04-14 13:58:21 +02:00
parent 980063f803
commit b0aea6b533

View File

@@ -1,6 +1,6 @@
########## Variables ########## ########## Variables ##########
fortune_directory = /usr/share/fortune fortune_directory = /usr/local/share/fortune
# This just equals 'ttrpg.dat', but if someone wants to split it into separate # This just equals 'ttrpg.dat', but if someone wants to split it into separate
# files, e.g. 'D20.dat' and 'WW.dat', the they would be included. # files, e.g. 'D20.dat' and 'WW.dat', the they would be included.
@@ -31,8 +31,12 @@ install: $(targets)
# Mathematicians had to do their own legal work as international law hadn't been # Mathematicians had to do their own legal work as international law hadn't been
# established. Now I'd like to digress from my prepared remarks to discuss how # established. Now I'd like to digress from my prepared remarks to discuss how
# I invented the terlet... # I invented the terlet...
$(targets): $(fortune_directory)/%: % $(targets): $(fortune_directory)/%: % | $(fortune_directory)
install -pm644 $< $@ install -pm644 $< $@
$(fortune_directory):
mkdir $@
uninstall: uninstall:
$(RM) $(wildcard $(targets)) $(RM) $(targets)
! test -d $(fortune_directory) || rmdir --ignore-fail-on-non-empty $(fortune_directory)