PKG = qpsmtpd-plugin-$(NAME)
CONTRIB_BASE=~/wrk/qpsmtpd/contrib/hjp
CONTRIB_FILES=$(patsubst %, $(CONTRIB_BASE)/$(NAME)/%, $(FILES))

contrib: $(CONTRIB_FILES)

$(CONTRIB_BASE)/$(NAME)/%: %
	cp -p $^ $@

rpm: $(PKG).tar.gz
	rpmbuild -ta --clean --sign --rmsource $^

$(PKG).tar.gz: $(FILES)
	tar cfz $@ $^

$(PLUGIN_DIR)/%: %
	cp $^ $@