Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > by-pkgid > 1f601ca587a494725367fd879b3b3e3c > files > 3

ocaml-dune-3.4.1-2.mga9.src.rpm

# TESTING NOTE: The testsuite requires numerous packages, many of which are
# built with dune.  Furthermore, the testsuite assumes it is running in a git
# checkout, and has access to the Internet.  We cannot satisfy any of these
# conditions on a koji builder, so we do not run the test suite.

%undefine _package_note_flags

# One of the dune libraries now depends on lwt.  We do not currently need that
# library in Fedora, so don't build it.
%bcond_with lwt

Name:           ocaml-dune
Version:        3.4.1
Release:        %mkrel 2
Summary:        Composable build system for OCaml and Reason
Group:          Development/OCaml

# Dune itself is MIT.  Some bundled libraries have a different license:
# ISC:
# - vendor/cmdliner
# LGPLv2:
# - vendor/incremental-cycles
# LGPLv2 with exceptions:
# - vendor/ocaml-inotify
# - vendor/opam-file-format
# - vendor/re
# MIT:
# - vendor/build_path_prefix_map
# - vendor/spawn
License:        MIT and LGPLv2 and LGPLv2 with exceptions and ISC

URL:            https://dune.build
Source0:        https://github.com/ocaml/dune/archive/%{version}/dune-%{version}.tar.gz
# When building without lwt, remove libraries that need it
Patch0:         %{name}-no-lwt.patch

BuildRequires:  emacs-nox
BuildRequires:  make
BuildRequires:  ocaml >= 4.08
BuildRequires:  ocaml-csexp-devel >= 1.5.0
BuildRequires:  ocaml-pp-devel >= 1.1.0
BuildRequires:  %{py3_dist sphinx}
BuildRequires:  %{py3_dist sphinx-rtd-theme}

%if %{with lwt}
BuildRequires:  ocaml-lwt-devel
%endif

# Dune has vendored deps to avoid dependency cycles.  Upstream deliberately
# does not support unbundling these dependencies.
# See https://github.com/ocaml/dune/issues/220
Provides:       bundled(ocaml-build-path-prefix-map) = 0.2
Provides:       bundled(ocaml-cmdliner) = 1.0.4
Provides:       bundled(ocaml-incremental-cycles) = 1e2030a5d5183d84561cde142eecca40e03db2a3
Provides:       bundled(ocaml-inotify) = 2.3
Provides:       bundled(ocaml-opam-file-format) = 2.0.0
Provides:       bundled(ocaml-re) = 1.9.0
Provides:       bundled(ocaml-spawn) = 0.15.1

Provides:       dune = %{version}-%{release}

# This is needed for the dune-related RPM macros
Requires:       python3

# Install documentation in the main package doc directory
%global _docdir_fmt %{name}

%description
Dune is a build system designed for OCaml/Reason projects only. It focuses
on providing the user with a consistent experience and takes care of most of
the low-level details of OCaml compilation. All you have to do is provide a
description of your project and Dune will do the rest.

The scheme it implements is inspired from the one used inside Jane Street and
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        doc
Summary:        HTML documentation for %{name}
BuildArch:      noarch

%description    doc
HTML documentation for dune, a composable build system for OCaml.

%package        emacs
Summary:        Emacs support for %{name}
License:        ISC
Requires:       %{name} = %{version}-%{release}
Requires:       emacs-common >= %{?_emacs_version}%{!?_emacs_version:0}

BuildArch:      noarch

%description    emacs
The %{name}-devel package contains Emacs integration with the dune build
system, a mode to edit dune files, and flymake support for dune files.

## Dune libraries

%package        action-plugin
Summary:        API for writing dynamic dune actions
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       %{name}-glob%{?_isa} = %{version}-%{release}

%description    action-plugin
This experimental library provides an API for writing dynamic Dune
actions.  Dynamic dune actions do not need to declare their dependencies
upfront; they are instead discovered automatically during the execution
of the action.

%package        action-plugin-devel
Summary:        Development files for %{name}-action-plugin
Requires:       %{name}-action-plugin%{?_isa} = %{version}-%{release}
Requires:       %{name}-glob-devel%{?_isa} = %{version}-%{release}

%description    action-plugin-devel
The ocaml-dune-action-plugin-devel package contains libraries and
signature files for developing applications that use
ocaml-dune-action-plugin.

%package        build-info
Summary:        Embed build information in an executable
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description    build-info
The build-info library allows access to information about how an
executable was built, such as the version of the project at which it was
built or the list of statically linked libraries with their versions.
It supports reporting the version from a version control system during
development to get a precise reference of when the executable was built.

%package        build-info-devel
Summary:        Development files for %{name}-build-info
Requires:       %{name}-build-info%{?_isa} = %{version}-%{release}

