Accepting request 677298 from devel:languages:ocaml

Update install files for ocaml-dune 1.7.1, which generates a dune-package file instead of a $PACKAGENAME.dune file. (forwarded request 677229 from onthewings)

OBS-URL: https://build.opensuse.org/request/show/677298
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocaml-cppo?expand=0&rev=5
This commit is contained in:
Yuchen Lin 2019-02-20 13:11:00 +00:00 committed by Git OBS Bridge
commit 876ea05dac
5 changed files with 73 additions and 62 deletions

View File

@ -1,9 +1,9 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/mjambon/cppo.git</param>
<param name="url">git://github.com/ocaml-community/cppo.git</param>
<param name="scm">git</param>
<param name="versionformat">1.5.0</param>
<param name="revision">v1.5.0</param>
<param name="versionformat">1.6.5</param>
<param name="revision">v1.6.5</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:0c51496820d56db2ccc815da3884592d4c5f9e7d4cbe4e307a8279583780b1da
size 23476

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

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

View File

@ -1,3 +1,39 @@
-------------------------------------------------------------------
Tue Feb 19 03:21:22 UTC 2019 - andy@onthewings.net
- Update install files for ocaml-dune 1.7.1.
-------------------------------------------------------------------
Fri Feb 8 01:35:59 UTC 2019 - andy@onthewings.net
- Remove ocaml-cppo-1.6.1-install-args.patch and directly call dune
in the install section.
-------------------------------------------------------------------
Tue Feb 5 18:39:39 UTC 2019 - andy@onthewings.net
- Update to 1.6.5:
* Fix tests.
* Fix 'asr' operator.
- Update build command for latest version of dune.
- Update upstream url (migrated to ocaml-community GitHub account).
-------------------------------------------------------------------
Mon Jun 11 09:28:49 UTC 2018 - andy@onthewings.net
- Package the .ml and .dune files produced by latest dune.
-------------------------------------------------------------------
Wed Jan 31 21:45:59 UTC 2018 - antoine.belvire@opensuse.org
- Update to 1.6.1:
* Emit line directives always containing the file name, as
mandated starting with ocaml 4.07.
- Update to 1.6.0:
* BREAKING: cppo and cppo_ocamlbuild are now two distinct opam
packages.
- Build with dune instead of oasis.
-------------------------------------------------------------------
Tue Jul 25 13:04:54 UTC 2017 - ohering@suse.de

View File

@ -1,7 +1,8 @@
#
# spec file for package ocaml-cppo
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 The openSUSE Project.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@ -17,24 +18,30 @@
#
# 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.5.0
Version: 1.6.5
Release: 0
%{?ocaml_preserve_bytecode}
Summary: The C preprocessor written in OCaml
License: BSD-3-Clause
Group: Development/Languages/OCaml
Url: https://github.com/mjambon/cppo
Url: https://github.com/ocaml-community/cppo
Source: %{name}-%{version}.tar.xz
BuildRequires: ocaml
BuildRequires: ocaml-oasis
BuildRequires: ocaml-dune
BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-rpm-macros >= 4.03
BuildRequires: ocamlfind(easy-format)
BuildRequires: ocamlfind(ocamlbuild)
BuildRequires: ocamlfind(str)
BuildRequires: ocamlfind(unix)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with opam}
BuildRequires: opam
%endif
%description
Cppo is an equivalent of the C preprocessor targeted at the OCaml language and
@ -62,60 +69,27 @@ developing applications that use %{name}.
%setup -q
%build
echo 'let cppo_version = "%{version}"' > cppo_version.ml
# obs service changes every ^Version line ...
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
OASISFormat: 0.4
Name: cppo
Version: 0
Synopsis: The C preprocessor written in OCaml
Authors: Martin Jambon
LicenseFile: LICENSE
License: %{license}
Plugins: META(`oasis version`)
BuildTools: ocamlbuild
Library ocamlbuild_cppo
Path: ocamlbuild_plugin
Modules: Ocamlbuild_cppo
Install: true
BuildDepends: ocamlbuild
Document ocamlbuild_cppo
Title: API reference for ocamlbuild_cppo
Type: ocamlbuild
BuildTools+: ocamldoc
InstallDir: \$htmldir
Install: true
XOCamlbuildPath: .
XOCamlbuildLibraries: ocamlbuild_cppo
Executable cppo
Path: .
MainIs: cppo_main.ml
CompiledObject: best
BuildDepends: unix, str
Test cppo
Type: Custom (0.0.1)
Command: ln -sfvbn \$cppo cppo ; make -C test all
Run: true
_EOF_
%oasis_setup
%ocaml_oasis_configure --enable-docs --enable-tests
%ocaml_oasis_build
%ocaml_oasis_doc
dune build @install --profile release
%install
%ocaml_oasis_findlib_install
%check
%ocaml_oasis_test
%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
%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/*
%{_bindir}/cppo
%doc LICENSE.md README.md
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler}
@ -124,7 +98,6 @@ _EOF_
%files devel
%defattr(-,root,root,-)
%{oasis_docdir_html}
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler}
@ -132,12 +105,14 @@ _EOF_
%{_libdir}/ocaml/*/*.cmx
%{_libdir}/ocaml/*/*.cmxa
%endif
%{_libdir}/ocaml/*/*.annot
%{_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
%changelog