Merge pull request !1 from compile_success/master
This commit is contained in:
openeuler-ci-bot 2020-02-29 12:18:38 +08:00 committed by Gitee
commit bb5110dbbd
2 changed files with 77 additions and 0 deletions

BIN
2.4.tar.gz Normal file

Binary file not shown.

77
ocaml-xml-light.spec Normal file
View File

@ -0,0 +1,77 @@
%global debug_package %{nil}
Name: ocaml-xml-light
Version: 2.4
Release: 0.31.1
Summary: Minimal XML parser and printer for OCaml
License: LGPLv2+
URL: http://tech.motion-twin.com/xmllight.html
Source0: https://github.com/gasche/xml-light/archive/%{version}.tar.gz
BuildRequires: ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3
BuildRequires: ocaml-ocamldoc gawk
%description
The package provides functions to parse an XML document into an OCaml data structure 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 ocaml-xml-light
Group: Development/Libraries
Requires: ocaml-xml-light = %{version}-%{release}
%description devel
The ocaml-xml-light-devel package contains libraries and signature files for
developing applications that use ocaml-xml-light.
%prep
%autosetup -n xml-light-%{version}
%build
unset MAKEFLAGS
make all
make doc
make opt
sed -e 's/@VERSION@/%{VERSION}/' < META.in > META
%check
./test.exe <<EOF
<abc><123/></abc>
EOF
./test_opt.exe <<EOF
<abc><123/></abc>
EOF
%install
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
ocamlfind install xml-light META *.mli *.cmi *.cma *.a *.cmxa *.cmx
%files
%doc README
%{_libdir}/ocaml/xml-light
%exclude %{_libdir}/ocaml/xml-light/*.a
%exclude %{_libdir}/ocaml/xml-light/*.cmxa
%exclude %{_libdir}/ocaml/xml-light/*.cmx
%exclude %{_libdir}/ocaml/xml-light/*.mli
%exclude %{_libdir}/ocaml/xml-light/test.cmi
%files devel
%doc README doc/*
%{_libdir}/ocaml/xml-light/*.a
%{_libdir}/ocaml/xml-light/*.cmxa
%{_libdir}/ocaml/xml-light/*.cmx
%{_libdir}/ocaml/xml-light/*.mli
%changelog
* Thu Feb 27 2020 zhujunhao <zhujunhao5@huawei.com> - 2.3-0.31.1
- Package init