diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-07-25 20:17:53 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-07-25 20:17:53 -0400 |
commit | 0b67931ad054c8d109ea89faa8844b1f5a02e8ec (patch) | |
tree | ad30dd46e8792afa1e28d19abaf9cdd0470a86ff | |
parent | Makefile.am: mark openrc/php-fpm as a script and not as data. (diff) | |
download | eselect-php-0.9.3.tar.gz eselect-php-0.9.3.tar.bz2 eselect-php-0.9.3.zip |
Install the php-fpm init scripts conditional on --enable-fpm.0.9.3
-rw-r--r-- | Makefile.am | 13 | ||||
-rw-r--r-- | configure.ac | 12 |
2 files changed, 21 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 15b0ca8..08359dc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,5 @@ eselectdir = $(datadir)/eselect/modules nodist_eselect_DATA = $(srcdir)/src/php.eselect -initdir = $(sysconfdir)/init.d -confdir = $(sysconfdir)/conf.d -nodist_init_SCRIPTS = $(srcdir)/openrc/php-fpm -nodist_conf_DATA = $(srcdir)/openrc/php-fpm.conf # Without EXTRA_DIST, these files don't wind up in the tarball. EXTRA_DIST = $(srcdir)/src/70_mod_php.conf.in openrc/*.* @@ -14,6 +10,15 @@ if APACHE2 nodist_apacheconf_DATA = $(srcdir)/src/70_mod_php.conf endif +if FPM + # Same as the APACHE2 conditional. + initdir = $(sysconfdir)/init.d + nodist_init_SCRIPTS = $(srcdir)/openrc/php-fpm + + confdir = $(sysconfdir)/conf.d + nodist_conf_DATA = $(srcdir)/openrc/php-fpm.conf +endif + # The next few rules allow us to replace bindir, libdir, etc. # within our script and conf file. The example is taken # from the autoconf documentation and can be found in the diff --git a/configure.ac b/configure.ac index 5e6ccfc..02aeaf2 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,18 @@ AC_ARG_ENABLE( esac],[apache2=false]) AM_CONDITIONAL([APACHE2], [test x$apache2 = xtrue]) +# --enable-fpm flag, disabled by default, that decides whether or +# not we install the php-fpm init script and config file. +AC_ARG_ENABLE( + [fpm], + [ --enable-fpm install the php-fpm init script [[default=no]]], + [case "${enableval}" in + yes) fpm=true ;; + no) fpm=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-fpm]) ;; + esac],[fpm=false]) + AM_CONDITIONAL([FPM], [test x$fpm = xtrue]) + piddir=${piddir="@LOCALSTATEDIR@"} AC_ARG_WITH(piddir, AC_HELP_STRING([--with-piddir=DIR], [where php-fpm PID files are placed [LOCALSTATEDIR]]), |