From: Russ Allbery Date: Sat, 16 Oct 2010 18:29:25 +0000 (-0700) Subject: Initial version of distribution Makefile X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9c0370336461f94689f1a5b7f6e31eaa1f1a5848;p=packages%2Fa%2Fafs-monitor.git Initial version of distribution Makefile The Makefile for this package only automates make dist and isn't included in the package, since the scripts don't require compilation or further modification and we don't provide an install target. --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..68ff3af --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +# This Makefile contains only a dist rule to generate a distribution +# tarball, and isn't included in the distribution. The software doesn't +# need any compilation, so there are no other rules. + +VERSION := $(shell grep '^afs-monitor' NEWS | head -1 | cut -d' ' -f 2) +DATE := $(shell grep '^afs-monitor' NEWS | head -1 | cut -d' ' -f 3) + +SCRIPTS := check_afsspace check_bos check_rxdebug check_udebug +EXTRA := LICENSE NEWS README + +all: + +dist: + mkdir afs-monitor-$(VERSION) + set -e; for script in $(SCRIPTS); do \ + sed -e 's![@]VERSION[@]!$(VERSION)!g' \ + -e 's![@]DATE[@]!$(DATE)!g' \ + $$script > afs-monitor-$(VERSION)/$$script ; \ + done + cp $(EXTRA) afs-monitor-$(VERSION)/ + tar cf afs-monitor-$(VERSION).tar afs-monitor-$(VERSION) + gzip -9 afs-monitor-$(VERSION).tar + rm -r afs-monitor-$(VERSION)