]> git.pld-linux.org Git - packages/perl-XML-SAX-ExpatXS.git/blob - perl-XML-SAX-ExpatXS.spec
- initial revision
[packages/perl-XML-SAX-ExpatXS.git] / perl-XML-SAX-ExpatXS.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define         pdir    XML
7 %define         pnam    SAX-ExpatXS
8 Summary:        XML::SAX::ExpatXS - Perl SAX 2 XS extension to Expat parser
9 Name:           perl-XML-SAX-ExpatXS
10 Version:        1.08
11 Release:        0.1
12 # same as perl
13 License:        GPL v1+ or Artistic
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  1304d9ed3ca598ea000ea559dd387e88
17 BuildRequires:  expat-devel
18 %if %{with tests}
19 BuildRequires:  perl-XML-SAX >= 0.12
20 %endif
21 BuildRequires:  perl-devel >= 1:5.8.0
22 BuildRequires:  rpm-perlprov >= 4.1-13
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 XML::SAX::ExpatXS is a direct XS extension to Expat XML parser. It
27 implements Perl SAX 2.1 interface.
28
29 %prep
30 %setup -q -n %{pdir}-%{pnam}-%{version}
31
32 # we want to add_parser in post, not on make install
33 head -n 11 Makefile.PL > Makefile.PL.tmp
34 mv -f Makefile.PL.tmp Makefile.PL
35
36 %build
37 %{__perl} Makefile.PL \
38         INSTALLDIRS=vendor
39 %{__make}
40
41 %{?with_tests:%{__make} test}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45
46 %{__make} install \
47         DESTDIR=$RPM_BUILD_ROOT
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 umask 022
54 %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::ExpatXS))->save_parsers()"
55
56 %postun
57 if [ "$1" = "0" ]; then
58         umask 022
59         %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::SAX::ExpatXS))->save_parsers()"
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc Changes
65 %{perl_vendorarch}/XML/SAX/*
66 %{perl_vendorarch}/auto/XML/SAX/*
67 %{_mandir}/man3/*
This page took 0.465663 seconds and 3 git commands to generate.