commit:     77dbce75a224125eb6a6540e93367294b4b5331d
Author:     Brian Evans <grknight <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 11 13:50:53 2017 +0000
Commit:     Brian Evans <grknight <AT> gentoo <DOT> org>
CommitDate: Tue Jul 11 13:50:53 2017 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=77dbce75

Make the init script directory depend on LIBDIR

We cannot rely on the assumption that /usr/lib will always point
to the right location, Bug 624528 demonstrates this.

There is talk in Bug 506276 of making /usr/lib a generic target
for all arches and stop supporting the symlink.

 Makefile.am                                           | 5 ++++-
 doc/{php-fpm.example.init => php-fpm.example.init.in} | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 719ced1..578062e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
 eselectdir = $(datadir)/eselect/modules
 nodist_eselect_DATA = $(srcdir)/src/php.eselect
+initdir = $(sysconfdir)/init.d
+nodist_init_DATA = $(srcdir)/doc/php-fpm.example.init
 
 # Without EXTRA_DIST, these files don't wind up in the tarball.
 EXTRA_DIST = $(srcdir)/src/70_mod_php.conf.in doc/*.*
@@ -18,7 +20,7 @@ edit = sed -e 's|@BINDIR[@]|$(bindir)|g' \
            -e 's|@LIBDIR[@]|$(libdir)|g' \
            -e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g'
 
-$(nodist_eselect_DATA) $(nodist_apacheconf_DATA): Makefile
+$(nodist_eselect_DATA) $(nodist_apacheconf_DATA) $(nodist_init_DATA): Makefile
        rm -f $@ [email protected]
        srcdir=''; \
          test -f ./[email protected] || srcdir=$(srcdir)/; \
@@ -27,3 +29,4 @@ $(nodist_eselect_DATA) $(nodist_apacheconf_DATA): Makefile
 
 $(srcdir)/src/php.eselect: $(srcdir)/src/php.eselect.in
 $(srcdir)/src/70_mod_php.conf: $(srcdir)/src/70_mod_php.conf.in
+$(srcdir)/doc/php-fpm.example.init: $(srcdir)/doc/php-fpm.example.init.in

diff --git a/doc/php-fpm.example.init b/doc/php-fpm.example.init.in
similarity index 97%
rename from doc/php-fpm.example.init
rename to doc/php-fpm.example.init.in
index 6369e9f..7969b71 100644
--- a/doc/php-fpm.example.init
+++ b/doc/php-fpm.example.init.in
@@ -12,7 +12,7 @@ set_phpvars() {
        fi
 
        PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
-       PHP_FPM_BIN="/usr/lib/${PHPSLOT}/bin/php-fpm"
+       PHP_FPM_BIN="@LIBDIR@/${PHPSLOT}/bin/php-fpm"
 }
 
 start() {

Reply via email to