2014-12-08 08:37:39 +00:00
|
|
|
#
|
|
|
|
# spec file for package ocaml-xml-light
|
|
|
|
#
|
|
|
|
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: ocaml-xml-light
|
2016-06-13 19:50:40 +00:00
|
|
|
Version: 2.4.20160613.2bc42e8
|
|
|
|
Release: 0
|
2014-12-08 21:00:39 +00:00
|
|
|
%{ocaml_preserve_bytecode}
|
2014-12-08 08:37:39 +00:00
|
|
|
Summary: Minimal XML parser and printer for OCaml
|
2016-06-16 10:13:47 +00:00
|
|
|
License: LGPL-2.1+
|
2014-12-08 08:37:39 +00:00
|
|
|
Group: Development/Libraries/Other
|
2016-06-13 19:50:40 +00:00
|
|
|
Url: https://github.com/gasche/xml-light
|
|
|
|
Source0: xml-light-%{version}.tar.xz
|
|
|
|
BuildRequires: ocaml
|
|
|
|
BuildRequires: ocaml-oasis
|
2014-12-08 08:37:39 +00:00
|
|
|
BuildRequires: ocaml-ocamldoc
|
2016-06-13 19:50:40 +00:00
|
|
|
BuildRequires: ocaml-rpm-macros >= 4.03
|
2014-12-08 08:37:39 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-11-10 10:35:10 +00:00
|
|
|
# ocaml autodep start for pkg: ocaml-xml-light
|
|
|
|
# hardcoded rpm dependency for pre 12.1 to compensate for lack of ocaml() provides/requires
|
|
|
|
%if 0%{?suse_version} < 1210
|
2015-11-10 13:33:00 +00:00
|
|
|
Requires: ocaml-runtime
|
2015-11-10 10:35:10 +00:00
|
|
|
%endif
|
|
|
|
# ocaml autodep end for pkg: ocaml-xml-light
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Xml-Light is a minimal XML parser & printer for OCaml. It provides
|
|
|
|
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/Libraries/Other
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
%prep
|
2016-06-13 19:50:40 +00:00
|
|
|
%setup -q -n xml-light-%{version}
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%build
|
2016-06-13 19:50:40 +00:00
|
|
|
rm -fv META*
|
2016-06-14 05:38:19 +00:00
|
|
|
# obs service changes every ^Version line ...
|
|
|
|
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
|
2016-06-13 19:50:40 +00:00
|
|
|
OASISFormat: 0.4
|
|
|
|
Name: xml-light
|
|
|
|
Version: %{version}
|
|
|
|
Authors: Nicolas Cannasse <ncannasse@motion-twin.com>
|
|
|
|
License: LGPL-2.1+
|
|
|
|
Plugins: META(`oasis version`)
|
|
|
|
BuildTools: ocamlbuild
|
|
|
|
Synopsis: Minimal XML parser and printer for OCaml
|
|
|
|
|
|
|
|
Library "xml-light"
|
|
|
|
Path: .
|
|
|
|
Modules: Xml, Xml_light_types
|
|
|
|
|
|
|
|
Document "xml-light"
|
|
|
|
Title: API reference for xml-light
|
|
|
|
Type: ocamlbuild
|
|
|
|
BuildTools+: ocamldoc
|
|
|
|
InstallDir: \$htmldir
|
|
|
|
Install: true
|
|
|
|
XOCamlbuildPath: .
|
|
|
|
XOCamlbuildLibraries: xml-light
|
|
|
|
|
|
|
|
Executable test
|
|
|
|
Install: false
|
|
|
|
Path: .
|
|
|
|
MainIs: test.ml
|
|
|
|
CompiledObject: best
|
|
|
|
BuildDepends: xml-light
|
|
|
|
|
|
|
|
Test "test"
|
|
|
|
Type: Custom (0.0.1)
|
|
|
|
Command: \$test < x
|
|
|
|
Run: true
|
|
|
|
_EOF_
|
|
|
|
|
2016-06-16 10:04:53 +00:00
|
|
|
%oasis_setup
|
2016-06-13 19:50:40 +00:00
|
|
|
%ocaml_oasis_configure --enable-docs --enable-tests
|
|
|
|
%ocaml_oasis_build
|
|
|
|
%ocaml_oasis_doc
|
2014-12-08 08:37:39 +00:00
|
|
|
|
2016-06-13 19:50:40 +00:00
|
|
|
%install
|
|
|
|
%ocaml_oasis_findlib_install
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%check
|
2016-06-13 19:50:40 +00:00
|
|
|
tee x <<EOF
|
2014-12-08 08:37:39 +00:00
|
|
|
<abc><123/></abc>
|
|
|
|
|
|
|
|
EOF
|
2016-06-13 19:50:40 +00:00
|
|
|
%ocaml_oasis_test
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2016-05-26 06:55:03 +00:00
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
2016-06-13 19:50:40 +00:00
|
|
|
%if %{ocaml_native_compiler}
|
|
|
|
%{_libdir}/ocaml/*/*.cmxs
|
|
|
|
%endif
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
2016-06-13 19:50:40 +00:00
|
|
|
%{oasis_docdir_html}
|
2016-05-26 06:55:03 +00:00
|
|
|
%dir %{_libdir}/ocaml
|
|
|
|
%dir %{_libdir}/ocaml/*
|
2014-12-08 21:00:39 +00:00
|
|
|
%if %{ocaml_native_compiler}
|
2016-05-26 06:55:03 +00:00
|
|
|
%{_libdir}/ocaml/*/*.a
|
|
|
|
%{_libdir}/ocaml/*/*.cmx
|
|
|
|
%{_libdir}/ocaml/*/*.cmxa
|
2014-12-08 08:37:39 +00:00
|
|
|
%endif
|
2016-06-13 19:50:40 +00:00
|
|
|
%{_libdir}/ocaml/*/*.annot
|
2016-05-26 06:55:03 +00:00
|
|
|
%{_libdir}/ocaml/*/*.cma
|
|
|
|
%{_libdir}/ocaml/*/*.cmi
|
2016-06-13 19:50:40 +00:00
|
|
|
%{_libdir}/ocaml/*/*.cmt
|
|
|
|
%{_libdir}/ocaml/*/*.cmti
|
2016-05-26 06:55:03 +00:00
|
|
|
%{_libdir}/ocaml/*/*.mli
|
|
|
|
%{_libdir}/ocaml/*/META
|
2014-12-08 08:37:39 +00:00
|
|
|
|
|
|
|
%changelog
|