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