eselectdir = $(datadir)/eselect/modules nodist_eselect_DATA = $(srcdir)/src/php.eselect initdir = $(sysconfdir)/init.d confdir = $(sysconfdir)/conf.d nodist_init_DATA = $(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/*.* if APACHE2 # Without these set, we won't try to install the conf file. apacheconfdir = $(sysconfdir)/apache2/modules.d nodist_apacheconf_DATA = $(srcdir)/src/70_mod_php.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 # "Installation Directory Variables" section. edit = sed -e 's|@BINDIR[@]|$(bindir)|g' \ -e 's|@LIBDIR[@]|$(libdir)|g' \ -e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g' \ -e 's|@SYSCONFDIR[@]|$(sysconfdir)|g' $(nodist_eselect_DATA) $(nodist_apacheconf_DATA) $(nodist_init_DATA): Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in > $@.tmp mv $@.tmp $@ $(srcdir)/src/php.eselect: $(srcdir)/src/php.eselect.in $(srcdir)/src/70_mod_php.conf: $(srcdir)/src/70_mod_php.conf.in $(srcdir)/openrc/php-fpm: $(srcdir)/openrc/php-fpm.in