xref: /unit/pkg/rpm/Makefile.perl (revision 1225:0f35b3937026)
1524Sdefan@nginx.comMODULES+=		perl
2561Sdefan@nginx.comMODULE_SUFFIX_perl=	perl
3524Sdefan@nginx.com
4524Sdefan@nginx.comMODULE_SUMMARY_perl=	Perl module for NGINX Unit
5524Sdefan@nginx.com
6524Sdefan@nginx.comMODULE_VERSION_perl=	$(VERSION)
7*1225Sdefan@nginx.comMODULE_RELEASE_perl=	1
8524Sdefan@nginx.com
9524Sdefan@nginx.comMODULE_CONFARGS_perl=	perl
10524Sdefan@nginx.comMODULE_MAKEARGS_perl=	perl
11524Sdefan@nginx.comMODULE_INSTARGS_perl=	perl-install
12524Sdefan@nginx.com
13524Sdefan@nginx.comMODULE_SOURCES_perl=	unit.example-perl-app \
14524Sdefan@nginx.com			unit.example-perl-config
15524Sdefan@nginx.com
16562Sdefan@nginx.comifneq (,$(findstring $(OSVER),opensuse-leap opensuse-tumbleweed sles))
17562Sdefan@nginx.comBUILD_DEPENDS_perl=	perl
18562Sdefan@nginx.comelse
19558Sdefan@nginx.comBUILD_DEPENDS_perl=	perl-devel perl-libs perl-ExtUtils-Embed
20562Sdefan@nginx.comendif
21562Sdefan@nginx.com
22524Sdefan@nginx.comBUILD_DEPENDS+=		$(BUILD_DEPENDS_perl)
23524Sdefan@nginx.com
24558Sdefan@nginx.comdefine MODULE_DEFINITIONS_perl
25558Sdefan@nginx.comBuildRequires: $(BUILD_DEPENDS_perl)
26558Sdefan@nginx.comendef
27558Sdefan@nginx.comexport MODULE_DEFINITIONS_perl
28558Sdefan@nginx.com
29524Sdefan@nginx.comdefine MODULE_PREINSTALL_perl
30524Sdefan@nginx.com%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app
31524Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE100} \
32524Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app/index.pl
33524Sdefan@nginx.com%{__install} -m 644 -p %{SOURCE101} \
34524Sdefan@nginx.com    %{buildroot}%{_datadir}/doc/unit-perl/examples/unit.config
35524Sdefan@nginx.comendef
36524Sdefan@nginx.comexport MODULE_PREINSTALL_perl
37524Sdefan@nginx.com
38524Sdefan@nginx.comdefine MODULE_FILES_perl
39524Sdefan@nginx.com%{_libdir}/unit/modules/*
40524Sdefan@nginx.com%{_libdir}/unit/debug-modules/*
41524Sdefan@nginx.comendef
42524Sdefan@nginx.comexport MODULE_FILES_perl
43524Sdefan@nginx.com
44524Sdefan@nginx.comdefine MODULE_POST_perl
45524Sdefan@nginx.comcat <<BANNER
46524Sdefan@nginx.com----------------------------------------------------------------------
47524Sdefan@nginx.com
48524Sdefan@nginx.comThe $(MODULE_SUMMARY_perl) has been installed.
49524Sdefan@nginx.com
50524Sdefan@nginx.comTo check out the sample app, run these commands:
51524Sdefan@nginx.com
52524Sdefan@nginx.com sudo service unit start
53787Sdefan@nginx.com cd /usr/share/doc/%{name}/examples
54912Sdefan@nginx.com sudo curl -X PUT --data-binary @unit.config --unix-socket /var/run/unit/control.sock http://localhost/config
55524Sdefan@nginx.com curl http://localhost:8600/
56524Sdefan@nginx.com
57524Sdefan@nginx.comOnline documentation is available at https://unit.nginx.org
58524Sdefan@nginx.com
59524Sdefan@nginx.com----------------------------------------------------------------------
60524Sdefan@nginx.comBANNER
61524Sdefan@nginx.comendef
62524Sdefan@nginx.comexport MODULE_POST_perl
63