linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kel Modderman <kel@otaku42.de>
To: linux-ide@vger.kernel.org
Subject: [PATCH 5/5] storage-fixup: a Makefile
Date: Wed, 29 Oct 2008 09:11:51 +1000	[thread overview]
Message-ID: <200810290911.51961.kel@otaku42.de> (raw)

Add a Makefile for convenience of installation and preparing dist. tarball.

This could be handy for distributions/admins who want to deploy this workaround
in a package.

Signed-off-by: Kel Modderman <kel@otaku42.de>
---
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+
+NAME    := storage-fixup
+FILES   := $(NAME) $(NAME).conf $(NAME).8 LICENSE Makefile
+VERSION := $(shell /bin/bash ./$(NAME) -V)
+BINDIR  := /usr/sbin
+ETCDIR  := /etc
+MANDIR  := /usr/share/man/man8
+MKDIR   := mkdir -p
+INSTALL := install
+
+all:
+	$(info Nothing to be done, ready for "$(MAKE) install" ...)
+
+%.gz: %
+	gzip -9 < $< > $@
+
+install: $(NAME).8.gz
+	$(MKDIR) $(DESTDIR)$(BINDIR)
+	$(INSTALL) -t $(DESTDIR)$(BINDIR) -m 755 $(NAME)
+	$(MKDIR) $(DESTDIR)$(ETCDIR)
+	$(INSTALL) -t $(DESTDIR)$(ETCDIR) -m 644 $(NAME).conf
+	$(MKDIR) $(DESTDIR)$(MANDIR)
+	$(INSTALL) -t $(DESTDIR)$(MANDIR) -m 644 $(NAME).8.gz
+
+clean:
+	$(RM) $(NAME).8.gz
+
+dist: clean
+	git-archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD \
+		$(FILES) | tar -C.. -xf -
+	tar -czvf ../$(NAME)-$(VERSION).tar.gz -C.. $(NAME)-$(VERSION)/
+	$(RM) -r ../$(NAME)-$(VERSION)/
---

             reply	other threads:[~2008-10-28 23:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 23:11 Kel Modderman [this message]
2008-11-12  5:28 ` [PATCH 5/5] storage-fixup: a Makefile Tejun Heo
2008-11-16 17:43   ` Kel Modderman
2008-11-17  2:18     ` Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810290911.51961.kel@otaku42.de \
    --to=kel@otaku42.de \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).