%description    build-info-devel
The ocaml-dune-build-info-devel package contains libraries and signature
files for developing applications that use ocaml-dune-build-info.

%package        configurator
Summary:        Helper library for gathering system configuration
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}

%description    configurator
Dune-configurator is a small library that helps write OCaml scripts that
test features available on the system, in order to generate config.h
files for instance.  Among other things, dune-configurator allows one
to:

- test if a C program compiles
- query pkg-config
- import a #define from OCaml header files
- generate a config.h file

%package        configurator-devel
Summary:        Development files for %{name}-configurator
Requires:       %{name}-configurator%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune-devel%{?_isa} = %{version}-%{release}

# This can be removed when F40 reaches EOL
Obsoletes:      %{name}-devel < 2.9.1-4
Provides:       %{name}-devel = %{version}-%{release}

%description    configurator-devel
The ocaml-dune-configurator-devel package contains libraries and
signature files for developing applications that use
ocaml-dune-configurator.

%package        glob
Summary:        Parser and interpreter for dune language globs
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       %{name}-private-libs%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}

%description    glob
Dune-glob provides a parser and interpreter for globs as understood by
the dune language.

%package        glob-devel
Summary:        Development files for %{name}-glob
Requires:       %{name}-glob%{?_isa} = %{version}-%{release}
Requires:       %{name}-private-libs-devel%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune-devel%{?_isa} = %{version}-%{release}

%description    glob-devel
The ocaml-dune-glob-devel package contains libraries and signature files
for developing applications that use ocaml-dune-glob.

%package        private-libs
Summary:        Private dune libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}

%description    private-libs
This package contains code that is shared between various dune-xxx
packages.  However, it is not meant for public consumption and provides
no stability guarantee.

%package        private-libs-devel
Summary:        Development files for %{name}-private-libs
Requires:       %{name}-private-libs%{?_isa} = %{version}-%{release}
Requires:       ocaml-dyn-devel%{?_isa} = %{version}-%{release}

%description    private-libs-devel
The ocaml-dune-private-libs-devel package contains libraries and
signature files for other dune packages.  Do not use.

%package        rpc
Summary:        Communicate with dune using rpc
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}
Requires:       ocaml-xdg%{?_isa} = %{version}-%{release}

%description    rpc
This package contains a library used to communicate with dune over rpc.

%package        rpc-devel
Summary:        Development files for %{name}-rpc
Requires:       %{name}-rpc%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune-devel%{?_isa} = %{version}-%{release}
Requires:       ocaml-xdg-devel%{?_isa} = %{version}-%{release}

%description    rpc-devel
The ocaml-dune-rpc-devel package contains libraries and signature files
for developing applications that use ocaml-rpc.

%if %{with lwt}
%package        rpc-lwt
Summary:        Communicate with dune using rpc and Lwt
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       %{name}-rpc%{?_isa} = %{version}-%{release}

%description    rpc-lwt
This package contains a library used to communicate with dune over rpc
using Lwt.

%package        rpc-lwt-devel
Summary:        Development files for %{name}-rpc-lwt
Requires:       %{name}-rpc-lwt%{?_isa} = %{version}-%{release}
Requires:       %{name}-rpc-devel%{?_isa} = %{version}-%{release}
Requires:       ocaml-csexp-devel%{?_isa}
Requires:       ocaml-lwt-devel%{?_isa}
Requires:       ocaml-result-devel%{?_isa}

%description    rpc-lwt-devel
The ocaml-dune-rpc-lwt-devel package contains libraries and signature
files for developing applications that use ocaml-rpc-lwt.
%endif

%package        site
Summary:        Embed location information inside executables and libraries
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       %{name}-private-libs%{?_isa} = %{version}-%{release}

%description    site
This library enables embedding location information inside executables
and libraries.

%package        site-devel
Summary:        Development files for %{name}-site
Requires:       %{name}-site%{?_isa} = %{version}-%{release}
Requires:       %{name}-private-libs-devel%{?_isa} = %{version}-%{release}

%description    site-devel
The ocaml-dune-site-devel package contains libraries and signature files
for developing applications that use ocaml-dune-site.

