]> git.michaelhowe.org Git - packages/a/afs-monitor.git/commitdiff
Initial version of distribution Makefile
authorRuss Allbery <rra@stanford.edu>
Sat, 16 Oct 2010 18:29:25 +0000 (11:29 -0700)
committerRuss Allbery <rra@stanford.edu>
Sat, 16 Oct 2010 18:29:25 +0000 (11:29 -0700)
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.

Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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)