* [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
* Re: [PATCH 5/5] storage-fixup: a Makefile
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
0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2008-11-12 5:28 UTC (permalink / raw)
To: Kel Modderman; +Cc: linux-ide
Kel Modderman wrote:
> +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)/
Why untar and tar again?
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] storage-fixup: a Makefile
2008-11-12 5:28 ` Tejun Heo
@ 2008-11-16 17:43 ` Kel Modderman
2008-11-17 2:18 ` Tejun Heo
0 siblings, 1 reply; 4+ messages in thread
From: Kel Modderman @ 2008-11-16 17:43 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
On Wednesday 12 November 2008 15:28:31 Tejun Heo wrote:
> Kel Modderman wrote:
> > +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)/
>
> Why untar and tar again?
>
Don't have a reason. This is probably better:
---
dist: clean
git-archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD \
$(FILES) | gzip > ../$(NAME)-$(VERSION).tar.gz
---
Thanks, Kel.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] storage-fixup: a Makefile
2008-11-16 17:43 ` Kel Modderman
@ 2008-11-17 2:18 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2008-11-17 2:18 UTC (permalink / raw)
To: Kel Modderman; +Cc: linux-ide
Kel Modderman wrote:
> On Wednesday 12 November 2008 15:28:31 Tejun Heo wrote:
>> Kel Modderman wrote:
>>> +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)/
>> Why untar and tar again?
>>
>
> Don't have a reason. This is probably better:
> ---
> dist: clean
> git-archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD \
> $(FILES) | gzip > ../$(NAME)-$(VERSION).tar.gz
Updated to create tarball in the source directory as you never know
you'll have write access to .. && git-archive doesn't mind having extra
files lying around anyway.
Thanks.
--
tejun
^ 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).