%package     -n ocaml-chrome-trace
Summary:        Chrome trace event generation library
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description -n ocaml-chrome-trace
Library to output trace data to a file in Chrome's trace_event format.
This format is compatible with chrome trace viewer (chrome://tracing).
The trace viewer is part of the catapult project.

%package     -n ocaml-chrome-trace-devel
Summary:        Development files for ocaml-chrome-trace
Requires:       ocaml-chrome-trace%{?_isa} = %{version}-%{release}

%description -n ocaml-chrome-trace-devel
The ocaml-dyn-devel package contains libraries and signature files for
developing applications that use ocaml-dyn.

%package     -n ocaml-dyn
Summary:        Dynamic types
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-ordering%{?_isa} = %{version}-%{release}

%description -n ocaml-dyn
This library supports dynamic types in OCaml.

%package     -n ocaml-dyn-devel
Summary:        Development files for ocaml-dyn
Requires:       ocaml-dyn%{?_isa} = %{version}-%{release}
Requires:       ocaml-ordering-devel%{?_isa} = %{version}-%{release}
Requires:       ocaml-pp-devel%{?_isa}

%description -n ocaml-dyn-devel
The ocaml-dyn-devel package contains libraries and signature files for
developing applications that use ocaml-dyn.

%package     -n ocaml-fiber
Summary:        Structured concurrency library
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}

%description -n ocaml-fiber
A structured concurrency library for OCaml.

%package     -n ocaml-fiber-devel
Summary:        Development files for ocaml-fiber
Requires:       ocaml-fiber%{?_isa} = %{version}-%{release}
Requires:       ocaml-stdune-devel%{?_isa} = %{version}-%{release}

%description -n ocaml-fiber-devel
The ocaml-fiber-devel package contains libraries and signature files for
developing applications that use ocaml-fiber.

%package     -n ocaml-ocamlc-loc
Summary:        Parse OCaml compiler output into structured form
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-dyn%{?_isa} = %{version}-%{release}

%description -n ocaml-ocamlc-loc
Parse OCaml compiler output into structured form.

%package     -n ocaml-ocamlc-loc-devel
Summary:        Development files for ocaml-ocamlc-loc
Requires:       ocaml-ocamlc-loc%{?_isa} = %{version}-%{release}
Requires:       ocaml-dyn-devel%{?_isa} = %{version}-%{release}

%description -n ocaml-ocamlc-loc-devel
The ocaml-ordering-devel package contains libraries and signature files
for developing applications that use ocaml-ocamlc-loc.

%package     -n ocaml-ordering
Summary:        Element ordering
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description -n ocaml-ordering
Element ordering in OCaml.

%package     -n ocaml-ordering-devel
Summary:        Development files for ocaml-ordering
Requires:       ocaml-ordering%{?_isa} = %{version}-%{release}

%description -n ocaml-ordering-devel
The ocaml-ordering-devel package contains libraries and signature files
for developing applications that use ocaml-ordering.

%package     -n ocaml-stdune
Summary:        Dune's unstable standard library
Requires:       %{name}%{?_isa} = %{version}-%{release}
Requires:       ocaml-dyn%{?_isa} = %{version}-%{release}

%description -n ocaml-stdune
This package contains Dune's unstable standard library.

%package     -n ocaml-stdune-devel
Summary:        Development files for ocaml-stdune
Requires:       ocaml-stdune%{?_isa} = %{version}-%{release}
Requires:       ocaml-dyn-devel%{?_isa} = %{version}-%{release}
Requires:       ocaml-csexp-devel%{?_isa}

%description -n ocaml-stdune-devel
The ocaml-stdune-devel package contains libraries and signature files
for developing applications that use ocaml-stdune.

%package     -n ocaml-xdg
Summary:        XDG Base Directory Specification
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description -n ocaml-xdg
This package contains the XDG Base Directory Specification.

%package     -n ocaml-xdg-devel
Summary:        Development files for ocaml-xdg
Requires:       ocaml-xdg%{?_isa} = %{version}-%{release}

%description -n ocaml-xdg-devel
The ocaml-xdg-devel package contains libraries and signature files for
developing applications that use ocaml-xdg.

%prep
%autosetup -N -n dune-%{version}
%if %{without lwt}
%patch0 -p1
rm -fr otherlibs/dune-rpc-lwt dune-rpc-lwt.opam
%endif

%build
./configure \
  --bindir %{_bindir} \
  --datadir %{_datadir} \
  --docdir %{_prefix}/doc \
  --etcdir %{_sysconfdir} \
  --libdir %{ocamldir} \
  --libexecdir %{ocamldir} \
  --mandir %{_mandir} \
  --sbindir %{_sbindir}

%make_build release
%make_build doc

# We also want the libraries
# Do not use the bundled csexp and pp when building them
rm -fr vendor/{csexp,pp}
./dune.exe build %{?_smp_mflags} --verbose --release @install

%install
%make_install

# Install the libraries
./dune.exe install --destdir=%{buildroot}

# We use %%doc below
rm -fr %{buildroot}%{_prefix}/doc

# Byte compile the Emacs files
cd %{buildroot}%{_emacs_sitelispdir}
%_emacs_bytecompile *.el
cd -

# Generate %%files lists
%ocaml_files -s

%files
%license LICENSE.md
%doc CHANGES.md README.md
%{_bindir}/dune
%{_mandir}/man*/dune*

