# OCaml packages not built on i686 since OCaml 5 / Fedora 39.
ExcludeArch: %{ix86}
%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif
Name: ocamlify
Version: 0.0.2
Release: 37%{?dist}
Summary: Include files in OCaml code
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
URL: https://github.com/gildor478/ocamlify
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# rerun `oasis setup` using OASIS 0.4.11
Patch0: oasis-setup.patch
# Changes for OCaml 5.x compatibility
Patch1: %{name}-ocaml5.patch
BuildRequires: ocaml
BuildRequires: ocaml-ocamlbuild
BuildRequires: ocaml-findlib
BuildRequires: ocaml-camlp-streams-devel
BuildRequires: help2man
%description
OCamlify allows to create OCaml source code by including whole files into
OCaml string or string list. The code generated can be compiled as a standard
OCaml file. It allows embedding external resources as OCaml code.
%prep
%autosetup -p1
# Generate debuginfo
echo true: debug >> _tags
%build
ocaml -I +camlp-streams setup.ml -configure \
--destdir $RPM_BUILD_ROOT \
--prefix %{_prefix}
ocaml -I +camlp-streams setup.ml -build
%install
ocaml -I +camlp-streams setup.ml -install
# generate manpage
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
help2man $RPM_BUILD_ROOT%{_bindir}/ocamlify \
--output $RPM_BUILD_ROOT%{_mandir}/man1/ocamlify.1 \
--name "Include files in OCaml code" \
--version-string %{version} \
--no-info
%check
ocaml -I +camlp-streams setup.ml -test
%files
%doc README.txt
%license COPYING.txt
%{_bindir}/ocamlify
%{_mandir}/man1/ocamlify.1*
%changelog
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jul 12 2023 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-36
- OCaml 5.0 rebuild for Fedora 39
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 0.0.2-35
- OCaml 5.0.0 rebuild
- Convert License tag to SPDX
- New project URLs
- Generate debuginfo
- Use camlp-streams for OCaml 5.x compatibility
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-34
- Rebuild OCaml packages for F38
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jun 18 2022 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-31
- OCaml 4.14.0 rebuild
* Fri Feb 04 2022 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-30
- OCaml 4.13.1 rebuild to remove package notes
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-28
- OCaml 4.13.1 build
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Mar 1 10:09:49 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-26
- OCaml 4.12.0 build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-24
- OCaml 4.11.1 rebuild
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-23
- OCaml 4.11.0 rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 04 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-21
- OCaml 4.11.0+dev2-2020-04-22 rebuild
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-20
- OCaml 4.11.0 pre-release attempt 2
* Fri Apr 17 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-19
- OCaml 4.11.0 pre-release
* Thu Apr 02 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-18
- Update all OCaml dependencies for RPM 4.16.
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-17
- OCaml 4.10.0 final.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-15
- OCaml 4.10.0+beta1 rebuild.
* Thu Jan 09 2020 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-14
- OCaml 4.09.0 for riscv64
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-13
- OCaml 4.09.0 (final) rebuild.
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-12
- OCaml 4.08.1 (final) rebuild.
* Wed Jul 31 2019 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-11
- OCaml 4.08.1 (rc2) rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jun 27 2019 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-9
- OCaml 4.08.0 (final) rebuild.
* Mon Apr 29 2019 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-8
- OCaml 4.08.0 (beta 3) rebuild.
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 12 2018 Richard W.M. Jones <rjones@redhat.com> - 0.0.2-5
- OCaml 4.07.0 (final) rebuild.
* Mon Jun 25 2018 Andy Li <andy@onthewings.net> - 0.0.2-4
- Update oasis-setup.patch with _oasis CompiledObject set to "best" (RHBZ#1593408).
* Tue May 29 2018 Andy Li <andy@onthewings.net> - 0.0.2-3
- Apply a patch that contains the new setup.ml generated by OASIS 0.4.11 (RHBZ#1583335).
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Nov 08 2017 Andy Li <andy@onthewings.net> - 0.0.2-1
- Initial RPM release.