]>
Commit | Line | Data |
---|---|---|
ca973390 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
b42691d8 | 4 | |
de005c41 | 5 | %define pdir XML |
6 | %define pnam SAX-Expat | |
7b0655e7 | 7 | Summary: XML::SAX::Expat - SAX2 driver for Expat (XML::Parser) |
605a2ca8 | 8 | Summary(pl.UTF-8): XML::SAX::Expat - sterownik SAX2 dla modułu Expat (XML::Parser) |
ca973390 | 9 | Name: perl-XML-SAX-Expat |
2892ba5f | 10 | Version: 0.51 |
7ec82a21 | 11 | Release: 2 |
ca973390 | 12 | # same as perl |
c30800a2 | 13 | License: GPL v1+ or Artistic |
ca973390 | 14 | Group: Development/Languages/Perl |
74e56db5 | 15 | Source0: http://www.cpan.org/modules/by-module/XML/%{pdir}-%{pnam}-%{version}.tar.gz |
2892ba5f | 16 | # Source0-md5: 74c540095d84e3f054d1f8703a73ef76 |
74e56db5 | 17 | URL: http://search.cpan.org/dist/XML-SAX-Expat/ |
b42691d8 | 18 | BuildRequires: perl(XML::SAX::Base) >= 1.00 |
ca973390 JB |
19 | BuildRequires: perl-XML-NamespaceSupport >= 0.03 |
20 | BuildRequires: perl-XML-Parser >= 2.27 | |
21 | BuildRequires: perl-XML-SAX >= 0.03 | |
ca973390 JB |
22 | BuildRequires: perl-devel >= 1:5.8.0 |
23 | BuildRequires: rpm-perlprov >= 4.1-13 | |
2892ba5f | 24 | BuildRequires: sed >= 4.0 |
7ec82a21 | 25 | Requires: perl-XML-SAX >= 0.03 |
ca973390 JB |
26 | BuildArch: noarch |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | This is an implementation of a SAX2 driver sitting on top of Expat | |
31 | (XML::Parser). | |
32 | ||
9df7fe10 JR |
33 | %description -l pl.UTF-8 |
34 | To jest implementacja sterownika SAX2 w oparciu o moduł Expat | |
ca973390 JB |
35 | (XML::Parser). |
36 | ||
37 | %prep | |
38 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
39 | ||
40 | # we want to add_parser in post, not on make install | |
2892ba5f | 41 | %{__sed} -i -e '/^sub MY::install/,/^}/ s/^/#/' Makefile.PL |
ca973390 JB |
42 | |
43 | %build | |
44 | %{__perl} Makefile.PL \ | |
45 | INSTALLDIRS=vendor | |
ca973390 JB |
46 | %{__make} |
47 | ||
48 | %{?with_tests:%{__make} test} | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %{__make} install \ | |
54 | DESTDIR=$RPM_BUILD_ROOT | |
55 | ||
56 | %clean | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | %post | |
60 | umask 022 | |
61 | %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::Expat))->save_parsers()" | |
62 | ||
63 | %postun | |
b42691d8 | 64 | if [ "$1" = "0" ] && [ -x %{__perl} ]; then |
ca973390 JB |
65 | umask 022 |
66 | %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::SAX::Expat))->save_parsers()" | |
67 | fi | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %doc Changes | |
72 | %{perl_vendorlib}/XML/SAX/Expat.pm | |
2892ba5f | 73 | %{_mandir}/man3/XML::SAX::Expat.3pm* |