%files doc
%doc doc/_build/*

%files emacs
%{_emacs_sitelispdir}/dune*

%files action-plugin -f .ofiles-dune-action-plugin

%files action-plugin-devel -f .ofiles-dune-action-plugin-devel

%files build-info -f .ofiles-dune-build-info

%files build-info-devel -f .ofiles-dune-build-info-devel

%files configurator -f .ofiles-dune-configurator
%dir %{ocamldir}/dune/
%{ocamldir}/dune/META

%files configurator-devel -f .ofiles-dune-configurator-devel
%{ocamldir}/dune/dune-package
%{ocamldir}/dune/opam

%files glob -f .ofiles-dune-glob

%files glob-devel -f .ofiles-dune-glob-devel

%files private-libs -f .ofiles-dune-private-libs

%files private-libs-devel -f .ofiles-dune-private-libs-devel

%files rpc -f .ofiles-dune-rpc

%files rpc-devel -f .ofiles-dune-rpc-devel

%if %{with lwt}
%files rpc-lwt -f .ofiles-dune-rpc-lwt

%files rpc-lwt-devel -f .ofiles-dune-rpc-lwt-devel
%endif

%files site -f .ofiles-dune-site

%files site-devel -f .ofiles-dune-site-devel

%files -n ocaml-chrome-trace -f .ofiles-chrome-trace

%files -n ocaml-chrome-trace-devel -f .ofiles-chrome-trace-devel

%files -n ocaml-dyn -f .ofiles-dyn

%files -n ocaml-dyn-devel -f .ofiles-dyn-devel

%files -n ocaml-fiber -f .ofiles-fiber

%files -n ocaml-fiber-devel -f .ofiles-fiber-devel

%files -n ocaml-ocamlc-loc -f .ofiles-ocamlc-loc

%files -n ocaml-ocamlc-loc-devel -f .ofiles-ocamlc-loc-devel

%files -n ocaml-ordering -f .ofiles-ordering

%files -n ocaml-ordering-devel -f .ofiles-ordering-devel

%files -n ocaml-stdune -f .ofiles-stdune

%files -n ocaml-stdune-devel -f .ofiles-stdune-devel

%files -n ocaml-xdg -f .ofiles-xdg

%files -n ocaml-xdg-devel -f .ofiles-xdg-devel



%changelog
* Sun Oct 23 2022 pterjan <pterjan> 3.4.1-2.mga9
+ Revision: 1898668
- Fix broken dependency

* Thu Oct 20 2022 pterjan <pterjan> 3.4.1-1.mga9
+ Revision: 1898065
- Update to 3.4.1 and sync with Fedora

* Thu May 19 2022 pterjan <pterjan> 2.9.3-2.mga9
+ Revision: 1858894
- Rebuild for OCaml 4.14

* Sun May 15 2022 pterjan <pterjan> 2.9.3-1.mga9
+ Revision: 1858309
- Update to 2.9.3

* Tue Mar 29 2022 umeabot <umeabot> 2.9.1-2.mga9
+ Revision: 1832445
- Mageia 9 Mass Rebuild

* Tue Oct 12 2021 tv <tv> 2.9.1-1.mga9
+ Revision: 1750722
- Version 2.9.1
- OCaml 4.13.1 build

* Wed Mar 03 2021 tv <tv> 2.8.2-1.mga9
+ Revision: 1696579
- 2.8.2
- enable bootstrap
- rebuild for ocaml-4.2-12
- 2.8.2

* Mon Aug 24 2020 tv <tv> 2.7.0-1.mga8
+ Revision: 1618346
- workaround python-srpm-macros no more being installed on BS node generating SRPM
- fix build

* Tue Jun 23 2020 tv <tv> 2.6.0-1.mga8
+ Revision: 1598631
- 2.6.0

* Mon May 11 2020 tv <tv> 2.5.1-1.mga8
+ Revision: 1582884
- 2.5.1

* Tue Mar 17 2020 tv <tv> 2.4.0-1.mga8
+ Revision: 1557279
- New version 2.4.0
- Add bootstrap conditional for builds without ocaml-menhir

* Fri Feb 28 2020 umeabot <umeabot> 2.1.2-4.mga8
+ Revision: 1551457
- Rebuild for ocaml 4.10.0 final

* Thu Feb 20 2020 umeabot <umeabot> 2.1.2-3.mga8
+ Revision: 1545732
- Mageia 8 Mass Rebuild

* Wed Jan 29 2020 tv <tv> 2.1.2-2.mga8
+ Revision: 1485129
- obsolete jbuilder-doc too

* Sun Jan 19 2020 tv <tv> 2.1.2-1.mga8
+ Revision: 1481573
- imported package ocaml-dune