diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..99b6f68 --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +########## Variables ########## + +fortune_directory = /usr/share/fortune + +cookies = $(wildcard ttrpg*) + +target_cookies = $(patsubst %, $(fortune_directory)/%, $(cookies)) +target_dats = $(patsubst %, $(fortune_directory)/%.dat, $(cookies)) + +targets = $(target_cookies) $(target_dats) + +########## Rules ########## + +.PHONY: install +install: $(targets) + +$(target_cookies): $(fortune_directory)/%: % + install -pm644 $< $@ + +$(target_dats): $(fortune_directory)/%.dat: % + strfile $< $@ + +uninstall: + $(RM) $(wildcard $(targets)) diff --git a/README.md b/README.md index 1f10ddc..7d1129b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ttrpg-fortunes -A collection of fortunes regarding tabletop rpgs and adjacent topics -This is supposed to be a collection of adages, jokes, stories, DM Aid, and observations regarding tabletop roleplaying games. +A collection of fortunes regarding tabletop rpgs and adjacent topics. +This is supposed to be a collection of adages, jokes, stories, DM aids, and observations regarding tabletop roleplaying games. It likely should be split into multiple sections when it gets large enough. -Collection of quotes happens on the wiki: https://campaignwiki.org/wiki/TTRPGFortuneFile/HomePage \ No newline at end of file +Collection of quotes happens on the wiki: https://campaignwiki.org/wiki/TTRPGFortuneFile/HomePage