Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Ben Rosser
efb9d7eaea Install dune libraries. Add new ocaml-dune subpackage (rhbz#1737414). 2019-08-06 15:00:57 -04:00

View file

@ -1,6 +1,6 @@
Name: ocaml-dune
Version: 1.7.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A composable build system for OCaml
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
@ -48,6 +48,14 @@ adapted to the open source world. It has matured over a long time and is used
daily by hundred of developers, which means that it is highly tested and
productive.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and
signature files for developing applications that use %{name}.
%package doc
Summary: HTML documentation for %{name}
Requires: %{name} = %{version}-%{release}
@ -81,6 +89,17 @@ ln -sfvbn dune %{buildroot}%{_bindir}/jbuilder
cp -av _boot/default/doc/*.1 %{buildroot}%{_mandir}/man1/
cp -av _boot/default/doc/*.5 %{buildroot}%{_mandir}/man5/
# Dune also has libraries now, which need to be installed via the standard way.
mkdir -p %{buildroot}%{_libdir}/ocaml/%{libname}/
cp -aLr _boot/install/default/lib/%{libname}/* %{buildroot}%{_libdir}/ocaml/%{libname}/
# Remove *.ml files from installation.
# This is a little annoying. ocaml/dune has a bunch of subdirectories that actually contain code.
# But the "_wp" subdirectory *itself* contains subdirectories with compiled code.
# So I've special-cased that one.
rm -fv %{buildroot}%{_libdir}/ocaml/%{libname}/*/*.ml
rm -fv %{buildroot}%{_libdir}/ocaml/%{libname}/_wp/*/*.ml
# Install documentation by way of pkgdocdir.
mkdir -p %{buildroot}%{_pkgdocdir}/
cp -ar README.md CHANGES.md doc/_build/* %{buildroot}%{_pkgdocdir}/
@ -98,6 +117,30 @@ cp -ar README.md CHANGES.md doc/_build/* %{buildroot}%{_pkgdocdir}/
%{_bindir}/dune
%{_mandir}/man*/dune*
%dir %{_pkgdocdir}
%{_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}/_wp/*/*.a
%exclude %{_libdir}/ocaml/%{libname}/_wp/*/*.cmxa
%exclude %{_libdir}/ocaml/%{libname}/_wp/*/*.cmx
%endif
%exclude %{_libdir}/ocaml/%{libname}/*/*.mli
%exclude %{_libdir}/ocaml/%{libname}/_wp/*/*.mli
%files devel
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{libname}/*/*.a
%{_libdir}/ocaml/%{libname}/*/*.cmxa
%{_libdir}/ocaml/%{libname}/*/*.cmx
%{_libdir}/ocaml/%{libname}/_wp/*/*.a
%{_libdir}/ocaml/%{libname}/_wp/*/*.cmxa
%{_libdir}/ocaml/%{libname}/_wp/*/*.cmx
%endif
%{_libdir}/ocaml/%{libname}/*/*.mli
# There do not seem to be headers in the _wp subdirectory.
#{_libdir}/ocaml/{libname}/_wp/*/*.mli
%files doc
%exclude %{_pkgdocdir}/README.md
@ -105,6 +148,9 @@ cp -ar README.md CHANGES.md doc/_build/* %{buildroot}%{_pkgdocdir}/
%doc %{_pkgdocdir}/*
%changelog
* Tue Aug 06 2019 Ben Rosser <rosser.bjr@gmail.com> - 1.7.3-2
- Install dune libraries. Add new ocaml-dune subpackage (rhbz#1737414).
* Fri Mar 01 2019 Andy Li <andy@onthewings.net> - 1.7.3-1
- Renamed source package from jbuilder to ocaml-dune.
- Updated URLs and license according to upstream changes.