aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:52:56 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-02 16:52:56 +0100
commit44716daaf1eb940b33b0459941f29881ae09aa3a (patch)
tree78ac2089f880c01fa74451609af6b5eb9d00fa05
parentb718175601c02b8a251931622e7b79f469645111 (diff)
Added OpenBSD tarball building.
-rw-r--r--Makefile30
1 files changed, 29 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7144d18..edb457e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,34 @@ man/%.1: bin/%
clean:
$(RM) -r man
+ # Theoretically this will clean up the shebang munging done by the openbsd_tarball task below.
+ if [ -e ./setup.rb ] ; then \
+ ruby ./setup.rb distclean ; \
+ ruby ./setup.rb config ; \
+ ruby ./setup.rb setup ; \
+ ruby ./setup.rb clean ; \
+ fi
+ $(RM) -r tmp
-.PHONY: all clean
+distclean: clean
+ [ -e ./setup.rb ] && ruby ./setup.rb distclean
+ $(RM) setup.rb
+ $(RM) ruby-mauvealert.tar.gz
+
+test: setup.rb
+ ruby ./setup.rb test
+
+setup.rb: /usr/lib/ruby/1.8/setup.rb
+ ln -sf /usr/lib/ruby/1.8/setup.rb .
+
+openbsd_tarball: ruby-mauvealert.tar.gz
+
+ruby-mauvealert.tar.gz: all setup.rb
+ mkdir -p tmp
+ ruby ./setup.rb config --prefix=/usr/local --installdirs=site --ruby-path=/usr/local/bin/ruby18 --mandir=\$$prefix/man/man1 --siteruby=\$$libdir/ruby/site_ruby --siterubyver=\$$siteruby/1.8
+ ruby ./setup.rb setup
+ ruby ./setup.rb install --prefix=tmp/
+ tar -C tmp -czvf $@ .
+
+.PHONY: all clean openbsd_tarball test distclean