Version 1.6.8

- New URLs
- Add ocamlbuild subpackage for the plugin
- Build, install, and test with dune
This commit is contained in:
Jerry James 2021-12-15 10:49:29 -07:00
parent ca973a41cc
commit 8952f7cdae
3 changed files with 46 additions and 28 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/v1.6.4.tar.gz /v1.6.4.tar.gz
/v1.6.5.tar.gz /v1.6.5.tar.gz
/v1.6.6.tar.gz /v1.6.6.tar.gz
/cppo-1.6.8.tar.gz

View File

@ -1,27 +1,22 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %ifnarch %{ocaml_native_compiler}
%if !%{opt}
%global debug_package %{nil} %global debug_package %{nil}
%endif %endif
%define libname cppo
Name: ocaml-cppo Name: ocaml-cppo
Version: 1.6.6 Version: 1.6.8
Release: 14%{?dist} Release: 1%{?dist}
Summary: Equivalent of the C preprocessor for OCaml programs Summary: Equivalent of the C preprocessor for OCaml programs
License: BSD License: BSD
URL: http://mjambon.com/cppo.html URL: https://ocaml-community.github.io/cppo/
Source0: https://github.com/ocaml-community/cppo/archive/v%{version}.tar.gz Source0: https://github.com/ocaml-community/cppo/archive/v%{version}/%{libname}-%{version}.tar.gz
BuildRequires: make BuildRequires: ocaml >= 4.02.3
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib
%if !%{opt}
Requires: ocaml >= 3.10.0
%endif
BuildRequires: ocaml-ocamlbuild-devel
BuildRequires: ocaml-dune BuildRequires: ocaml-dune
BuildRequires: ocaml-findlib
%define libname %(sed -e 's/^ocaml-//' <<< %{name}) BuildRequires: ocaml-ocamlbuild-devel
%description %description
Cppo is an equivalent of the C preprocessor targeted at the OCaml Cppo is an equivalent of the C preprocessor targeted at the OCaml
@ -38,37 +33,59 @@ on the standard parsing tools Ocamllex and Ocamlyacc, which contribute
to the robustness of cppo across OCaml versions. to the robustness of cppo across OCaml versions.
%package ocamlbuild
Summary: Preprocessing plugin for ocamlbuild
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: ocaml-ocamlbuild%{?_isa}
# There is no devel subpackage because this package IS for development purposes
%description ocamlbuild
This package contains a plugin for ocamlbuild that enables calling cppo
at build time. To use it, call ocamlbuild with the argument
`-plugin-tag package(cppo_ocamlbuild)`.
%prep %prep
%setup -q -n %{libname}-%{version} %autosetup -n %{libname}-%{version}
sed -i.add-debuginfo \
's/ocamlopt/ocamlopt -g/;s/ocamlc \(-[co]\)/ocamlc -g \1/' \
Makefile
%build %build
make %{?_smp_mflags} all dune build %{?_smp_mflags} --verbose --profile release
%install %install
%{__install} -d $RPM_BUILD_ROOT%{_bindir} dune install --destdir=%{buildroot}
%{__install} -p _build/install/default/bin/cppo $RPM_BUILD_ROOT%{_bindir}/
# 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
%check %check
%ifnarch %{arm} %{power64} dune runtest --profile release
# Fails on armv7hl and ppc64le with:
# Error: math error
make test
%endif
%files %files
%license LICENSE.md %license LICENSE.md
%doc Changes README.md %doc Changes README.md
%{_bindir}/cppo %{_bindir}/cppo
%{_libdir}/ocaml/cppo
%files ocamlbuild
%{_libdir}/ocaml/cppo_ocamlbuild/
%changelog %changelog
* Tue Dec 14 2021 Jerry James <loganjerry@gmail.com> - 1.6.8-1
- Version 1.6.8
- New URLs
- Add ocamlbuild subpackage for the plugin
- Build, install, and test with dune
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 1.6.6-14 * Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 1.6.6-14
- OCaml 4.13.1 build - OCaml 4.13.1 build

View File

@ -1 +1 @@
SHA512 (v1.6.6.tar.gz) = 80b0d7a5f0f5b7d9d62ddfb204ebf5e3216c2926ba7f667b9ef10981de6a51cd6d670b7062769bf6fbdd163c1c8fb5426a74c31234ddc03ec94a75645bf469da SHA512 (cppo-1.6.8.tar.gz) = 069bbe0ef09c03b0dc4b5795f909c3ef872fe99c6f1e6704a0fa97594b1570b3579226ec67fe11d696ccc349a4585055bbaf07c65eff423aa45af28abf38c858