]> git.pld-linux.org Git - packages/perl-HTML-StripScripts.git/blob - perl-HTML-StripScripts.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-HTML-StripScripts.git] / perl-HTML-StripScripts.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define pdir    HTML
6 %define pnam    StripScripts
7 Summary:        HTML::StripScripts - Strip scripting constructs out of HTML
8 Summary(pl.UTF-8):      HTML::StripScripts - wyciągnij konstrukcje skryptowe poza HTML
9 Name:           perl-HTML-StripScripts
10 Version:        1.05
11 Release:        2
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/HTML/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  e8c51fbfda69efaf94c2937084d2458f
16 Patch0:         HTML-StripScripts-1.05-Fix-typo-in-regex.patch
17 URL:            http://search.cpan.org/dist/HTML-StripScripts/
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 This module strips scripting constructs out of HTML, leaving as much
27 non-scripting markup in place as possible. This allows web
28 applications to display HTML originating from an untrusted source
29 without introducing XSS (cross site scripting) vulnerabilities.
30
31 You will probably use HTML::StripScripts::Parser rather than using
32 this module directly.
33
34 The process is based on whitelists of tags, attributes and attribute
35 values. This approach is the most secure against disguised scripting
36 constructs hidden in malicious HTML documents.
37
38 As well as removing scripting constructs, this module ensures that
39 there is a matching end for each start tag, and that the tags are
40 properly nested.
41
42 Previously, in order to customise the output, you needed to subclass
43 HTML::StripScripts and override methods. Now, most customisation can
44 be done through the Rules option provided to new(). (See
45 examples/declaration/ and examples/tags/ for cases where subclassing
46 is necessary.)
47
48 %description -l pl.UTF-8
49 Moduł ten wyciąga konstrukcje skryptowe poza HTML zastępując je
50 znacznikami nieskryptowymi w każdym możliwym miejscu. Dzięki temu
51 aplikacje webowe mogą wyświetlać HTML pochodzący z niezaufanego źródła
52 bez wprowadzania wrażliwości XSS (cross site scripting).
53
54 %prep
55 %setup -q -n %{pdir}-%{pnam}-%{version}
56 %patch0 -p1
57
58 %build
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61 %{__make}
62
63 %{?with_tests:%{__make} test}
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %{__make} pure_install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73
74 %clean
75 rm -rf $RPM_BUILD_ROOT
76
77 %files
78 %defattr(644,root,root,755)
79 %doc Changes README
80 %{perl_vendorlib}/HTML/*.pm
81 %{_mandir}/man3/*
82 %{_examplesdir}/%{name}-%{version}
This page took 0.082827 seconds and 4 git commands to generate.