Blame ocaml-fmt.spec

850ba00
%ifnarch %{ocaml_native_compiler}
850ba00
%global debug_package %{nil}
850ba00
%endif
850ba00
850ba00
%global srcname fmt
850ba00
850ba00
Name:           ocaml-%{srcname}
226c584
Version:        0.8.9
226c584
Release:        1%{?dist}
850ba00
Summary:        OCaml Format pretty-printer combinators
850ba00
850ba00
License:        ISC
850ba00
URL:            https://erratique.ch/software/fmt
850ba00
Source0:        https://github.com/dbuenzli/fmt/archive/v%{version}/%{srcname}-%{version}.tar.gz
850ba00
# We neither need nor want the stdlib-shims package in Fedora.  It is a forward
850ba00
# compatibility package for older OCaml installations.  Patch it out instead.
850ba00
# Upstream does not want this patch until stdlib-shims is obsolete.
850ba00
Patch0:         %{name}-stdlib-shims.patch
850ba00
850ba00
BuildRequires:  ocaml >= 4.05.0
850ba00
BuildRequires:  ocaml-cmdliner-devel >= 0.9.8
850ba00
BuildRequires:  ocaml-findlib
850ba00
BuildRequires:  ocaml-ocamlbuild
850ba00
BuildRequires:  ocaml-ocamldoc
850ba00
BuildRequires:  ocaml-seq-devel
850ba00
BuildRequires:  ocaml-topkg-devel >= 0.9.0
850ba00
850ba00
%description
850ba00
Fmt exposes combinators to devise `Format` pretty-printing functions.
850ba00
850ba00
Fmt depends only on the OCaml standard library.  The optional Fmt_tty
850ba00
library that enables setting up formatters for terminal color output
850ba00
depends on the Unix library.  The optional Fmt_cli library that provides
850ba00
command line support for Fmt depends on Cmdliner.
850ba00
850ba00
%package        devel
850ba00
Summary:        Development files for %{name}
850ba00
Requires:       %{name}%{?_isa} = %{version}-%{release}
850ba00
Requires:       ocaml-seq-devel%{?_isa}
850ba00
850ba00
%description    devel
850ba00
The %{name}-devel package contains libraries and signature files for
850ba00
developing applications that use %{name}.
850ba00
850ba00
%prep
850ba00
%autosetup -n %{srcname}-%{version} -p1
850ba00
850ba00
# Topkg does watermark replacements only if run inside a git checkout.  Github
850ba00
# tarballs do not come with a .git directory.  Therefore, we do the watermark
850ba00
# replacement manually.
850ba00
for fil in $(find . -type f); do
850ba00
  sed -e 's,%%%%NAME%%%%,%{srcname},' \
850ba00
      -e 's,%%%%VERSION%%%%,v%{version},' \
850ba00
      -e 's,%%%%VERSION_NUM%%%%,%{version},' \
850ba00
      -i.orig $fil
850ba00
  touch -r $fil.orig $fil
850ba00
  rm $fil.orig
850ba00
done
850ba00
850ba00
%build
850ba00
# Build the library and the tests
850ba00
ocaml pkg/pkg.ml build --tests true --with-base-unix true --with-cmdliner true
850ba00
850ba00
# Build the documentation
850ba00
mkdir html
850ba00
ocamldoc -html -d html -I +cmdliner -I _build/src _build/src/*.mli
850ba00
850ba00
%install
850ba00
# Install the library
850ba00
mkdir -p %{buildroot}%{_libdir}/ocaml/fmt
850ba00
cp -p _build/{opam,pkg/META} %{buildroot}%{_libdir}/ocaml/fmt
850ba00
%ifarch %{ocaml_native_compiler}
850ba00
cp -a _build/src/*.{a,cma,cmi,cmt,cmti,cmx,cmxa,cmxs,mli} \
850ba00
  %{buildroot}%{_libdir}/ocaml/fmt
850ba00
%else
850ba00
cp -a _build/src/*.{cma,cmi,cmt,cmti,mli} %{buildroot}%{_libdir}/ocaml/fmt
850ba00
%endif
850ba00
850ba00
%check
850ba00
ocaml pkg/pkg.ml test
850ba00
850ba00
%files
850ba00
%doc CHANGES.md README.md
850ba00
%license LICENSE.md
850ba00
%dir %{_libdir}/ocaml/%{srcname}/
850ba00
%{_libdir}/ocaml/%{srcname}/META
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cma
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmi
850ba00
%ifarch %{ocaml_native_compiler}
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxs
850ba00
%endif
850ba00
850ba00
%files devel
850ba00
%doc html/*
850ba00
%{_libdir}/ocaml/%{srcname}/opam
850ba00
%ifarch %{ocaml_native_compiler}
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.a
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmx
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmxa
850ba00
%endif
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmt
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.cmti
850ba00
%{_libdir}/ocaml/%{srcname}/%{srcname}*.mli
850ba00
850ba00
%changelog
226c584
* Tue Nov  3 2020 Jerry James <loganjerry@gmail.com> - 0.8.9-1
226c584
- Version 0.8.9
226c584
b48a4c6
* Wed Sep 02 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-12.1
b48a4c6
- Bump release and rebuild.
b48a4c6
00de889
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-12
00de889
- OCaml 4.11.1 rebuild
00de889
f00d46c
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-11
f00d46c
- OCaml 4.11.0 rebuild
f00d46c
c16ca94
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.8-10
c16ca94
- Second attempt - Rebuilt for
c16ca94
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
c16ca94
497e446
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.8-9
497e446
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
497e446
473dc43
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-8
473dc43
- OCaml 4.11.0+dev2-2020-04-22 rebuild
473dc43
ae8b6ea
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-7
ae8b6ea
- OCaml 4.11.0 pre-release attempt 2
ae8b6ea
5526593
* Sat Apr 18 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-6
5526593
- OCaml 4.11.0 pre-release
5526593
b4191d8
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-5
b4191d8
- Update all OCaml dependencies for RPM 4.16.
b4191d8
d45af27
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-4
d45af27
- OCaml 4.10.0 final.
d45af27
39abb26
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.8-3
39abb26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
39abb26
309f217
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.8.8-2
309f217
- OCaml 4.10.0+beta1 rebuild.
309f217
850ba00
* Thu Jan  9 2020 Jerry James <loganjerry@gmail.com> - 0.8.8-1
850ba00
- Initial RPM