# This package seems to fail to generate debuginfo on > F26. %global debug_package %{nil} Name: ocaml-result Version: 1.2 Release: 2%{?dist} Summary: Compat result type %global libname %(echo %{name} | sed -e 's/^ocaml-//') License: BSD URL: https://github.com/janestreet/result/ Source0: https://github.com/janestreet/result/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: ocaml BuildRequires: ocaml-findlib %description Projects that want to use the new result type defined in OCaml >= 4.03 while staying compatible with older versions of OCaml should use the Result module defined in this library. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %autosetup -n %{libname}-%{version} # Generate debuginfo, or try to. sed 's/ocamlc/ocamlc -g/g' -i Makefile sed 's/ocamlopt/ocamlopt -g/g' -i Makefile %build %make_build byte %ifarch %{ocaml_native_compiler} %make_build native %endif %install # Currently result installs itself with ocamlfind. export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install %files %doc README.md %license LICENSE %{_libdir}/ocaml/%{libname} %ifarch %{ocaml_native_compiler} %exclude %{_libdir}/ocaml/%{libname}/*.a %exclude %{_libdir}/ocaml/%{libname}/*.cmxa %exclude %{_libdir}/ocaml/%{libname}/*.cmx %exclude %{_libdir}/ocaml/%{libname}/*.ml %endif %files devel %license LICENSE %ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/%{libname}/*.a %{_libdir}/ocaml/%{libname}/*.cmxa %{_libdir}/ocaml/%{libname}/*.cmx # There's no .mli file, so I believe we should distribute this. %{_libdir}/ocaml/%{libname}/*.ml %endif %changelog * Mon Sep 11 2017 Ben Rosser 1.2-2 - Disable debuginfo generation, as it fails on Rawhide. - Move .ml file to devel package (as there is no .mli file). * Sat Sep 02 2017 Ben Rosser 1.2-1 - Initial package.