3 %bcond_with tests # perform "make test" (requires DISPLAY)
6 Summary: Preview the effects of perltidy's plethora of options
10 License: GPL-1.0+ or Artistic-1.0
11 Group: Development/Languages/Perl
12 Source0: http://www.cpan.org/modules/by-authors/id/L/LE/LEIF/tidyview-%{version}.tar.gz
13 # Source0-md5: 800c21347b8114e1990b03ceefed1b13
14 URL: http://search.cpan.org/dist/tidyview/
15 BuildRequires: perl-devel >= 1:5.8.0
16 BuildRequires: rpm-perlprov >= 4.1-13
18 BuildRequires: perl(Log::Log4perl) >= 1.0
19 BuildRequires: perl(Tk::DiffText)
22 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Preview the effects of perltidy's plethora of options.
28 %setup -q -n %{pdir}-%{version}
31 %{__perl} Makefile.PL \
35 %{?with_tests:%{__make} test}
38 rm -rf $RPM_BUILD_ROOT
39 %{__make} pure_install \
40 DESTDIR=$RPM_BUILD_ROOT
42 mv $RPM_BUILD_ROOT%{_bindir}/tidyview{.pl,}
43 mv $RPM_BUILD_ROOT%{_mandir}/man1/tidyview{.pl,}.1p
45 %{__rm} -r $RPM_BUILD_ROOT%{perl_vendorlib}/TidyView/t
46 %{__rm} -r $RPM_BUILD_ROOT%{perl_vendorlib}/PerlTidy/t
49 rm -rf $RPM_BUILD_ROOT
52 %defattr(644,root,root,755)
53 %doc Changes README TODO
54 %attr(755,root,root) %{_bindir}/tidyview
55 %{_mandir}/man1/tidyview.1p*
56 %{_mandir}/man3/TidyView::Options.3pm*
57 %dir %{perl_vendorlib}/PerlTidy
58 %{perl_vendorlib}/PerlTidy/*.pm
59 %dir %{perl_vendorlib}/TidyView
60 %{perl_vendorlib}/TidyView/*.pm