All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] Makefile: installing configs from dracut.conf.d and README files
Date: Wed, 30 Jun 2010 21:39:46 +0200	[thread overview]
Message-ID: <20100630213946.1dd59b45@etiriah> (raw)

[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]

Install configs from dracut.conf.d (in source tree) into
/usr/share/doc/dracut-$(VERSION).  It is so, because the package
maintainer or user should decide which configs should be included by
Dracut.  The configs in dracut.conf.d need to have suffix ".example".
This is so, because we'd like to use configs in Dracut local mode and
not including them all.  Just create symlink like
foo.conf.example -> foo.conf to load it when calling dracut with '-l'.

I've also provided READMEs install for, I hope, users convenience.

(I'm using configs in this way in i18n module.  If it's OK, I'll
prepare final patch with i18n module.)

---
 Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index a009b97..8e26b00 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
 VERSION=006
 GITVERSION=$(shell [ -d .git ] && git rev-list  --abbrev-commit  -n 1 HEAD  |cut -b 1-8)
+COMPRESS=bzip2 -f
 
 prefix ?= /usr
 datadir ?= ${prefix}/share
@@ -7,6 +8,7 @@ pkglibdir ?= ${datadir}/dracut
 sysconfdir ?= ${prefix}/etc
 sbindir ?= ${prefix}/sbin
 mandir ?= ${prefix}/share/man
+docdir ?= ${prefix}/share/doc/dracut-$(VERSION)
 
 
 .PHONY: install clean archive rpm testimage test all check AUTHORS
@@ -28,6 +30,7 @@ install:
 	mkdir -p $(DESTDIR)$(sysconfdir)
 	mkdir -p $(DESTDIR)$(pkglibdir)/modules.d
 	mkdir -p $(DESTDIR)$(mandir)/man{5,8}
+	mkdir -p $(DESTDIR)$(docdir)
 	install -m 0755 dracut $(DESTDIR)$(sbindir)/dracut
 	install -m 0755 dracut-gencmdline $(DESTDIR)$(sbindir)/dracut-gencmdline
 	install -m 0755 dracut-catimages $(DESTDIR)$(sbindir)/dracut-catimages
@@ -38,12 +41,14 @@ ifeq (1,${WITH_SWITCH_ROOT})
 endif
 	install -m 0644 dracut.conf $(DESTDIR)$(sysconfdir)/dracut.conf
 	mkdir -p $(DESTDIR)$(sysconfdir)/dracut.conf.d
+	[ -d dracut.conf.d ] && for f in dracut.conf.d/*.conf.example; do [ -f $$f ] && install -m 0644 $$f $(DESTDIR)$(docdir) && $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done || true
 	install -m 0755 dracut-functions $(DESTDIR)$(pkglibdir)/dracut-functions
 	cp -arx modules.d $(DESTDIR)$(pkglibdir)
 	install -m 0644 dracut.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut-catimages.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut-gencmdline.8 $(DESTDIR)$(mandir)/man8
 	install -m 0644 dracut.conf.5 $(DESTDIR)$(mandir)/man5
+	for f in README*; do [ -f $$f ] && install -m 0644 $$f $(DESTDIR)$(docdir) && $(COMPRESS) $(DESTDIR)$(docdir)/$$(basename $$f); done
 ifeq (1,${WITH_SWITCH_ROOT})
 	rm $(DESTDIR)$(pkglibdir)/modules.d/99base/switch_root
 endif
-- 
1.7.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

             reply	other threads:[~2010-06-30 19:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 19:39 Amadeusz Żołnowski [this message]
2010-07-01  7:47 ` [PATCH] Makefile: installing configs from dracut.conf.d and README files Harald Hoyer
2010-07-01  9:01 ` Amadeusz Żołnowski

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=20100630213946.1dd59b45@etiriah \
    --to=aidecoe-2qtfh70ttyba5ebddlwbiw@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.