xref: /unit/pkg/rpm/Makefile.perl (revision 558:ca3604d9073b)
1MODULES+=		perl
2
3MODULE_SUMMARY_perl=	Perl module for NGINX Unit
4
5MODULE_VERSION_perl=	$(VERSION)
6MODULE_RELEASE_perl=	1
7
8MODULE_CONFARGS_perl=	perl
9MODULE_MAKEARGS_perl=	perl
10MODULE_INSTARGS_perl=	perl-install
11
12MODULE_SOURCES_perl=	unit.example-perl-app \
13			unit.example-perl-config
14
15BUILD_DEPENDS_perl=	perl-devel perl-libs perl-ExtUtils-Embed
16BUILD_DEPENDS+=		$(BUILD_DEPENDS_perl)
17
18define MODULE_DEFINITIONS_perl
19BuildRequires: $(BUILD_DEPENDS_perl)
20endef
21export MODULE_DEFINITIONS_perl
22
23define MODULE_PREINSTALL_perl
24%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app
25%{__install} -m 644 -p %{SOURCE100} \
26    %{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app/index.pl
27%{__install} -m 644 -p %{SOURCE101} \
28    %{buildroot}%{_datadir}/doc/unit-perl/examples/unit.config
29endef
30export MODULE_PREINSTALL_perl
31
32define MODULE_FILES_perl
33%{_libdir}/unit/modules/*
34%{_libdir}/unit/debug-modules/*
35endef
36export MODULE_FILES_perl
37
38define MODULE_POST_perl
39cat <<BANNER
40----------------------------------------------------------------------
41
42The $(MODULE_SUMMARY_perl) has been installed.
43
44To check out the sample app, run these commands:
45
46 sudo service unit start
47 sudo service unit loadconfig /usr/share/doc/unit-perl/examples/unit.config
48 curl http://localhost:8600/
49
50Online documentation is available at https://unit.nginx.org
51
52----------------------------------------------------------------------
53BANNER
54endef
55export MODULE_POST_perl
56