Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > db82867670b82f75aa7e0fd7c801a0bf > files > 3

ocaml-xml-light-2.2-18.1.mga1.src.rpm

%define base_name	xml-light
%define name		ocaml-%{base_name}
%define version		2.2
%define subrel		1
%define release		%mkrel 18

Name:		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Minimal XML parser & printer for OCaml
URL:		http://tech.motion-twin.com/xmllight.html
Source: 	http://tech.motion-twin.com/zip/%{base_name}.tar.bz2
Patch:      %{name}-2.2-fix-build.patch
# Modified upstream patch for Bug 7276 - CVE-2012-3514
Patch1:         %{name}-2.2-use-Map-instead-of-Hashtbl.patch
License:	LGPL
Group:		Development/Other
BuildRequires:	ocaml
BuildRoot:	%{_tmppath}/%{name}-%{version}

%description
Xml-Light is a minimal XML parser & printer for OCaml. 
It provide functions to parse an XML document into an OCaml data structure, 
work with it, and print it back to an XML document. 
It support also DTD parsing and checking, and is entirely written in OCaml, 
hence it does not require additional C library.

%package devel
Summary:	Development files for %{name}
Group:		Development/Other
Requires:   %{name} = %{version}-%{release}

%description devel
This package contains the development files needed to build applications
using %{name}.

%prep
%setup -q -n %{base_name}
%patch -p 1
chmod 644 README *.mli
perl -pi -e 's/\015$//' README

%build
make

%install
rm -rf %{buildroot}
install -d %{buildroot}%{_libdir}/ocaml/xml-light
make install INSTALLDIR=%{buildroot}%{_libdir}/ocaml/xml-light

cat > %{buildroot}%{_libdir}/ocaml/xml-light/META <<EOF
version = "%{version}"
description = "Minimal XML parser & printer for OCaml"
archive(byte) = "xml-light.cma"
archive(native) = "xml-light.cmxa"
EOF

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README
%dir %{_libdir}/ocaml/xml-light
%{_libdir}/ocaml/xml-light/*.cmi
%{_libdir}/ocaml/xml-light/*.cma
%{_libdir}/ocaml/xml-light/META

%files devel
%defattr(-,root,root)
%{_libdir}/ocaml/xml-light/*.a
%{_libdir}/ocaml/xml-light/*.cmx
%{_libdir}/ocaml/xml-light/*.cmxa
%{_libdir}/ocaml/xml-light/*.mli



%changelog

* Wed Sep 05 2012 malo <malo> 2.2-18.1.mga1
+ Revision: 288704
- Upstream patch for CVE-2012-3514 (bug 7276) - use Map instead of Hashtbl

* Sat Apr 30 2011 pterjan <pterjan> 2.2-18.mga1
+ Revision: 93943
- Bump release higher than Mandriva

* Mon Mar 07 2011 saispo <saispo> 2.2-1.mga1
+ Revision: 66122
- imported package ocaml-xml-light