source: projects/specs/trunk/p/perl-XML-SAX/perl-XML-SAX-vl.spec @ 5791

Revision 5791, 8.8 KB checked in by shaolin, 12 years ago (diff)
  • new packages
    • perl-Net-Netmask
    • perl-Net-Pcap
    • perl-Text-Iconv
    • perl-XML-Filter-BufferText?
    • perl-XML-SAX-Base
    • perl-XML-SAX-Writer
  • perl-XML-SAX: new upstream release; spec file revamped
  • perl-LDAP: renamed from perl-ldap; new upstream release
Line 
1Summary:        XML-SAX Perl module
2Name:           perl-XML-SAX
3Version:        0.99
4Release:        1%{?_dist_release}
5
6Group:          Development/Libraries
7License:        GPL+ or Artistic
8URL:            http://search.cpan.org/dist/XML-SAX/
9Source0:        http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz
10BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
11
12BuildArch:      noarch
13BuildRequires:  perl(ExtUtils::MakeMaker)
14BuildRequires:  perl(XML::NamespaceSupport) >= 0.03
15# The following creates circular dependency, but they are not needed for build.
16#BuildRequires:  perl(XML::LibXML) perl(XML::LibXML::Common)
17# XML::SAX::Base became independent package, BR just for test
18BuildRequires:  perl(XML::SAX::Base)
19
20Requires:       perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
21Requires:       perl(XML::LibXML) perl(XML::LibXML::Common)
22
23%description
24XML::SAX consists of several framework classes for using and building
25Perl SAX2 XML parsers, filters, and drivers. It is designed around the
26need to be able to "plug in" different SAX parsers to an application
27without requiring programmer intervention. Those of you familiar with
28the DBI will be right at home. Some of the designs come from the Java
29JAXP specification (SAX part), only without the javaness.
30
31
32%prep
33%setup -q -n XML-SAX-%{version}
34
35%if %{_dist_release} > "vl6"
36%{?perl_default_filter:
37%filter_from_provides /^perl(XML::SAX::PurePerl)$/d
38%filter_from_requires /^perl(XML::SAX::PurePerl::\(DTDDecls\|DocType\|EncodingDetect\|XMLDecl\|NoUnicodeExt\|UnicodeExt\|Reader::NoUnicodeExt\))/d
39%perl_default_filter}
40%global __provides_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(XML::SAX::PurePerl\\)
41%global __requires_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(XML::SAX::PurePerl::(DTDDecls|DocType|EncodingDetect|XMLDecl|NoUnicodeExt|UnicodeExt|Reader::NoUnicodeExt)\\)
42
43%{?perl_default_subpackage_tests}
44
45%else
46cat << \EOF > %{name}-prov
47#!/bin/sh
48%{__perl_provides} $* |\
49sed -e '/perl(XML::SAX::PurePerl)/d'
50EOF
51
52%global __perl_provides %{_builddir}/XML-SAX-%{version}/%{name}-prov
53chmod +x %{__perl_provides}
54
55cat << \EOF > %{name}-req
56#!/bin/sh
57%{__perl_requires} $* |\
58sed -e '/perl(XML::SAX::PurePerl::\(DTDDecls\|DocType\|EncodingDetect\|XMLDecl\|NoUnicodeExt\|UnicodeExt\|Reader::NoUnicodeExt\))/d'
59EOF
60
61%global __perl_requires %{_builddir}/XML-SAX-%{version}/%{name}-req
62chmod +x %{__perl_requires}
63%endif
64
65
66%build
67echo N | %{__perl} Makefile.PL INSTALLDIRS=vendor
68make %{?_smp_mflags}
69
70%install
71rm -rf %{buildroot}
72make pure_install PERL_INSTALL_ROOT=%{buildroot}
73find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
74find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
75chmod -R u+w %{buildroot}/*
76
77touch %{buildroot}%{perl_vendorlib}/XML/SAX/ParserDetails.ini
78
79%check
80make test
81
82%clean
83rm -rf %{buildroot}
84
85
86%post
87if [ ! -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" ] ; then
88  perl -MXML::SAX -e \
89    'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null || :
90else
91  cp -p "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup"
92fi
93
94%triggerun -- perl-XML-LibXML < 1.58-8
95if [ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] ; then
96  mv "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini"
97fi
98
99%preun
100# create backup of ParserDetails.ini, therefore user's configuration is used
101if [ $1 -eq 0 ] ; then
102  perl -MXML::SAX -e \
103    'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' || :
104fi
105[ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] && \
106rm -rf "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" || :
107
108%files
109%doc Changes LICENSE README
110%dir %{perl_vendorlib}/XML
111%{perl_vendorlib}/XML/SAX.pm
112%dir %{perl_vendorlib}/XML/SAX
113%{perl_vendorlib}/XML/SAX/*.pm
114%{perl_vendorlib}/XML/SAX/*.pod
115%{perl_vendorlib}/XML/SAX/PurePerl
116%{_mandir}/man3/XML::*.3pm*
117%ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
118
119
120%changelog
121* Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.99-1
122- updated to 0.99
123- revamped spec in accordance with Fedora's 0.99-2
124- previous Vine changelogs as follows:
125
126  - Sun Mar 27 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.16-3
127  - drebuild with perl-5.12.3
128  - using __perl_requires macro for VineSeed (vl6)
129 
130  - Sun Jun  1 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-2
131  - added Requires(post,preun): perl-XML-LibXML
132 
133  - Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-1
134  - new upstream release
135  - built with perl-5.10.0-2
136  - added SOURCE1, 2 for avoiding unwanted dependancies
137 
138  - Sun Jan  2 2005 IWAI, Masaharu <iwai@alib.jp> 0.12-0vl2
139  - build on perl-5.8.6-0vl1
140 
141  - Sun Oct 17 2004 Satoshi MACHINO <machino@vinelinux.org> 0.12-0vl1
142  - new upstream version
143  - updated patch0 to perl-XML-SAX-0.12-makefile.patch
144 
145  - Mon Apr 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 0.10-0vl1
146  - first build for Vine Linux
147
148* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-2
149- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
150
151* Fri Oct 07 2011 Marcela Mašláňová <mmaslano@redhat.com> 0.99-1
152- update to 0.99
153
154* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.96-15
155- Perl mass rebuild
156
157* Fri Jun 24 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-14
158- fix macros to work with new macros
159- clean spec
160
161* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-13
162- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
163
164* Mon Jan 24 2011 Adrian Reber <adrian@lisas.de> - 0.96-12
165- rebuild for ppc
166
167* Thu Dec 23 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-11
168- 661697 rebuild for fixing problems with vendorach/lib
169
170* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-10
171- Mass rebuild with perl-5.12.0
172
173* Fri Feb  5 2010 Stepan Kasal <skasal@redhat.com> - 0.96-9
174- anchor the filtering regexps
175
176* Fri Feb  5 2010 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-8
177- XML-LibXML use triggers for XML::SAX update. Deleting of settings in
178 ParserDetails.ini is solved by post and preun part, which create backup.
179
180* Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-7
181- instead of path into post used perl_vendorlib macro
182- rebuilt will be needed for perl-5.10.1
183
184* Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-6
185- post scriptlet needs to check whether the file is installed. When it isn't,
186 then it's needed call for adding PurePerl parser
187 http://perl-xml.sourceforge.net/faq/#parserdetails.ini
188
189* Mon Oct 19 2009 Stepan Kasal <skasal@redhat.com> - 0.96-5
190- use the filtering macros
191
192* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-4
193- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
194
195* Tue Apr 28 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-3
196- 478905 fix scriptlets
197
198* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-2
199- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
200
201* Thu Dec 11 2008 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-1
202- update to 0.96, big leap in versioning
203
204* Sun Mar  2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-5
205- Re-enable XML::LibXML BuildRequires
206
207* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-4
208- Rebuild for perl 5.10 (again)
209
210* Mon Jan 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3.1
211- temporarily disable BR against perl-XML-LibXML
212
213* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3
214- rebuild for new perl
215
216* Sat Jul 07 2007 Robin Norwood <rnorwood@redhat.com> - 0.16-2
217- Resolves: rhbz#247213
218- Fix provides and requires scripts.
219
220* Mon Jul 02 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.16-1
221- Update to 0.16.
222- Brings specfile closer to Fedora Perl template.
223- Corrects Source0 URL (upstream maintainer has changed).
224- Move Requires filter into spec, and add Provides filter.
225
226* Tue Feb 13 2007 Robin Norwood <rnorwood@redhat.com> - 0.15-1
227- New version: 0.15
228
229* Fri Jun 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-2
230- fix bug 194706: fails to build under (new!) mock
231
232* Mon Jun 05 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-1
233- upgrade to 0.14
234
235* Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 0.13-1.1
236- rebuild for new perl-5.8.8
237
238* Mon Dec 19 2005 Jason Vas Dias <jvdias@redhat.com> - 0.13-1
239- upgrade to 0.13
240
241* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
242- rebuilt for new gcc
243
244* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
245- rebuilt for new gcj
246
247* Sun Apr 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.12-7
248- #121167
249- Handle ParserDetails.ini parser registration.
250- Require perl(:MODULE_COMPAT_*).
251- Own installed directories.
252
253* Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1
254- Specfile autogenerated.
255
Note: See TracBrowser for help on using the repository browser.