## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Bump # OCaml packages not built on i686 since OCaml 5 / Fedora 39. ExcludeArch: %{ix86} %global ocamlver 502 %global giturl https://github.com/ocaml/merlin Name: ocaml-merlin Version: 5.3 Release: %autorelease Summary: Context sensitive completion for OCaml # The entire source is MIT except: # QPL-1.0: # - src/ocaml/driver/pparse.ml{,i} # - src/ocaml/preprocess/lexer_ident.mll # - src/ocaml/preprocess/lexer_raw.ml{i,l} # LGPL-2.1-only WITH OCaml-LGPL-linking-exception # - src/ocaml/preprocess/parser_raw.mly # - upstream/ocaml_413/parsing/parser.mly # - upstream/ocaml_413/utils/domainstate.ml{,i}.c # - upstream/ocaml_414/parsing/parser.mly # - upstream/ocaml_414/utils/domainstate.ml{,i}.c License: MIT AND QPL-1.0 AND LGPL-2.1-only WITH OCaml-LGPL-linking-exception URL: https://ocaml.github.io/merlin/ VCS: git:%{giturl}.git Source: %{giturl}/releases/download/v%{version}-%{ocamlver}/merlin-%{version}-%{ocamlver}.tbz # Fix the tests to work with /usr/lib64 as well as /usr/lib Patch: 0001-Use-usr-lib64-for-Fedora.patch # Permit building with OCaml 5.3 Patch: %{name}-ocaml5.3.patch BuildRequires: emacs BuildRequires: emacs-auto-complete BuildRequires: emacs-company-mode BuildRequires: emacs-iedit BuildRequires: jq BuildRequires: ocaml >= 5.2 BuildRequires: ocaml-alcotest-devel >= 1.3.0 BuildRequires: ocaml-caml-mode BuildRequires: ocaml-csexp-devel >= 1.5.1 BuildRequires: ocaml-dune >= 3.0.0 BuildRequires: ocaml-findlib-devel >= 1.6.0 BuildRequires: ocaml-menhir >= 20201216 BuildRequires: ocaml-ppxlib-devel BuildRequires: ocaml-source BuildRequires: ocaml-yojson-devel >= 2.0.0 BuildRequires: vim-enhanced Requires: %{name}-lib%{?_isa} = %{version}-%{release} Requires: dot-merlin-reader%{?_isa} = %{version}-%{release} Requires: ocaml-index%{?_isa} = %{version}-%{release} Recommends: ocaml-source %global _desc %{expand: Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more.} %description %_desc You should also install a package that integrates with your editor of choice, such as emacs-merlin or vim-merlin. %package lib Summary: Library access to the merlin protocol Requires: ocaml-csexp-devel%{?_isa} %description lib These libraries provides access to low-level compiler interfaces and the standard higher-level merlin protocol. The library is provided as-is, is not thoroughly documented, and its public API might break with any new release. %package -n dot-merlin-reader License: MIT Summary: Merlin configuration file reader Requires: %{name}-lib%{?_isa} = %{version}-%{release} %description -n dot-merlin-reader This package contains a helper process that reads .merlin files and gives the normalized content to merlin. %package -n ocaml-index License: MIT Summary: Tool that indexes value usages from cmt files Requires: %{name}-lib%{?_isa} = %{version}-%{release} %description -n ocaml-index This package contains a tool that indexes value usages from cmt files. It should integrate with the build system to index a codebase and allow tools such as Merlin to perform project-wide occurrence queries. %package -n emacs-merlin License: MIT Summary: Context sensitive completion for OCaml in Emacs BuildArch: noarch Requires: ocaml-merlin = %{version}-%{release} Requires: emacs(bin) >= %{?_emacs_version}%{!?_emacs_version:0} Requires: emacs-caml-mode Recommends: emacs-auto-complete Recommends: emacs-company-mode Recommends: emacs-iedit %description -n emacs-merlin %_desc This package contains the Emacs interface to merlin. %package -n vim-merlin License: MIT Summary: Context sensitive completion for OCaml in Vim BuildArch: noarch Requires: ocaml-merlin = %{version}-%{release} Requires: vim-filesystem %description -n vim-merlin %_desc This package contains the Vim interface to merlin. %prep %autosetup -n merlin-%{version}-%{ocamlver} -p1 %build %dune_build @install %install %dune_install -s -n # Reinstall vim files to Fedora default location mkdir -p %{buildroot}%{vimfiles_root} mv %{buildroot}%{_datadir}/merlin/vim/* %{buildroot}%{vimfiles_root} rm -fr %{buildroot}%{_datadir}/merlin # Generate the autoload file for the Emacs interface and byte compile cd %{buildroot}%{_emacs_sitelispdir} emacs -batch --no-init-file --no-site-file \ --eval "(let ((backup-inhibited t)) (loaddefs-generate \".\" \"$PWD/merlin-loaddefs.el\"))" mkdir -p %{buildroot}%{_emacs_sitestartdir} mv merlin-loaddefs.el %{buildroot}%{_emacs_sitestartdir} %_emacs_bytecompile *.el cd - %check %dune_check %files %doc featuremap.* CHANGES.md README.md %{_bindir}/ocamlmerlin %{_bindir}/ocamlmerlin-server %{ocamldir}/merlin/ %files lib -f .ofiles-merlin-lib %license LICENSE %files -n dot-merlin-reader -f .ofiles-dot-merlin-reader %files -n emacs-merlin %{_emacs_sitelispdir}/merlin* %{_emacs_sitestartdir}/merlin-loaddefs.el %files -n ocaml-index -f .ofiles-ocaml-index %files -n vim-merlin %{vimfiles_root}/*/* %changelog ## START: Generated by rpmautospec * Thu Dec 26 2024 Jerry James - 5.3-1 - Uncommitted changes * Fri Sep 27 2024 Jerry James - 5.2.1-1 - Version 5.2.1 * Fri Sep 27 2024 Jerry James - 5.2-1 - Version 5.2 - New ocaml-index subpackage - Add test dependency on ocaml-alcotest * Fri Aug 9 2024 Jerry James - 5.1-4 - Generate loaddefs instead of deprecated autoloads * Mon Aug 5 2024 Jerry James - 5.1-3 - Rebuild for ocaml-menhir 20240715, ocaml-ppxlib 0.33.0 and ocaml-yojson 2.2.2 * Thu Jul 18 2024 Fedora Release Engineering - 5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jun 24 2024 Jerry James - 5.1-1 - Version 5.1 * Wed Jun 19 2024 Richard W.M. Jones - 5.0-3 - OCaml 5.2.0 ppc64le fix * Wed May 29 2024 Richard W.M. Jones - 5.0-2 - OCaml 5.2.0 for Fedora 41 * Thu May 23 2024 Jerry James - 5.0-1 - Version 5.0 * Thu Feb 22 2024 Jerry James - 4.14-1 - Version 4.14 * Thu Jan 25 2024 Fedora Release Engineering - 4.13.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 4.13.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Richard W.M. Jones - 4.13.1-3 - OCaml 5.1.1 + s390x code gen fix for Fedora 40 * Tue Dec 12 2023 Richard W.M. Jones - 4.13.1-2 - OCaml 5.1.1 rebuild for Fedora 40 * Mon Dec 11 2023 Jerry James - 4.13.1-1 - Version 4.13.1 * Fri Dec 1 2023 Jerry James - 4.13-1 - Version 4.13 * Thu Oct 05 2023 Richard W.M. Jones - 4.12-2 - OCaml 5.1 rebuild for Fedora 40 * Wed Oct 4 2023 Jerry James - 4.12-1 - Version 4.12 * Thu Aug 24 2023 Jerry James - 4.10-1 - Version 4.10 * Thu Jul 20 2023 Fedora Release Engineering - 4.9-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 12 2023 Richard W.M. Jones - 4.9-2 - OCaml 5.0 rebuild for Fedora 39 * Mon Jul 10 2023 Jerry James - 4.9-1 - Version 4.9 - New ocaml-merlin-lib subpackage * Tue Jan 24 2023 Richard W.M. Jones - 4.5-5 - Rebuild OCaml packages for F38 * Thu Jan 19 2023 Fedora Release Engineering - 4.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Dec 12 2022 Jerry James - 4.5-3 - Convert License tags to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 4.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jul 20 2022 Jerry James - 4.5-2 - Use new OCaml macros * Sun Jun 19 2022 Richard W.M. Jones - 4.5-2 - OCaml 4.14.0 rebuild * Wed Apr 27 2022 Jerry James - 4.5-1 - Version 4.5 * Fri Feb 04 2022 Richard W.M. Jones - 4.4-3 - OCaml 4.13.1 rebuild to remove package notes * Thu Jan 20 2022 Fedora Release Engineering - 4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Nov 23 2021 Jerry James - 4.4-1 - Version 4.4 - OCaml 4.13 is now fully supported, so drop related patches * Mon Oct 04 2021 Richard W.M. Jones - 4.3.1-2 - OCaml 4.13.1 build * Tue Jul 27 2021 Jerry James - 4.3.1-1 - Version 4.3.1 - Drop upstreamed -emacs patch * Thu Jul 22 2021 Fedora Release Engineering - 4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Apr 13 2021 Jerry James - 4.2-1 - Version 4.2 - Drop upstreamed -iedit patch - Add -emacs patch to fix various Emacs issues - Add -textrel patch to fix FTBFS on i386 * Fri Mar 26 2021 Jerry James - 4.1-2 - Fix tests on 64-bit systems with the -test-lib64 patch - Add -emacs-iedit patch to adapt to recent iedit changes - Build with auto-complete, company-mode, and caml-mode support - Add subpackages: dot-merlin-reader, emacs-merlin, and vim-merlin - Generate autoloads for the Emacs interface * Mon Mar 1 2021 Richard W.M. Jones - 4.1-1 - New upstream version 4.1. - OCaml 4.12.0 build * Tue Jan 26 2021 Fedora Release Engineering - 3.3.7-0.4.preview1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Sep 01 2020 Richard W.M. Jones - 3.3.7-0.3.preview1 - OCaml 4.11.1 rebuild * Fri Aug 21 2020 Richard W.M. Jones - 3.3.7-0.2.preview1 - OCaml 4.11.0 rebuild * Fri Aug 7 2020 Robin Lee - 3.3.7-0.1.preview1 - Update to 3.3.7-preview1 * Sat Aug 01 2020 Fedora Release Engineering - 3.3.4-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 3.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sat Apr 18 2020 Robin Lee - 3.3.4-1 - Update to 3.3.4 final * Tue Mar 3 2020 Robin Lee - 3.3.4-0.1.preview1 - Update to 3.3.4-preview1, supports OCaml 4.10 (BZ#1799817, BZ#1809312) * Wed Jan 29 2020 Fedora Release Engineering - 3.3.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Sun Dec 1 2019 Robin Lee - 3.3.3-1 - Release 3.3.3 (RHBZ#1778280) - Fix Release tag (RHBZ#1777835) * Sat Aug 3 2019 Robin Lee - 3.3.2-1 - Update to 3.3.2 * Thu Jul 25 2019 Fedora Release Engineering - 3.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Jun 28 2019 Robin Lee - 3.3.1-1 - Update to 3.3.1 (BZ#1703452) * Sun Mar 31 2019 Robin Lee - 3.2.2-2 - Fix ocaml library path * Fri Mar 1 2019 Robin Lee - 3.2.2-1 - Initial packaging ## END: Generated by rpmautospec