PKG = qpsmtpd-plugin-check-deliver FILES = $(PKG).spec check_deliver Makefile TODO CONTRIB_BASE=~/wrk/qpsmtpd/contrib/hjp CONTRIB_FILES=$(patsubst %, $(CONTRIB_BASE)/aliases/%, $(FILES)) PLUGIN_DIR=/usr/share/qpsmtpd/plugins all: install: $(PLUGIN_DIR)/check_deliver rpm: $(PKG).tar.gz rpmbuild -ta --clean --sign --rmsource $^ $(PKG).tar.gz: $(PKG).spec check_deliver tar cfz $@ $^ contrib: $(CONTRIB_FILES) $(CONTRIB_BASE)/aliases/%: % cp -p $^ $@ $(PLUGIN_DIR)/%: % cp $^ $@