summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-01-09 14:56:44 -0500
committerSimo Sorce <simo@redhat.com>2015-03-24 11:48:59 -0400
commit72052a86bf1d9360276745afe00155444bdf1292 (patch)
tree9eaa9848737b9aef100215db291848f9cae78100
parent22a4b37f352f6d1cae0c33e495a43439f8da5ab3 (diff)
downloadgss-proxy-72052a86bf1d9360276745afe00155444bdf1292.tar.gz
gss-proxy-72052a86bf1d9360276745afe00155444bdf1292.tar.xz
gss-proxy-72052a86bf1d9360276745afe00155444bdf1292.zip
Fix variable replacement in non config files
Fixes: #132 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Lukas Slebodnik <lslebodn@redhat.com>
-rw-r--r--proxy/Makefile.am38
-rw-r--r--proxy/configure.ac4
2 files changed, 35 insertions, 7 deletions
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
index 4ba129d..9675aeb 100644
--- a/proxy/Makefile.am
+++ b/proxy/Makefile.am
@@ -23,6 +23,7 @@ localedir = @localedir@
ccpath = @ccpath@
initdir = @initdir@
systemdunitdir = @systemdunitdir@
+examplesdir= @datarootdir@/examples
logpath = @logpath@
pubconfpath = @pubconfpath@
pkgconfigdir = $(libdir)/pkgconfig
@@ -221,11 +222,33 @@ endif
#######################
dist_init_SCRIPTS =
-dist_systemdunit_DATA =
-if HAVE_SYSTEMD_UNIT
- dist_systemdunit_DATA += \
- systemd/gssproxy.service
-endif
+
+edit_cmd = $(SED) \
+ -e 's|@sbindir[@]|$(sbindir)|g' \
+ -e 's|@localstatedir[@]|$(localstatedir)|g' \
+ -e 's|@libdir[@]|$(libdir)|g' \
+ -e 's|@gpstatedir[@]|$(prefix)|g'
+
+replace_script = \
+ @rm -f $@ $@.tmp; \
+ srcdir=''; \
+ test -f ./$@.in || srcdir=$(srcdir)/; \
+ $(edit_cmd) $${srcdir}$@.in >$@.tmp; \
+ mv $@.tmp $@
+
+EXTRA_DIST = \
+ systemd/gssproxy.service.in \
+ examples/gssproxy.conf.in \
+ examples/mech.in
+
+systemd/gssproxy.service: systemd/gssproxy.service.in Makefile
+ $(replace_script)
+
+examples/gssproxy.conf: examples/gssproxy.conf.in Makefile
+ $(replace_script)
+
+examples/mech: examples/mech.in Makefile
+ $(replace_script)
installgsspdirs::
mkdir -p \
@@ -257,6 +280,11 @@ else
mkdir -p $(DESTDIR)$(initdir)
endif
+install-data-hook: systemd/gssproxy.service examples/mech examples/gssproxy.conf
+if HAVE_SYSTEMD_UNIT
+ cp systemd/gssproxy.service $(DESTDIR)$(systemdunitdir)
+endif
+
clean-local:
rm -Rf doc
diff --git a/proxy/configure.ac b/proxy/configure.ac
index 5e43c3b..5197976 100644
--- a/proxy/configure.ac
+++ b/proxy/configure.ac
@@ -180,7 +180,7 @@ abs_build_dir=`pwd`
AC_DEFINE_UNQUOTED([ABS_BUILD_DIR], ["$abs_build_dir"], [Absolute path to the build directory])
AC_SUBST([abs_builddir], $abs_build_dir)
-AC_CONFIG_FILES([Makefile tests/Makefile systemd/gssproxy.service man/Makefile
- contrib/gssproxy.spec examples/mech examples/gssproxy.conf
+AC_CONFIG_FILES([Makefile tests/Makefile man/Makefile
+ contrib/gssproxy.spec
man/gssproxy-mech.8.xml])
AC_OUTPUT