SHA256
1
0
forked from pool/ocaml-cppo

Accepting request 738555 from devel:languages:ocaml

- use dune macros from ocaml-rpm-macros

- Update to 1.6.6
  Fix build

OBS-URL: https://build.opensuse.org/request/show/738555
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocaml-cppo?expand=0&rev=6
This commit is contained in:
Dominique Leuenberger 2019-10-24 21:02:47 +00:00 committed by Git OBS Bridge
commit c1e056efd5
5 changed files with 30 additions and 57 deletions

View File

@ -1,9 +1,9 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/ocaml-community/cppo.git</param>
<param name="url">https://github.com/ocaml-community/cppo.git</param>
<param name="scm">git</param>
<param name="versionformat">1.6.5</param>
<param name="revision">v1.6.5</param>
<param name="versionformat">1.6.6</param>
<param name="revision">v1.6.6</param>
<param name="filename">ocaml-cppo</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:880b31a6439423010297ab7e5f020c286633466d20602583ce38064496f03cce
size 24400

3
ocaml-cppo-1.6.6.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:121a5f0922cb465e0d802c42cc143768d63c37c921fc7b4c1699b3e3619725fb
size 24848

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Sep 30 12:34:56 UTC 2019 - ohering@suse.de
- use dune macros from ocaml-rpm-macros
-------------------------------------------------------------------
Mon Sep 23 16:35:39 UTC 2019 - ohering@suse.de
- Update to 1.6.6
Fix build
-------------------------------------------------------------------
Tue Feb 19 03:21:22 UTC 2019 - andy@onthewings.net

View File

@ -18,12 +18,8 @@
#
# cppo may use opam-installer but opam requires cppo for its build.
# So here we don't use opam-installer by default.
# Build with "--with-opam" to use opam despite the circular dependency.
%bcond_with opam
Name: ocaml-cppo
Version: 1.6.5
Version: 1.6.6
Release: 0
%{?ocaml_preserve_bytecode}
Summary: The C preprocessor written in OCaml
@ -33,15 +29,11 @@ Url: https://github.com/ocaml-community/cppo
Source: %{name}-%{version}.tar.xz
BuildRequires: ocaml
BuildRequires: ocaml-dune
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-rpm-macros >= 4.03
BuildRequires: ocaml-rpm-macros >= 20191009
BuildRequires: ocamlfind(easy-format)
BuildRequires: ocamlfind(ocamlbuild)
BuildRequires: ocamlfind(str)
BuildRequires: ocamlfind(unix)
%if %{with opam}
BuildRequires: opam
%endif
%description
Cppo is an equivalent of the C preprocessor targeted at the OCaml language and
@ -66,53 +58,23 @@ The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q
%autosetup -p1
%build
dune build @install --profile release
%ocaml_dune_setup
%ocaml_dune_build
%install
%if %{with opam}
install -d %{buildroot}%{_libdir}/ocaml
dune install --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml
rm -r %{buildroot}%{_prefix}/doc
%else
# By hand, not funny
cd _build/install/default
install -d %{buildroot}%{_libdir}/ocaml/cppo{,_ocamlbuild}
install -m0644 lib/cppo/* %{buildroot}%{_libdir}/ocaml/cppo/
install -m0644 lib/cppo_ocamlbuild/* %{buildroot}%{_libdir}/ocaml/cppo_ocamlbuild/
install -d %{buildroot}%{_bindir}
install -m0755 bin/cppo %{buildroot}%{_bindir}
%endif
%ocaml_dune_install
%ocaml_create_file_list
%files
%defattr(-,root,root)
%check
%ocaml_dune_test
%files -f %{name}.files
%doc README.md
%{_bindir}/cppo
%doc LICENSE.md README.md
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/*/*.cmxs
%endif
%files devel
%defattr(-,root,root,-)
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler}
%{_libdir}/ocaml/*/*.a
%{_libdir}/ocaml/*/*.cmx
%{_libdir}/ocaml/*/*.cmxa
%endif
%{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi
%{_libdir}/ocaml/*/*.cmt
%{_libdir}/ocaml/*/*.cmti
%{_libdir}/ocaml/*/*.ml
%{_libdir}/ocaml/*/*.mli
%{_libdir}/ocaml/*/dune-package
%{_libdir}/ocaml/*/META
%{_libdir}/ocaml/*/opam
%files devel -f %{name}.files.devel
%changelog