[PATCH 5/5] storage-fixup: a Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
--- /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)/
---
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux