Browse Source

If not B10_FROM_SOURCE then pre-pend the libexec directory
for starting programs from bind10.

Have auth installed to pkglibexecdir. (While here add a comment about
pkgdatadir problem.)


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@712 e5f2f494-b856-4b98-b285-d166d9295462

Jeremy C. Reed 15 years ago
parent
commit
914d7ca080
3 changed files with 11 additions and 2 deletions
  1. 5 1
      src/bin/auth/Makefile.am
  2. 4 1
      src/bin/bind10/Makefile.am
  3. 2 0
      src/bin/bind10/bind10.py.in

+ 5 - 1
src/bin/auth/Makefile.am

@@ -1,6 +1,8 @@
 AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_builddir)/src/lib/dns/cpp -I$(top_builddir)/include/dns/cpp -I$(top_builddir)/include -I$(top_srcdir)/ext
 
-bin_PROGRAMS = b10-auth
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+
+pkglibexec_PROGRAMS = b10-auth
 b10_auth_SOURCES = auth_srv.cc auth_srv.h
 b10_auth_SOURCES += common.cc common.h
 b10_auth_SOURCES += main.cc
@@ -9,6 +11,8 @@ b10_auth_LDADD +=  $(top_builddir)/src/lib/auth/cpp/.libs/libauth.a
 b10_auth_LDADD += $(top_builddir)/src/lib/config/cpp/libcfgclient.a
 b10_auth_LDADD += $(top_builddir)/src/lib/cc/cpp/libcc.a
 
+# TODO: config.h.in is wrong because doesn't honor pkgdatadir
+# and can't use @datadir@ because doesn't expand default ${prefix}
 b10_authdir = $(DESTDIR)$(pkgdatadir)
 b10_auth_DATA = auth.spec
 

+ 4 - 1
src/bin/bind10/Makefile.am

@@ -1,11 +1,14 @@
 bin_SCRIPTS = bind10
 CLEANFILES = bind10.py
 
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+
 bind10dir = $(DESTDIR)$(pkgdatadir)
 bind10_DATA = bob.spec
 
 # TODO: does this need $$(DESTDIR) also?
 # this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
 bind10: bind10.py
-	$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" bind10.py >$@
+	$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" \
+	       -e "s|@@LIBEXECDIR@@|$(pkglibexecdir)|" bind10.py >$@
 	chmod a+x $@

+ 2 - 0
src/bin/bind10/bind10.py.in

@@ -69,6 +69,8 @@ class ProcessInfo:
         spawn_env['PATH'] = os.environ['PATH']
         if 'B10_FROM_SOURCE' in os.environ:
             spawn_env['B10_FROM_SOURCE'] = os.environ['B10_FROM_SOURCE']
+        else: 
+            spawn_env['PATH'] = "@@LIBEXECDIR@@:" + spawn_env['PATH']
         if 'PYTHON_EXEC' in os.environ:
             spawn_env['PYTHON_EXEC'] = os.environ['PYTHON_EXEC']
         if 'PYTHONPATH' in os.environ: