Version 1.6.8
- New URLs - Add ocamlbuild subpackage for the plugin - Build, install, and test with dune
This commit is contained in:
parent
ca973a41cc
commit
8952f7cdae
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
||||
/v1.6.4.tar.gz
|
||||
/v1.6.5.tar.gz
|
||||
/v1.6.6.tar.gz
|
||||
/cppo-1.6.8.tar.gz
|
||||
|
@ -1,27 +1,22 @@
|
||||
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||
%if !%{opt}
|
||||
%ifnarch %{ocaml_native_compiler}
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%define libname cppo
|
||||
|
||||
Name: ocaml-cppo
|
||||
Version: 1.6.6
|
||||
Release: 14%{?dist}
|
||||
Version: 1.6.8
|
||||
Release: 1%{?dist}
|
||||
Summary: Equivalent of the C preprocessor for OCaml programs
|
||||
|
||||
License: BSD
|
||||
URL: http://mjambon.com/cppo.html
|
||||
Source0: https://github.com/ocaml-community/cppo/archive/v%{version}.tar.gz
|
||||
URL: https://ocaml-community.github.io/cppo/
|
||||
Source0: https://github.com/ocaml-community/cppo/archive/v%{version}/%{libname}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: ocaml >= 3.10.0
|
||||
BuildRequires: ocaml-findlib
|
||||
%if !%{opt}
|
||||
Requires: ocaml >= 3.10.0
|
||||
%endif
|
||||
BuildRequires: ocaml-ocamlbuild-devel
|
||||
BuildRequires: ocaml >= 4.02.3
|
||||
BuildRequires: ocaml-dune
|
||||
|
||||
%define libname %(sed -e 's/^ocaml-//' <<< %{name})
|
||||
BuildRequires: ocaml-findlib
|
||||
BuildRequires: ocaml-ocamlbuild-devel
|
||||
|
||||
%description
|
||||
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.
|
||||
|
||||
|
||||
%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
|
||||
%setup -q -n %{libname}-%{version}
|
||||
sed -i.add-debuginfo \
|
||||
's/ocamlopt/ocamlopt -g/;s/ocamlc \(-[co]\)/ocamlc -g \1/' \
|
||||
Makefile
|
||||
%autosetup -n %{libname}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
make %{?_smp_mflags} all
|
||||
dune build %{?_smp_mflags} --verbose --profile release
|
||||
|
||||
|
||||
%install
|
||||
%{__install} -d $RPM_BUILD_ROOT%{_bindir}
|
||||
%{__install} -p _build/install/default/bin/cppo $RPM_BUILD_ROOT%{_bindir}/
|
||||
dune install --destdir=%{buildroot}
|
||||
|
||||
# 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
|
||||
%ifnarch %{arm} %{power64}
|
||||
# Fails on armv7hl and ppc64le with:
|
||||
# Error: math error
|
||||
make test
|
||||
%endif
|
||||
dune runtest --profile release
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%doc Changes README.md
|
||||
%{_bindir}/cppo
|
||||
%{_libdir}/ocaml/cppo
|
||||
|
||||
|
||||
%files ocamlbuild
|
||||
%{_libdir}/ocaml/cppo_ocamlbuild/
|
||||
|
||||
|
||||
%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
|
||||
- OCaml 4.13.1 build
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (v1.6.6.tar.gz) = 80b0d7a5f0f5b7d9d62ddfb204ebf5e3216c2926ba7f667b9ef10981de6a51cd6d670b7062769bf6fbdd163c1c8fb5426a74c31234ddc03ec94a75645bf469da
|
||||
SHA512 (cppo-1.6.8.tar.gz) = 069bbe0ef09c03b0dc4b5795f909c3ef872fe99c6f1e6704a0fa97594b1570b3579226ec67fe11d696ccc349a4585055bbaf07c65eff423aa45af28abf38c858
|
||||
|
Loading…
Reference in New Issue
Block a user