From 036b2d5c99fb196127c7a18b1c9c3ffddedbae9b Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Nov 18 2017 13:34:45 +0000 Subject: New upstream version 1.4.0. Remove opt macro. Enable debuginfo everywhere. OCaml 4.06.0 rebuild. Enable SMP builds. New upstream URL. Remove test files and use upstream tests. --- diff --git a/.gitignore b/.gitignore index 3978cc6..d8396c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /yojson-1.1.8.tar.gz +/ocaml-yojson-1.4.0.tar.gz diff --git a/ocaml-yojson.spec b/ocaml-yojson.spec index 693b2f1..8b9a497 100644 --- a/ocaml-yojson.spec +++ b/ocaml-yojson.spec @@ -1,19 +1,11 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%if !%{opt} -%global debug_package %{nil} -%endif - Name: ocaml-yojson -Version: 1.1.8 -Release: 25%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: An optimized parsing and printing library for the JSON format License: BSD -URL: http://mjambon.com/yojson.html -Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -# Example JSON files for testing -Source1: test-valid.json -Source2: test-invalid.json +URL: https://github.com/mjambon/yojson +Source0: https://github.com/mjambon/yojson/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib @@ -21,6 +13,7 @@ BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-biniou-devel BuildRequires: ocaml-cppo BuildRequires: ocaml-easy-format-devel +BuildRequires: jbuilder %global libname %(sed -e 's/^ocaml-//' <<< %{name}) @@ -51,56 +44,49 @@ developing applications that use %{name}. %build -# not SMP-safe -make META all -%if %opt -make opt -%endif +jbuilder build %install -# These rules work if the library uses 'ocamlfind install' to install itself. -export PREFIX=$RPM_BUILD_ROOT%{_prefix} -export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml +mkdir -p $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $OCAMLFIND_DESTDIR -make install +mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml +cp -L _build/install/default/bin/* $RPM_BUILD_ROOT%{_bindir} +cp -rL _build/install/default/lib/* $RPM_BUILD_ROOT%{_libdir}/ocaml -%check -%if %opt -# Against valid JSON -$RPM_BUILD_ROOT%{_bindir}/ydump %{SOURCE1} >/dev/null 2>valid-err.log -[ -z "$(cat valid-err.log)" ] -# Against invalid JSON -[ ! $($RPM_BUILD_ROOT%{_bindir}/ydump %{SOURCE2} 2>/dev/null) ] -%endif +%check +jbuilder runtest %files %doc LICENSE %{_libdir}/ocaml/%{libname}/ -%if %opt +%ifarch %{ocaml_native_compiler} %{_bindir}/ydump %exclude %{_libdir}/ocaml/*/*.cmx -%exclude %{_libdir}/ocaml/*/*.o %endif %exclude %{_libdir}/ocaml/*/*.mli %files devel %doc LICENSE README.md Changes examples -%if %opt +%ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/*/*.cmx -%{_libdir}/ocaml/*/*.o %endif %{_libdir}/ocaml/*/*.mli %changelog -* Sat Nov 18 2017 Richard W.M. Jones - 1.1.8-25 +* Sat Nov 18 2017 Richard W.M. Jones - 1.4.0-1 +- New upstream version 1.4.0. +- Remove opt macro. +- Enable debuginfo everywhere. - OCaml 4.06.0 rebuild. +- Enable SMP builds. +- New upstream URL. +- Remove test files and use upstream tests. * Wed Aug 09 2017 Richard W.M. Jones - 1.1.8-24 - OCaml 4.05.0 rebuild. diff --git a/sources b/sources index 768a334..21a353e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e3c53004f74410c3835d851b02c1bf21 yojson-1.1.8.tar.gz +SHA512 (ocaml-yojson-1.4.0.tar.gz) = dc019ecf0387299282c3df9a548456d2529993241911a83acb14f2361ed14886e5ebebe415773b6bc718cb0b12a25529184f3b5b62c71b42960fbd62e1c63bf6