]> git.e2factory.org Git - e2factory.git/commitdiff
add SYSCONFDIR to buildconfig and replace hardcoded path
authorGordon Hecker <gh@emlix.com>
Wed, 27 May 2009 11:30:44 +0000 (13:30 +0200)
committerGordon Hecker <gh@emlix.com>
Wed, 27 May 2009 11:34:17 +0000 (13:34 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
Makefile
generic/e2lib.lua
templates/Makefile

index a6e582e6b601b7cbe5847d1e4593c6596fa3ded6..ca7922e48c9a0bc0e7269b6384adcddafc524cf2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ buildconfig.lua: Makefile make.vars
        @echo 'BINDIR="$(BINDIR)"' >>$@
        @echo 'LIBDIR="$(LIBDIR)"' >>$@
        @echo 'TOOLDIR="$(TOOLDIR)"' >>$@
+       @echo 'SYSCONFDIR="$(SYSCONFDIR)"' >>$@
        @echo 'E2="$(E2)"' >>$@
        @echo 'LUA="$(LUA)"' >>$@
        @echo 'E2_SYNTAX="$(E2_SYNTAX)"' >>$@
index 1a47457f6cdc463897023f4165683d70e17cade5..5066034abd678ff0ae498843b420298685ec497e 100644 (file)
@@ -90,7 +90,7 @@ e2lib = {
   cmdline = {},
   git_skip_checkout = true,
   buildnumber_server_url = nil,
-  template_path = "/etc/e2/templates",
+  template_path = string.format("%s/templates", buildconfig.SYSCONFDIR),
   extension_config = ".e2/extensions",
 }
 
@@ -771,11 +771,11 @@ function e2lib.read_global_config(e2_config_file)
        string.format("%s/.e2/e2.conf-%s.%s", e2lib.homedir, buildconfig.MAJOR,
                                                        buildconfig.MINOR),
        string.format("%s/.e2/e2.conf", e2lib.homedir),
-       string.format("/etc/e2/e2.conf-%s.%s.%s", 
+       string.format("%s/e2.conf-%s.%s.%s", buildconfig.SYSCONFDIR,
                buildconfig.MAJOR, buildconfig.MINOR, buildconfig.PATCHLEVEL),
-       string.format("/etc/e2/e2.conf-%s.%s", buildconfig.MAJOR,
-                                                        buildconfig.MINOR),
-       string.format("/etc/e2/e2.conf"),
+       string.format("%s/e2.conf-%s.%s", buildconfig.SYSCONFDIR,
+                               buildconfig.MAJOR, buildconfig.MINOR),
+       string.format("%s/e2.conf", buildconfig.SYSCONFDIR),
     }
   end
   -- use ipairs to keep the list entries ordered
index 8665be33b75db7265dcefd17a9467dde0221536b..5866b19915b02a739e465eb93eb0e5b42c5c3b42 100644 (file)
@@ -38,12 +38,12 @@ all:
 clean:
 
 install: all
-       install -m 755 -d $(DESTDIR)/etc/e2/templates/proj
-       install -m 644 proj/config $(DESTDIR)/etc/e2/templates/proj/config
-       install -m 644 proj/chroot $(DESTDIR)/etc/e2/templates/proj/chroot
-       install -m 644 proj/licences $(DESTDIR)/etc/e2/templates/proj/licences
-       install -m 644 proj/env    $(DESTDIR)/etc/e2/templates/proj/env
-       install -m 644 gitignore   $(DESTDIR)/etc/e2/templates/gitignore
+       install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/templates/proj
+       install -m 644 proj/config $(DESTDIR)$(SYSCONFDIR)/templates/proj/config
+       install -m 644 proj/chroot $(DESTDIR)$(SYSCONFDIR)/templates/proj/chroot
+       install -m 644 proj/licences $(DESTDIR)$(SYSCONFDIR)/templates/proj/licences
+       install -m 644 proj/env    $(DESTDIR)$(SYSCONFDIR)/templates/proj/env
+       install -m 644 gitignore   $(DESTDIR)$(SYSCONFDIR)/templates/gitignore
 
 install-local: all
        install -m 755 -d $(LOCALLIBDIR)/templates