d8650c8
%undefine _package_note_flags
48d85f4
88df21f
%ifnarch %{ocaml_native_compiler}
88df21f
%global debug_package %{nil}
88df21f
%endif
83a6896
48d85f4
%global ocamlver 414
83a6896
d69ebbe
Name:           ocaml-merlin
48d85f4
Version:        4.5
995f538
Release:        5%{?dist}
88df21f
Summary:        Context sensitive completion for OCaml
88df21f
88df21f
# The entire source is MIT except:
9f1b825
# QPL:
9f1b825
# - src/ocaml/driver/pparse.ml{,i}
9f1b825
# - src/ocaml/preprocess/lexer_ident.mll
9f1b825
# - src/ocaml/preprocess/lexer_raw.ml{i,l}
9f1b825
# LGPL-2.1-only WITH OCaml-LGPL-linking-exception
9f1b825
# - src/ocaml/preprocess/parser_raw.mly
9f1b825
# - upstream/ocaml_413/parsing/parser.mly
9f1b825
# - upstream/ocaml_413/utils/domainstate.ml{,i}.c
9f1b825
# - upstream/ocaml_414/parsing/parser.mly
9f1b825
# - upstream/ocaml_414/utils/domainstate.ml{,i}.c
9f1b825
License:        MIT AND QPL-1.0 AND LGPL-2.1-only WITH OCaml-LGPL-linking-exception
d69ebbe
URL:            https://ocaml.github.io/merlin/
d69ebbe
Source0:        https://github.com/ocaml/merlin/releases/download/v%{version}-%{ocamlver}/merlin-%{version}-%{ocamlver}.tbz
171414f
88df21f
# Fix the tests to work with /usr/lib64 as well as /usr/lib
c3459e4
Patch0001:      0001-Use-usr-lib64-for-Fedora.patch
83a6896
88df21f
BuildRequires:  emacs
88df21f
BuildRequires:  emacs-auto-complete
88df21f
BuildRequires:  emacs-company-mode
88df21f
BuildRequires:  emacs-iedit
88df21f
BuildRequires:  jq
48d85f4
BuildRequires:  ocaml >= 4.14
88df21f
BuildRequires:  ocaml-caml-mode
88df21f
BuildRequires:  ocaml-csexp-devel >= 1.2.3
b9f2d74
BuildRequires:  ocaml-dune >= 2.9.0
88df21f
BuildRequires:  ocaml-findlib-devel >= 1.6.0
b9f2d74
BuildRequires:  ocaml-menhir
88df21f
BuildRequires:  ocaml-source
88df21f
BuildRequires:  ocaml-yojson-devel >= 1.6.0
83a6896
BuildRequires:  vim-enhanced
88df21f
88df21f
Requires:       dot-merlin-reader%{?_isa} = %{version}-%{release}
88df21f
b9f2d74
Recommends:     ocaml-source
b9f2d74
88df21f
%global _desc %{expand:
88df21f
Merlin is an assistant for editing OCaml code.  It aims to provide the
88df21f
features available in modern IDEs: error reporting, auto completion,
88df21f
source browsing and much more.}
88df21f
88df21f
%description %_desc
88df21f
88df21f
You should also install a package that integrates with your editor of
88df21f
choice, such as emacs-merlin or vim-merlin.
88df21f
88df21f
%package     -n dot-merlin-reader
9f1b825
License:        MIT
88df21f
Summary:        Merlin configuration file reader
88df21f
88df21f
%description -n dot-merlin-reader
88df21f
This package contains a helper process that reads .merlin files and gives
88df21f
the normalized content to merlin.
88df21f
88df21f
%package     -n emacs-merlin
9f1b825
License:        MIT
88df21f
Summary:        Context sensitive completion for OCaml in Emacs
88df21f
BuildArch:      noarch
88df21f
Requires:       ocaml-merlin = %{version}-%{release}
88df21f
Requires:       emacs(bin) >= %{?_emacs_version}%{!?_emacs_version:0}
88df21f
Requires:       emacs-caml-mode
88df21f
88df21f
Recommends:     emacs-auto-complete
88df21f
Recommends:     emacs-company-mode
88df21f
Recommends:     emacs-iedit
88df21f
88df21f
%description -n emacs-merlin %_desc
88df21f
88df21f
This package contains the Emacs interface to merlin.
88df21f
88df21f
%package     -n vim-merlin
9f1b825
License:        MIT
88df21f
Summary:        Context sensitive completion for OCaml in Vim
88df21f
BuildArch:      noarch
88df21f
Requires:       ocaml-merlin = %{version}-%{release}
83a6896
Requires:       vim-filesystem
83a6896
88df21f
%description -n vim-merlin %_desc
83a6896
88df21f
This package contains the Vim interface to merlin.
83a6896
83a6896
%prep
d69ebbe
%autosetup -n merlin-%{version}-%{ocamlver} -p1
83a6896
83a6896
%build
d69ebbe
%dune_build @install
83a6896
83a6896
%install
d69ebbe
%dune_install -s -n
88df21f
83a6896
# Reinstall vim files to Fedora default location
83a6896
mkdir -p %{buildroot}%{vimfiles_root}
d69ebbe
mv %{buildroot}%{_datadir}/merlin/vim/* %{buildroot}%{vimfiles_root}
d69ebbe
rm -fr %{buildroot}%{_datadir}/merlin
88df21f
88df21f
# Generate the autoload file for the Emacs interface and byte compile
88df21f
cd %{buildroot}%{_emacs_sitelispdir}
88df21f
emacs -batch --no-init-file --no-site-file \
88df21f
  --eval "(progn (setq generated-autoload-file \"$PWD/merlin-autoloads.el\" backup-inhibited t) (update-directory-autoloads \".\"))"
88df21f
mkdir -p %{buildroot}%{_emacs_sitestartdir}
88df21f
mv merlin-autoloads.el %{buildroot}%{_emacs_sitestartdir}
88df21f
%_emacs_bytecompile *.el
88df21f
cd -
83a6896
83a6896
%check
d69ebbe
%dune_check
83a6896
83a6896
%files
88df21f
%doc featuremap.* CHANGES.md README.md
88df21f
%license LICENSE
88df21f
%{_bindir}/ocamlmerlin
88df21f
%{_bindir}/ocamlmerlin-server
d69ebbe
%{ocamldir}/merlin/
88df21f
88df21f
%files -n dot-merlin-reader
6dfdda1
%license LICENSE
88df21f
%{_bindir}/dot-merlin-reader
d69ebbe
%{ocamldir}/dot-merlin-reader/
88df21f
88df21f
%files -n emacs-merlin
88df21f
%{_emacs_sitelispdir}/merlin*
88df21f
%{_emacs_sitestartdir}/merlin-autoloads.el
88df21f
88df21f
%files -n vim-merlin
83a6896
%{vimfiles_root}/*/*
83a6896
83a6896
%changelog
995f538
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 4.5-5
995f538
- Rebuild OCaml packages for F38
995f538
b1a7162
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-4
b1a7162
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
b1a7162
9f1b825
* Mon Dec 12 2022 Jerry James <loganjerry@gmail.com> - 4.5-3
9f1b825
- Convert License tags to SPDX
9f1b825
9276126
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.5-3
9276126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
9276126
d69ebbe
* Wed Jul 20 2022 Jerry James <loganjerry@gmail.com> - 4.5-2
d69ebbe
- Use new OCaml macros
d69ebbe
bd3f655
* Sun Jun 19 2022 Richard W.M. Jones <rjones@redhat.com> - 4.5-2
bd3f655
- OCaml 4.14.0 rebuild
bd3f655
48d85f4
* Wed Apr 27 2022 Jerry James <loganjerry@gmail.com> - 4.5-1
48d85f4
- Version 4.5
48d85f4
d8650c8
* Fri Feb 04 2022 Richard W.M. Jones <rjones@redhat.com> - 4.4-3
d8650c8
- OCaml 4.13.1 rebuild to remove package notes
d8650c8
8ee8ba5
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.4-2
8ee8ba5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
8ee8ba5
c3459e4
* Tue Nov 23 2021 Jerry James <loganjerry@gmail.com> - 4.4-1
c3459e4
- Version 4.4
c3459e4
- OCaml 4.13 is now fully supported, so drop related patches
c3459e4
3169e0a
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 4.3.1-2
3169e0a
- OCaml 4.13.1 build
3169e0a
b9f2d74
* Tue Jul 27 2021 Jerry James <loganjerry@gmail.com> - 4.3.1-1
c3459e4
- Version 4.3.1
b9f2d74
- Drop upstreamed -emacs patch
b9f2d74
989b920
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.2-2
989b920
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
989b920
485eed3
* Tue Apr 13 2021 Jerry James <loganjerry@gmail.com> - 4.2-1
485eed3
- Version 4.2
485eed3
- Drop upstreamed -iedit patch
485eed3
- Add -emacs patch to fix various Emacs issues
5e9d9b8
- Add -textrel patch to fix FTBFS on i386
485eed3
88df21f
* Fri Mar 26 2021 Jerry James <loganjerry@gmail.com> - 4.1-2
88df21f
- Fix tests on 64-bit systems with the -test-lib64 patch
88df21f
- Add -emacs-iedit patch to adapt to recent iedit changes
88df21f
- Build with auto-complete, company-mode, and caml-mode support
88df21f
- Add subpackages: dot-merlin-reader, emacs-merlin, and vim-merlin
88df21f
- Generate autoloads for the Emacs interface
88df21f
7cfe361
* Mon Mar  1 2021 Richard W.M. Jones <rjones@redhat.com> - 4.1-1
7cfe361
- New upstream version 4.1.
0a7bfe8
- OCaml 4.12.0 build
0a7bfe8
36cc280
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7-0.4.preview1
36cc280
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
36cc280
e7b907c
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 3.3.7-0.3.preview1
e7b907c
- OCaml 4.11.1 rebuild
e7b907c
b698898
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 3.3.7-0.2.preview1
b698898
- OCaml 4.11.0 rebuild
b698898
657c481
* Fri Aug  7 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.7-0.1.preview1
657c481
- Update to 3.3.7-preview1
657c481
5ca3a81
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.4-3
5ca3a81
- Second attempt - Rebuilt for
5ca3a81
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5ca3a81
58bd923
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.4-2
58bd923
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
58bd923
e71f78f
* Sat Apr 18 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.4-1
e71f78f
- Update to 3.3.4 final
e71f78f
60c97c6
* Tue Mar  3 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.4-0.1.preview1
60c97c6
- Update to 3.3.4-preview1, supports OCaml 4.10 (BZ#1799817, BZ#1809312)
60c97c6
3fdf9a5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-2
3fdf9a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
3fdf9a5
6dfdda1
* Sun Dec  1 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.3-1
6dfdda1
- Release 3.3.3 (RHBZ#1778280)
6dfdda1
- Fix Release tag (RHBZ#1777835)
6dfdda1
c9e7ad7
* Sat Aug  3 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.2-1
c9e7ad7
- Update to 3.3.2
c9e7ad7
3cd7cd1
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-2
3cd7cd1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3cd7cd1
71ecd1d
* Fri Jun 28 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.1-1
71ecd1d
- Update to 3.3.1 (BZ#1703452)
71ecd1d
4575354
* Sun Mar 31 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.2.2-2
4575354
- Fix ocaml library path
4575354
83a6896
* Fri Mar  1 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.2.2-1
83a6896
- Initial packaging