blob: fbca127012344ae9a9071d8f4418f22c24b33a8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
eselectdir = $(datadir)/eselect/modules
nodist_eselect_DATA = $(srcdir)/src/php.eselect
# Without EXTRA_DIST, these files don't wind up in the tarball.
EXTRA_DIST = $(srcdir)/openrc \
$(srcdir)/src/70_mod_php.conf.in \
$(srcdir)/src/php-fpm-launcher.in
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
if FPM
# Same as the APACHE2 conditional.
initdir = $(sysconfdir)/init.d
nodist_init_SCRIPTS = $(srcdir)/openrc/init.d/php-fpm
confdir = $(sysconfdir)/conf.d
nodist_conf_DATA = $(srcdir)/openrc/conf.d/php-fpm
nodist_libexec_SCRIPTS = $(srcdir)/src/php-fpm-launcher
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|@LIBEXECDIR[@]|$(libexecdir)|g' \
-e 's|@LOCALSTATEDIR[@]|$(localstatedir)|g' \
-e 's|@SYSCONFDIR[@]|$(sysconfdir)|g'
$(nodist_eselect_DATA) $(nodist_apacheconf_DATA) $(nodist_init_SCRIPTS) $(nodist_libexec_SCRIPTS): 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/php-fpm-launcher: $(srcdir)/src/php-fpm-launcher.in
$(srcdir)/src/70_mod_php.conf: $(srcdir)/src/70_mod_php.conf.in
$(srcdir)/openrc/init.d/php-fpm: $(srcdir)/openrc/init.d/php-fpm.in
|