- initial master auto/th/perl-RT-Extension-REST2-1.09-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 31 Jul 2020 07:50:53 +0000 (09:50 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 31 Jul 2020 07:50:53 +0000 (09:50 +0200)
perl-RT-Extension-REST2.spec [new file with mode: 0644]

diff --git a/perl-RT-Extension-REST2.spec b/perl-RT-Extension-REST2.spec
new file mode 100644 (file)
index 0000000..f14301b
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Conditional build:
+%bcond_without tests           # do not perform "make test"
+#
+%define                pdir    RT
+%define                pnam    Extension-REST2
+Summary:       RT::Extension::REST2 - Adds a modern REST API to RT under /REST/2.0/
+Name:          perl-RT-Extension-REST2
+Version:       1.09
+Release:       1
+License:       GPL v2
+Group:         Development/Languages/Perl
+Source0:       http://www.cpan.org/modules/by-module/RT/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 2189381ff50a6aac311ac408fa1b4be7
+URL:           https://metacpan.org/release/RT-Extension-REST2
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Adds a modern REST API to RT under /REST/2.0/.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+sed -i -e 's#^my $lib_path =.*#my $lib_path = "%{perl_vendorlib}/RT";#g' Makefile.PL
+sed -i -e 's#^my $sbin_path =.*#my $sbin_path = "%{_sbindir}";#g' Makefile.PL
+sed -i -e 's#^my $bin_path =.*#my $bin_path = "%{_bindir}";#g' Makefile.PL
+
+%build
+
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{perl_vendorlib}/RT/Extension/
+%{__make} pure_install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+mv $RPM_BUILD_ROOT/RT-Extension-REST2/lib/RT/Extension/* $RPM_BUILD_ROOT%{perl_vendorlib}/RT/Extension/
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README TODO
+%{perl_vendorlib}/RT/Extension/REST2
+%{perl_vendorlib}/RT/Extension/REST2.pm
+%{_mandir}/man3/RT::Extension::REST2.3*
This page took 0.075507 seconds and 4 git commands to generate.