xref: /unit/pkg/rpm/Makefile.php (revision 1225:0f35b3937026)
1372Sdefan@nginx.comMODULES+=		php
2561Sdefan@nginx.comMODULE_SUFFIX_php=	php
3372Sdefan@nginx.com
4372Sdefan@nginx.comMODULE_SUMMARY_php=	PHP module for NGINX Unit
5372Sdefan@nginx.com
6372Sdefan@nginx.comMODULE_VERSION_php=	$(VERSION)
7*1225Sdefan@nginx.comMODULE_RELEASE_php=	1
8372Sdefan@nginx.com
9372Sdefan@nginx.comMODULE_CONFARGS_php=	php
10372Sdefan@nginx.comMODULE_MAKEARGS_php=	php
11372Sdefan@nginx.comMODULE_INSTARGS_php=	php-install
12372Sdefan@nginx.com
13372Sdefan@nginx.comMODULE_SOURCES_php=	unit.example-php-app \
14372Sdefan@nginx.com			unit.example-php-config
15372Sdefan@nginx.com
16562Sdefan@nginx.comifeq ($(OSVER), opensuse-tumbleweed)
17562Sdefan@nginx.comBUILD_DEPENDS_php=	php7-devel php7-embed
18562Sdefan@nginx.comelse
19489Sdefan@nginx.comBUILD_DEPENDS_php=	php-devel php-embedded
20562Sdefan@nginx.comendif
21562Sdefan@nginx.com
22489Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_php)
23372Sdefan@nginx.com
24372Sdefan@nginx.comdefine MODULE_PREINSTALL_php
25372Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-php/examples/phpinfo-app
26372Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
27372Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-php/examples/phpinfo-app/index.php
28372Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
29372Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-php/examples/unit.config
30372Sdefan@nginx.comendef
31372Sdefan@nginx.comexport MODULE_PREINSTALL_php
32372Sdefan@nginx.com
33372Sdefan@nginx.comdefine MODULE_FILES_php
34372Sdefan@nginx.com%{_libdir}/unit/modules/*
35372Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
36372Sdefan@nginx.comendef
37372Sdefan@nginx.comexport MODULE_FILES_php
38372Sdefan@nginx.com
39372Sdefan@nginx.comdefine MODULE_POST_php
40372Sdefan@nginx.comcat <<BANNER
41372Sdefan@nginx.com----------------------------------------------------------------------
42372Sdefan@nginx.com
43372Sdefan@nginx.comThe $(MODULE_SUMMARY_php) has been installed.
44372Sdefan@nginx.com
45372Sdefan@nginx.comTo check out the sample app, run these commands:
46372Sdefan@nginx.com
47372Sdefan@nginx.com sudo service unit start
48787Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
49912Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
50372Sdefan@nginx.com curl http://localhost:8300/
51372Sdefan@nginx.com
52372Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
53372Sdefan@nginx.com
54372Sdefan@nginx.com----------------------------------------------------------------------
55372Sdefan@nginx.comBANNER
56372Sdefan@nginx.comendef
57372Sdefan@nginx.comexport MODULE_POST_php
58