- initial
[packages/perl-RT-Extension-REST2.git] / perl-RT-Extension-REST2.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    RT
6 %define         pnam    Extension-REST2
7 Summary:        RT::Extension::REST2 - Adds a modern REST API to RT under /REST/2.0/
8 Name:           perl-RT-Extension-REST2
9 Version:        1.09
10 Release:        1
11 License:        GPL v2
12 Group:          Development/Languages/Perl
13 Source0:        http://www.cpan.org/modules/by-module/RT/%{pdir}-%{pnam}-%{version}.tar.gz
14 # Source0-md5:  2189381ff50a6aac311ac408fa1b4be7
15 URL:            https://metacpan.org/release/RT-Extension-REST2
16 BuildRequires:  perl-devel >= 1:5.8.0
17 BuildRequires:  rpm-perlprov >= 4.1-13
18 BuildRequires:  rpmbuild(macros) >= 1.745
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Adds a modern REST API to RT under /REST/2.0/.
24
25 %prep
26 %setup -q -n %{pdir}-%{pnam}-%{version}
27
28 sed -i -e 's#^my $lib_path =.*#my $lib_path = "%{perl_vendorlib}/RT";#g' Makefile.PL
29 sed -i -e 's#^my $sbin_path =.*#my $sbin_path = "%{_sbindir}";#g' Makefile.PL
30 sed -i -e 's#^my $bin_path =.*#my $bin_path = "%{_bindir}";#g' Makefile.PL
31
32 %build
33
34 %{__perl} Makefile.PL \
35         INSTALLDIRS=vendor
36 %{__make}
37
38 %{?with_tests:%{__make} test}
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42
43 install -d $RPM_BUILD_ROOT%{perl_vendorlib}/RT/Extension/
44 %{__make} pure_install \
45         DESTDIR=$RPM_BUILD_ROOT
46
47 mv $RPM_BUILD_ROOT/RT-Extension-REST2/lib/RT/Extension/* $RPM_BUILD_ROOT%{perl_vendorlib}/RT/Extension/
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 %defattr(644,root,root,755)
54 %doc Changes README TODO
55 %{perl_vendorlib}/RT/Extension/REST2
56 %{perl_vendorlib}/RT/Extension/REST2.pm
57 %{_mandir}/man3/RT::Extension::REST2.3*
This page took 0.092683 seconds and 3 git commands to generate.