Version 1.5.1. Drop upstreamed -result patch.

This commit is contained in:
Jerry James 2021-03-31 08:46:28 -06:00
parent 1de1a4d1aa
commit b2aab6bb1e
2 changed files with 9 additions and 23 deletions

View File

@ -8,31 +8,24 @@
# package cannot depend on dune, or any package that depends on dune.
# Therefore, we:
# - hack up our own build, rather than using dune to do the build
# - bypass the need for ocaml-result (which requires dune to build)
# - skip tests, which require ppx_expect, which is built with dune
# - skip building documentation, which requires odoc, which is built with dune
# If you know what you are doing, build with dune anyway using this conditional.
%bcond_with dune
Name: ocaml-%{srcname}
Version: 1.4.0
Release: 3%{?dist}
Version: 1.5.1
Release: 1%{?dist}
Summary: Parsing and printing of S-expressions in canonical form
License: MIT
URL: https://github.com/ocaml-dune/csexp
Source0: %{url}/releases/download/%{version}/%{srcname}-%{version}.tbz
# Depend on Stdlib.Result instead of ocaml-result. See comment above.
# This patch is not appropriate for upstream, which needs to keep compatibility
# with older OCaml versions.
Patch0: %{name}-result.patch
BuildRequires: ocaml >= 4.02.3
BuildRequires: ocaml >= 4.03.0
%if %{with dune}
BuildRequires: ocaml-dune >= 1.11
BuildRequires: ocaml-odoc
BuildRequires: ocaml-result-devel >= 1.5
%endif
%description
@ -43,9 +36,6 @@ binary encoding of S-expressions.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{with dune}
Requires: ocaml-result-devel%{?_isa}
%endif
%description devel
The %{name}-devel package contains libraries and signature files for
@ -53,16 +43,13 @@ developing applications that use %{name}.
%prep
%autosetup -N -n %{srcname}-%{version}
%if %{without dune}
%autopatch -p1
%endif
%build
%if %{with dune}
dune build %{?_smp_mflags} --display=verbose @install
dune build %{?_smp_mflags} @doc
%else
OFLAGS="-strict-sequence -strict-formats -short-paths -keep-locs -g -opaque"
OFLAGS="-strict-sequence -strict-formats -short-paths -keep-locs -g"
OCFLAGS="$OFLAGS -bin-annot"
cd src
ocamlc $OCFLAGS -output-obj csexp.mli
@ -88,11 +75,6 @@ find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%ifarch %{ocaml_native_compiler}
# Add missing executable bits
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
%endif
%else
# Install without dune. See comment at the top.
mkdir -p %{buildroot}%{_libdir}/ocaml/%{srcname}
@ -171,6 +153,10 @@ EOF
%{_libdir}/ocaml/%{srcname}/*.mli
%changelog
* Wed Mar 31 2021 Jerry James <loganjerry@gmail.com> - 1.5.1-1
- Version 1.5.1
- Drop upstreamed -result patch
* Sun Feb 28 22:16:45 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1.4.0-3
- Bump release and rebuild.

View File

@ -1 +1 @@
SHA512 (csexp-1.4.0.tbz) = 604a5094fbbf61f497b342ad0aa8ec25275b2a904cd0c1823fc40daa54a15796b360374ff495c0d8ca3b4c1e6723b2ce37e030857fae131222606de818fb8129
SHA512 (csexp-1.5.1.tbz) = d785bbabaff9f6bf601399149ef0a42e5e99647b54e27f97ef1625907793dda22a45bf83e0e8a1eba2c63634c5484b54739ff0904ef556f5fc592efa38af7505