SOURCES := $(wildcard *.iso) CWD := $(shell pwd) U_G := $(shell getent passwd $(shell id -u)|sed 's/:.*//') $(shell getent group $(shell id -g)|sed 's/:.*//') all: SHA1SUMS lsrals lsrals: $(patsubst %.iso,%.iso.ls-Ral,$(SOURCES)) clean: rm -f *.iso.ls-Ral SHA1SUMS SHA1SUMS: $(SOURCES) sha1sum $(SOURCES) |gpg --comment "See http://ftp.frugalware.org/pub/README.GPG for info" \ --clearsign -u 20F55619 > SHA1SUMS %.iso.ls-Ral: %.iso mnt=`mktemp -d`; \ fuseiso $< $$mnt; \ cd $$mnt; \ ls -lR |sed "s/$(U_G)//">$(CWD)/$@; \ cd - >/dev/null; \ sleep 1; \ fusermount -u $$mnt; \ rmdir $$mnt