Name:           perl-SMS-Send-Adapter-Node-Red
Version:        0.07
Release:        1%{?dist}
Summary:        SMS::Send Adapter to Node-RED JSON HTTP request
License:        mit
Group:          Development/Libraries
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  perl(CGI)
BuildRequires:  perl(JSON)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Package::New)
BuildRequires:  perl(SMS::Send)
BuildRequires:  perl(SMS::Send::VoIP::MS)
Requires:       perl(CGI)
Requires:       perl(JSON)
Requires:       perl(Package::New)
Requires:       perl(SMS::Send)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

This Perl package provides an adapter from Node-RED HTTP request object with a JSON payload to the SMS::Send infrastructure using a CGI Apache script.  The architecture works easiest with SMS::Send drivers based off on the SMS::Send::Driver::WebService base object since common settings can be stored in the configuration file.

%package cgi
Summary:        SMS::Send Adapter to Node-RED JSON HTTP request CGI Script
Requires:       %{name} = %{version}-%{release}
Requires:       httpd

%description cgi
A CGI application to control SMS::Send with a web service.

%setup -q -n SMS-Send-Adapter-Node-Red-%{version}

%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}



find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

mkdir -p               $RPM_BUILD_ROOT%{_localstatedir}/www/cgi-bin/cgi-bin
cp scripts/%{name}.cgi $RPM_BUILD_ROOT%{_localstatedir}/www/cgi-bin/cgi-bin/
mkdir -p               $RPM_BUILD_ROOT/%{_datadir}/%{name}/
cp scripts/*.psgi      $RPM_BUILD_ROOT/%{_datadir}/%{name}/

make test


%doc Changes META.json README

%files cgi

* Sun Dec 27 2020 Michael R. Davis <> 0.03-1
- Specfile autogenerated by cpanspec 1.78.