Version 20200211.
Dune is now used to build the package. Split the build-time and runtime parts into separate packages.
This commit is contained in:
parent
aa6456c446
commit
7b0bed3cda
@ -7,9 +7,11 @@ addFilter(r'W: spelling-error .* (parsers|validator)')
|
||||
# OCaml does this to us. We have no control over it.
|
||||
addFilter(r'ocaml-menhir[^:]+: E: missing-call-to-chdir-with-chroot')
|
||||
|
||||
# Documentation is in the main package.
|
||||
addFilter(r'ocaml-menhir-devel\.[^:]+: W: no-documentation')
|
||||
# This package is a coq addon, hence it lacks the "ocaml-" prefix
|
||||
addFilter(r'coq-menhirlib.[^:]+: W: ocaml-naming-policy-not-applied')
|
||||
|
||||
# This package has no binary bits, but must be installed in an arch-specific
|
||||
# location.
|
||||
addFilter(r'coq-menhirlib\.[^:]+: W: only-non-binary-in-usr-lib')
|
||||
# The main menhir package really is a devel package
|
||||
addFilter(r'ocaml-menhir.[^:]+: W: devel-file-in-non-devel-package')
|
||||
|
||||
# Documentation is in the doc package.
|
||||
addFilter(r'ocaml-menhirlib(-devel)?\.[^:]+: W: no-documentation')
|
||||
|
@ -1,15 +1,12 @@
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%global target native
|
||||
%else
|
||||
%global target byte
|
||||
%ifnarch %{ocaml_native_compiler}
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%bcond_with coq
|
||||
%bcond_without coq
|
||||
|
||||
Name: ocaml-menhir
|
||||
Version: 20190924
|
||||
Release: 9%{?dist}
|
||||
Version: 20200211
|
||||
Release: 1%{?dist}
|
||||
Summary: LR(1) parser generator for OCaml
|
||||
|
||||
# The generator is GPLv2
|
||||
@ -23,34 +20,54 @@ BuildRequires: coq
|
||||
BuildRequires: hevea
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: ocaml
|
||||
BuildRequires: ocaml-ocamlbuild-devel
|
||||
BuildRequires: ocaml-findlib
|
||||
BuildRequires: ocaml-dune
|
||||
BuildRequires: ocaml-odoc
|
||||
BuildRequires: tex(latex)
|
||||
BuildRequires: tex(comment.sty)
|
||||
BuildRequires: tex(moreverb.sty)
|
||||
|
||||
Requires: ocaml-menhirlib-devel%{?_isa} = %{version}-%{release}
|
||||
|
||||
# This can be removed when F32 reaches EOL
|
||||
Obsoletes: %{name}-devel < 20200211-1
|
||||
Provides: %{name}-devel = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Menhir is a LR(1) parser generator for the Objective Caml programming
|
||||
language. That is, Menhir compiles LR(1) grammar specifications down to
|
||||
OCaml code. Menhir was designed and implemented by François Pottier and
|
||||
Yann Régis-Gianas.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%package -n ocaml-menhirlib
|
||||
Summary: Runtime library for parsers produced by Menhir
|
||||
# The library is LGPLv2 with a linking exception.
|
||||
License: LGPLv2 with exceptions
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: ocaml-findlib
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and signature files
|
||||
for developing applications that use %{name}.
|
||||
%description -n ocaml-menhirlib
|
||||
This package contains the runtime library for parsers produced by Menhir.
|
||||
|
||||
%package -n ocaml-menhirlib-devel
|
||||
Summary: Development files for ocaml-menhirlib
|
||||
# The library is LGPLv2 with a linking exception.
|
||||
License: LGPLv2 with exceptions
|
||||
Requires: ocaml-menhirlib%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n ocaml-menhirlib-devel
|
||||
This ocaml-menhirlib-devel package contains libraries and signature
|
||||
files for building applications with a parser produced by Menhir.
|
||||
|
||||
%if %{with coq}
|
||||
%package -n coq-menhirlib
|
||||
Summary: Support library for verified Coq parsers produced by Menhir
|
||||
License: LGPLv3+
|
||||
Requires: coq
|
||||
Requires: coq%{?_isa}
|
||||
|
||||
%description -n coq-menhirlib
|
||||
The Menhir parser generator, in --coq mode, can produce Coq parsers.
|
||||
@ -70,64 +87,82 @@ sed -i 's/-j 0/-cflag -g -lflag -g &/' src/Makefile
|
||||
rm -fr demos/obsolete
|
||||
|
||||
%build
|
||||
make PREFIX=%{_prefix} TARGET=%{target}
|
||||
dune build %{?_smp_mflags}
|
||||
%if %{with coq}
|
||||
make -C coq-menhirlib
|
||||
make -C demos clean
|
||||
%endif
|
||||
make -C doc
|
||||
dune build %{?_smp_mflags} @doc
|
||||
|
||||
%install
|
||||
# Install
|
||||
export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml
|
||||
mkdir -p $OCAMLFIND_DESTDIR
|
||||
make install PREFIX=%{buildroot}%{_prefix} TARGET=%{target}
|
||||
rm -fr %{buildroot}%{_docdir}/menhir
|
||||
dune install --destdir=%{buildroot}
|
||||
|
||||
%if %{with coq}
|
||||
make -C coq-menhirlib install DESTDIR=%{buildroot}
|
||||
%endif
|
||||
|
||||
# The need for this went away with version 20190924, but the makefile still
|
||||
# creates it.
|
||||
rmdir %{buildroot}%{_datadir}/menhir
|
||||
# We do not want the dune markers
|
||||
find _build/default/_doc/_html -name .dune-keep -delete
|
||||
|
||||
# Remove demo files we do not want to ship
|
||||
find demos -name _build -exec rm -fr {} \+
|
||||
find demos \( -name .merlin -o -name .gitignore \) -delete
|
||||
# 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
|
||||
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
# Add missing executable bits
|
||||
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc CHANGES.md README.md doc/manual.pdf demos
|
||||
%doc CHANGES.md README.md doc/manual.pdf
|
||||
%license LICENSE
|
||||
%{_bindir}/menhir
|
||||
%{_mandir}/man1/menhir.1*
|
||||
%dir %{_libdir}/ocaml/menhirLib/
|
||||
%{_libdir}/ocaml/menhirLib/META
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmi
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmo
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmxs
|
||||
%dir %{_libdir}/ocaml/menhirSdk/
|
||||
%{_libdir}/ocaml/menhirSdk/META
|
||||
%{_libdir}/ocaml/menhirSdk/menhirSdk.cmi
|
||||
%{_libdir}/ocaml/menhirSdk/menhirSdk.cmo
|
||||
%{_libdir}/ocaml/menhirSdk/menhirSdk.cmxs
|
||||
%{_libdir}/ocaml/menhir/
|
||||
%{_libdir}/ocaml/menhirSdk/
|
||||
|
||||
%files devel
|
||||
%files doc
|
||||
%doc _build/default/_doc/_html/
|
||||
%doc _build/default/_doc/_mlds/
|
||||
%doc _build/default/_doc/_odoc/
|
||||
%license LICENSE
|
||||
|
||||
%files -n ocaml-menhirlib
|
||||
%dir %{_libdir}/ocaml/menhirLib/
|
||||
%license LICENSE
|
||||
%{_libdir}/ocaml/menhirLib/META
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cma
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmi
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmxs
|
||||
%endif
|
||||
|
||||
%files -n ocaml-menhirlib-devel
|
||||
%{_libdir}/ocaml/menhirLib/dune-package
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.a
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmx
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.ml
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmxa
|
||||
%endif
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmt
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.cmti
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.mli
|
||||
%{_libdir}/ocaml/menhirLib/menhirLib.o
|
||||
%{_libdir}/ocaml/menhirSdk/menhirSdk.cmx
|
||||
%{_libdir}/ocaml/menhirSdk/menhirSdk.o
|
||||
|
||||
%if %{with coq}
|
||||
%files -n coq-menhirlib
|
||||
%doc coq-menhirlib/CHANGES.md coq-menhirlib/README.md
|
||||
%license coq-menhirlib/LICENSE
|
||||
%{_libdir}/coq/user-contrib/MenhirLib/
|
||||
%{_libdir}/ocaml/coq-menhirlib/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Mar 25 2020 Jerry James <loganjerry@gmail.com> - 20200211-1
|
||||
- Version 20200211
|
||||
- Dune is now used to build the package
|
||||
- Split the build-time and runtime parts into separate packages
|
||||
|
||||
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 20190924-9
|
||||
- OCaml 4.10.0 final.
|
||||
- Disable Coq for 4.10.0 build.
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (menhir-20190924.tar.bz2) = bd0ec3cbd122b59d65a3797ec252f1e9af4889808aa6988270c1560df9e8f66895dfa3373166c1fb81025535b56829a936638c3f99cece7757aa01cd2dbd7d60
|
||||
SHA512 (menhir-20200211.tar.bz2) = 9b9f9d7373a914d7aea570e429b62ea94d2360f307fcba8476982985c82e19afc245a7ade49ed93c7d25cca7b976ba675235dcf9c733149548152f5482a5bc97
|
||||
|
Loading…
Reference in New Issue
Block a user