freebsd-ports/mail/gnarwl/files/patch-data-Makefile
John Marino 040b68c393 mail/gnarlw: Make jobs safe and use BSD_INSTALL macros
This failed on multi-job; I think the clean target removed a config
file after it was built.  While here, use BSD_INSTALL_* macros instead
of hardcoding install commands.
2015-03-19 18:42:01 +00:00

39 lines
1.8 KiB
Text

--- data/Makefile.orig 2005-03-13 14:30:54 UTC
+++ data/Makefile
@@ -1,23 +1,25 @@
catch:
$(MAKE) -C .. all
-all: clean spec config
+all: spec config
clean:
- rm -f $(BIN)-$(VER).spec gnarwl.cfg
+ rm -f $(BIN)-$(VER).spec gnarwl.cfg.sample
config:
- @sed "s\\_HOMEDIR_\\$(HOMEDIR)\\g ; s\\_VER_\\$(VER)\\g ; s\\_MAN_SEC_\\$(MAN_SEC)\\g" < config.tmpl > gnarwl.cfg
+ @gsed "s\\_HOMEDIR_\\$(HOMEDIR)\\g ; s\\_VER_\\$(VER)\\g ; s\\_MAN_SEC_\\$(MAN_SEC)\\g" < config.tmpl > gnarwl.cfg.sample
spec:
- @sed "s\\_BIN_\\$(BIN)\\g ; s\\_VER_\\$(VER)\\g; s\\_SBIN_\\$(SBIN)\\g; s\\_SEC_\\$(MAN_SEC)\\g" < spec.tmpl > $(BIN)-$(VER).spec
+ @gsed "s\\_BIN_\\$(BIN)\\g ; s\\_VER_\\$(VER)\\g; s\\_SBIN_\\$(SBIN)\\g; s\\_SEC_\\$(MAN_SEC)\\g" < spec.tmpl > $(BIN)-$(VER).spec
install:
- mkdir -m 755 -p $(HOMEDIR)/block $(HOMEDIR)/bin $(CONFDIR)
- echo \|$(BINDIR)/$(BIN) > $(HOMEDIR)/.forward
- install -m 644 header.txt $(HOMEDIR)
- install -m 644 footer.txt $(HOMEDIR)
- install -m 600 gnarwl.cfg $(CONFDIR)
- cat badheaders.txt | $(SBINDIR)/$(SBIN) -a $(HOMEDIR)/badheaders.db
- cat blacklist.txt | $(SBINDIR)/$(SBIN) -a $(HOMEDIR)/blacklist.db
+ mkdir -p $(DESTDIR)$(HOMEDIR)/block $(DESTDIR)$(HOMEDIR)/bin $(DESTDIR)$(CONFDIR)
+ echo \|$(BINDIR)/$(BIN) > $(DESTDIR)$(HOMEDIR)/.forward
+ $(BSD_INSTALL_DATA) header.txt $(DESTDIR)$(HOMEDIR)/header.txt.sample
+ $(BSD_INSTALL_DATA) footer.txt $(DESTDIR)$(HOMEDIR)/footer.txt.sample
+ $(BSD_INSTALL_DATA) badheaders.txt $(DESTDIR)$(HOMEDIR)/badheaders.txt.sample
+ $(BSD_INSTALL_DATA) blacklist.txt $(DESTDIR)$(HOMEDIR)/blacklist.txt.sample
+ $(BSD_INSTALL_DATA) gnarwl.cfg.sample $(DESTDIR)$(CONFDIR)
+ cat badheaders.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/badheaders.db.sample
+ cat blacklist.txt | $(DESTDIR)$(SBINDIR)/$(SBIN) -a $(DESTDIR)$(HOMEDIR)/blacklist.db.sample