New upstream version 3.4.0.

Use dune to build.
This commit is contained in:
Richard W.M. Jones 2021-01-21 17:56:27 +00:00
parent 87014fd1e1
commit c3564dc8d6
3 changed files with 25 additions and 25 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/ocaml-base64-2.0.0.tar.gz
/v2.1.2.tar.gz
/base64-v3.4.0.tbz

View File

@ -1,21 +1,19 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%if ! %opt
# There's a problem building the debugsource package which I don't
# understand. This should be solvable in future.
%global debug_package %{nil}
%endif
Name: ocaml-base64
Version: 2.1.2
Release: 31%{?dist}
Version: 3.4.0
Release: 1%{?dist}
Summary: Base64 library for OCaml
License: ISC
URL: https://github.com/mirage/ocaml-base64
Source0: https://github.com/mirage/ocaml-base64/archive/v%{version}.tar.gz
Source0: https://github.com/mirage/ocaml-base64/releases/download/v%{version}/base64-v%{version}.tbz
BuildRequires: ocaml
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-findlib
BuildRequires: ocaml-dune-devel
%description
@ -34,33 +32,30 @@ Development files for %{name}.
%prep
%setup -q
%setup -q -n base64-v%{version}
%build
# Bizarro build system, so build and install it by hand.
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cma
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cmxa
ocamlbuild -use-ocamlfind -classic-display -tag debug src/b64.cmxs
# Only build the source directory since the other directories
# require packages that we don't have or need.
rm -r fuzz test
dune build %{?_smp_mflags}
%install
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
sed 's/^version.*/version = "%{version}"/' < pkg/META > META
ocamlfind install base64 _build/src/* META
dune install --destdir=%{buildroot}
# Delete a few files we don't really want.
pushd $OCAMLFIND_DESTDIR/base64
rm b64.annot b64.cmt b64.cmti
popd
# We do not want the ml files
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
# We install the documentation with the doc macro
rm -fr %{buildroot}%{_prefix}/doc
%files
%doc README.md
%{_libdir}/ocaml/base64
%if %opt
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/base64/*.a
%exclude %{_libdir}/ocaml/base64/*.cmx
%exclude %{_libdir}/ocaml/base64/*.cmxa
@ -71,7 +66,7 @@ popd
%files devel
%doc CHANGES.md
%if %opt
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/base64/*.a
%{_libdir}/ocaml/base64/*.cmx
%{_libdir}/ocaml/base64/*.cmxa
@ -81,6 +76,10 @@ popd
%changelog
* Thu Jan 21 2021 Richard W.M. Jones <rjones@redhat.com> - 3.4.0-1
- New upstream version 3.4.0.
- Use dune to build.
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 2.1.2-31
- OCaml 4.11.1 rebuild

View File

@ -1 +1 @@
479d28f71f28df483bf34d3a2cffaf04 v2.1.2.tar.gz
SHA512 (base64-v3.4.0.tbz) = e66a67302a9eb136044bebf66a89a1d6e38a96c70622bb6cd27916fec36dcaf4b5b7e7d00c25608f0a2363f2ca4264a5fe765fe7747590958325dbce06311db9