xref: /unit/pkg/deb/Makefile.php (revision 1225:0f35b3937026)
1373Sdefan@nginx.comMODULES+=		php
2373Sdefan@nginx.comMODULE_SUFFIX_php=	php
3373Sdefan@nginx.com
4373Sdefan@nginx.comMODULE_SUMMARY_php=	PHP module for NGINX Unit
5373Sdefan@nginx.com
6373Sdefan@nginx.comMODULE_VERSION_php=	$(VERSION)
7*1225Sdefan@nginx.comMODULE_RELEASE_php=	1
8373Sdefan@nginx.com
9373Sdefan@nginx.comMODULE_CONFARGS_php=	php
10373Sdefan@nginx.comMODULE_MAKEARGS_php=	php
11373Sdefan@nginx.comMODULE_INSTARGS_php=	php-install
12373Sdefan@nginx.com
13373Sdefan@nginx.comMODULE_SOURCES_php=	unit.example-php-app \
14373Sdefan@nginx.com			unit.example-php-config
15373Sdefan@nginx.com
16373Sdefan@nginx.comifneq (,$(findstring $(CODENAME),trusty jessie))
17489Sdefan@nginx.comBUILD_DEPENDS_php=	php5-dev libphp5-embed
18373Sdefan@nginx.comMODULE_BUILD_DEPENDS_php=,php5-dev,libphp5-embed
19373Sdefan@nginx.comMODULE_DEPENDS_php=,libphp5-embed
20373Sdefan@nginx.comelse
21489Sdefan@nginx.comBUILD_DEPENDS_php=	php-dev libphp-embed
22373Sdefan@nginx.comMODULE_BUILD_DEPENDS_php=,php-dev,libphp-embed
23373Sdefan@nginx.comMODULE_DEPENDS_php=,libphp-embed
24373Sdefan@nginx.comendif
25373Sdefan@nginx.com
26489Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_php)
27489Sdefan@nginx.com
28373Sdefan@nginx.comdefine MODULE_PREINSTALL_php
29373Sdefan@nginx.com	mkdir -p debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app
30373Sdefan@nginx.com	install -m 644 -p debian/unit.example-php-app debian/unit-php/usr/share/doc/unit-php/examples/phpinfo-app/index.php
31373Sdefan@nginx.com	install -m 644 -p debian/unit.example-php-config debian/unit-php/usr/share/doc/unit-php/examples/unit.config
32373Sdefan@nginx.comendef
33373Sdefan@nginx.comexport MODULE_PREINSTALL_php
34373Sdefan@nginx.com
35373Sdefan@nginx.comdefine MODULE_POST_php
36373Sdefan@nginx.comcat <<BANNER
37373Sdefan@nginx.com----------------------------------------------------------------------
38373Sdefan@nginx.com
39373Sdefan@nginx.comThe $(MODULE_SUMMARY_php) has been installed.
40373Sdefan@nginx.com
41373Sdefan@nginx.comTo check out the sample app, run these commands:
42373Sdefan@nginx.com
43373Sdefan@nginx.com sudo service unit restart
44787Sdefan@nginx.com cd /usr/share/doc/unit-$(MODULE_SUFFIX_php)/examples
45901Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/control.unit.sock http://localhost/config
46373Sdefan@nginx.com curl http://localhost:8300/
47373Sdefan@nginx.com
48373Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
49373Sdefan@nginx.com
50373Sdefan@nginx.com----------------------------------------------------------------------
51373Sdefan@nginx.comBANNER
52373Sdefan@nginx.comendef
53373Sdefan@nginx.comexport MODULE_POST_php
54