]> git.pld-linux.org Git - packages/perl-XML-TreePP.git/blob - perl-XML-TreePP.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-XML-TreePP.git] / perl-XML-TreePP.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    XML
6 %define         pnam    TreePP
7 Summary:        XML::TreePP -- Pure Perl implementation for parsing/writing XML documents
8 Name:           perl-XML-TreePP
9 Version:        0.41
10 Release:        2
11 # same as perl
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/XML/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  3e999ac519163cf3cab70d3ee8d40b34
16 URL:            http://search.cpan.org/dist/XML-TreePP/
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  rpm-perlprov >= 4.1-13
19 %if %{with tests}
20 BuildRequires:  perl-libwww >= 5.802
21 %endif
22 BuildArch:      noarch
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 XML::TreePP module parses an XML document and expands it for a hash tree.
27 This generates an XML document from a hash tree as the opposite way around.
28 This is a pure Perl implementation and requires no modules depended.
29 This can also fetch and parse an XML document from remote web server
30 like the XMLHttpRequest object does at JavaScript language.
31
32 %prep
33 %setup -q -n %{pdir}-%{pnam}-%{version}
34
35 %build
36 %{__perl} Makefile.PL \
37         INSTALLDIRS=vendor
38 %{__make}
39
40 %{?with_tests:%{__make} test}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44
45 %{__make} pure_install \
46         DESTDIR=$RPM_BUILD_ROOT
47
48 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
49 cp -a example $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %files
55 %defattr(644,root,root,755)
56 %doc Changes README
57 %{perl_vendorlib}/XML/*.pm
58 %{_mandir}/man3/*
59 %{_examplesdir}/%{name}-%{version}
This page took 0.120197 seconds and 4 git commands to generate.