linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] storage-fixup: a Makefile
@ 2008-10-28 23:11 Kel Modderman
  2008-11-12  5:28 ` Tejun Heo
  0 siblings, 1 reply; 4+ messages in thread
From: Kel Modderman @ 2008-10-28 23:11 UTC (permalink / raw)
  To: linux-ide

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)/
---

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-17  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-28 23:11 [PATCH 5/5] storage-fixup: a Makefile Kel Modderman
2008-11-12  5:28 ` Tejun Heo
2008-11-16 17:43   ` Kel Modderman
2008-11-17  2:18     ` Tejun Heo

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).