Packages: added Perl package.

This commit is contained in:
Andrei Belov
2018-02-07 17:26:37 +03:00
parent 7830026368
commit 539caf0946
12 changed files with 200 additions and 1 deletions

50
pkg/rpm/Makefile.perl Normal file
View File

@@ -0,0 +1,50 @@
MODULES+= perl
MODULE_SUMMARY_perl= Perl module for NGINX Unit
MODULE_VERSION_perl= $(VERSION)
MODULE_RELEASE_perl= 1
MODULE_CONFARGS_perl= perl
MODULE_MAKEARGS_perl= perl
MODULE_INSTARGS_perl= perl-install
MODULE_SOURCES_perl= unit.example-perl-app \
unit.example-perl-config
BUILD_DEPENDS_perl= perl-devel perl-libs
BUILD_DEPENDS+= $(BUILD_DEPENDS_perl)
define MODULE_PREINSTALL_perl
%{__mkdir} -p %{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app
%{__install} -m 644 -p %{SOURCE100} \
%{buildroot}%{_datadir}/doc/unit-perl/examples/perl-app/index.pl
%{__install} -m 644 -p %{SOURCE101} \
%{buildroot}%{_datadir}/doc/unit-perl/examples/unit.config
endef
export MODULE_PREINSTALL_perl
define MODULE_FILES_perl
%{_libdir}/unit/modules/*
%{_libdir}/unit/debug-modules/*
endef
export MODULE_FILES_perl
define MODULE_POST_perl
cat <<BANNER
----------------------------------------------------------------------
The $(MODULE_SUMMARY_perl) has been installed.
To check out the sample app, run these commands:
sudo service unit start
sudo service unit loadconfig /usr/share/doc/unit-perl/examples/unit.config
curl http://localhost:8600/
Online documentation is available at https://unit.nginx.org
----------------------------------------------------------------------
BANNER
endef
export MODULE_POST_perl