parent
87014fd1e1
commit
c3564dc8d6
|
@ -1,2 +1,3 @@
|
|||
/ocaml-base64-2.0.0.tar.gz
|
||||
/v2.1.2.tar.gz
|
||||
/base64-v3.4.0.tbz
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue