/[smeserver]/rpms/php-pear-XML-Parser2/sme10/php-pear-XML_Parser2.spec
ViewVC logotype

Contents of /rpms/php-pear-XML-Parser2/sme10/php-pear-XML_Parser2.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Jun 16 14:53:46 2016 UTC (8 years, 4 months ago) by unnilennium
Branch: MAIN
CVS Tags: php-pear-XML-Parser2-0_1_0-3_el7_sme
Changes since 1.1: +20 -6 lines
* Thu Jun 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.0-3.sme
- importing to buildsys pear packages for Horde [SME: 9600]

1 %define peardir %(pear config-get php_dir 2> /dev/null || echo %{_datadir}/pear)
2 %define xmldir /var/lib/pear
3 %global pear_name XML_Parser2
4 %define name php-pear-XML-Parser2
5 %define version 0.1.0
6 %define release 3
7
8 Name: %{name}
9 Version: %{version}
10 Release: %{release}%{?dist}
11 Summary: XML parsing class based on PHP's bundled expat
12 License: BSD License
13 Group: Development/Libraries
14 Source0: http://pear.php.net/get/XML_Parser2-%{version}.tgz
15 BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
16 URL: http://pear.php.net/package/XML_Parser2
17
18 BuildRequires: php-pear(PEAR) >= 1.4.7
19 Requires: php-pear(PEAR) >= 1.4.0b1
20 Provides: php-pear(%{pear_name}) = %{version}
21
22 #BuildRequires: PEAR::PEAR >= 1.4.7
23 #Requires: PEAR::PEAR
24 #Requires: PEAR::PEAR >= 1.4.0b1
25
26 BuildArch: noarch
27
28 %description
29 This is an XML parser based on PHPs built-in xml extension.
30 It supports two basic modes of operation: "func" and "event". In "func"
31 mode, it will look for a function named after each element (xmltag_ELEMENT
32 for start tags and xmltag_ELEMENT_ for end tags), and in "event" mode it
33 uses a set of generic callbacks.
34
35 Since version 1.2.0 there's a new XML_Parser_Simple class that makes
36 parsing of most XML documents easier, by automatically providing a stack
37 for the elements.
38 Furthermore its now possible to split the parser from the handler object,
39 so you do not have to extend XML_Parser anymore in order to parse a
40 document with it.
41
42 %prep
43 %setup -c -T
44 pear -v -c pearrc \
45 -d php_dir=%{peardir} \
46 -d doc_dir=/docs \
47 -d bin_dir=%{_bindir} \
48 -d data_dir=%{peardir}/data \
49 -d test_dir=%{peardir}/tests \
50 -d ext_dir=%{_libdir} \
51 -s
52
53 %build
54
55 %install
56 rm -rf %{buildroot}
57 pear -c pearrc install --nodeps --packagingroot %{buildroot} %{SOURCE0}
58
59 # Clean up unnecessary files
60 rm pearrc
61 rm %{buildroot}/%{peardir}/.filemap
62 rm %{buildroot}/%{peardir}/.lock
63 rm -rf %{buildroot}/%{peardir}/.registry
64 rm -rf %{buildroot}%{peardir}/.channels
65 rm %{buildroot}/%{xmldir}/.filemap
66 rm %{buildroot}/%{xmldir}/.lock
67 rm -rf %{buildroot}/%{xmldir}/.registry
68 rm -rf %{buildroot}/%{xmldir}/.channels
69 if [[ -f %{buildroot}%{xmldir}/.depdb ]] ;then
70 rm %{buildroot}%{xmldir}/.depdb
71 fi
72 if [[ -f %{buildroot}{xmldir}/.depdblock ]] ;then
73 rm %{buildroot}%{xmldir}/.depdblock
74 fi
75
76 mv %{buildroot}/docs .
77
78
79 # Install XML package description
80 mkdir -p %{buildroot}%{xmldir}
81 tar -xzf %{SOURCE0} package.xml
82 cp -p package.xml %{buildroot}%{xmldir}/XML_Parser2.xml
83
84 %clean
85 rm -rf %{buildroot}
86
87 %post
88 pear install --nodeps --soft --force --register-only %{xmldir}/XML_Parser2.xml >/dev/null || :
89
90 %postun
91 if [ "$1" -eq "0" ]; then
92 pear uninstall --nodeps --ignore-errors --register-only pear.php.net/XML_Parser2 >/dev/null || :
93 fi
94
95 %files
96 %defattr(-,root,root)
97 %doc docs/XML_Parser2/*
98 %{peardir}/*
99 %{xmldir}/XML_Parser2.xml
100
101 %changelog
102 * Thu Jun 16 2016 Jean-Philipe Pialasse <tests@pialasse.com> 0.1.0-3.sme
103 - importing to buildsys pear packages for Horde [SME: 9600]
104
105 * Mon May 6 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.0-2
106 - updated spec file requires section, and left original info remarked.
107
108 * Sun May 5 2013 John H. Bennett III <bennettj@johnbennettservices.com> - 0.1.0-1
109 - Original from pear-make-rpm-spec.
110

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed