xref: /unit/pkg/deb/Makefile.php (revision 821:b2fbe135c737)
1MODULES+=		php
2MODULE_SUFFIX_php=	php
3
4MODULE_SUMMARY_php=	PHP module for NGINX Unit
5
6MODULE_VERSION_php=	$(VERSION)
7MODULE_RELEASE_php=	1
8
9MODULE_CONFARGS_php=	php
10MODULE_MAKEARGS_php=	php
11MODULE_INSTARGS_php=	php-install
12
13MODULE_SOURCES_php=	unit.example-php-app \
14			unit.example-php-config
15
16ifneq (,$(findstring $(CODENAME),trusty jessie))
17BUILD_DEPENDS_php=	php5-dev libphp5-embed
18MODULE_BUILD_DEPENDS_php=,php5-dev,libphp5-embed
19MODULE_DEPENDS_php=,libphp5-embed
20else
21BUILD_DEPENDS_php=	php-dev libphp-embed
22MODULE_BUILD_DEPENDS_php=,php-dev,libphp-embed
23MODULE_DEPENDS_php=,libphp-embed
24endif
25
26BUILD_DEPENDS+=		$(BUILD_DEPENDS_php)
27
28define MODULE_PREINSTALL_php
29	mkdir -p debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app
30	install -m 644 -p debian/unit.example-php-app debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app/index.php
31	install -m 644 -p debian/unit.example-php-config debian/unit-php/usr/share/doc/unit-php/examples/unit.config
32endef
33export MODULE_PREINSTALL_php
34
35define MODULE_POST_php
36cat <<BANNER
37----------------------------------------------------------------------
38
39The $(MODULE_SUMMARY_php) has been installed.
40
41To check out the sample app, run these commands:
42
43 sudo service unit restart
44 cd /usr/share/doc/unit-$(MODULE_SUFFIX_php)/examples
45 sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock :/config
46 curl http://localhost:8300/
47
48Online documentation is available at https://unit.nginx.org
49
50----------------------------------------------------------------------
51BANNER
52endef
53export MODULE_POST_php
54