2021-03-26 22:21:22 +00:00
|
|
|
%ifnarch %{ocaml_native_compiler}
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%endif
|
2019-03-06 13:30:07 +00:00
|
|
|
|
2021-03-26 22:21:22 +00:00
|
|
|
%global srcname merlin
|
2019-03-06 13:30:07 +00:00
|
|
|
|
2021-03-26 22:21:22 +00:00
|
|
|
Name: ocaml-%{srcname}
|
|
|
|
Version: 4.1
|
|
|
|
Release: 2%{?dist}
|
|
|
|
Summary: Context sensitive completion for OCaml
|
|
|
|
|
|
|
|
# The entire source is MIT except:
|
|
|
|
# - QPL: src/ocaml/driver/pparse.ml{,i}
|
|
|
|
# - QPL: src/ocaml/preprocess/lexer_ident.mll
|
|
|
|
# - QPL: src/ocaml/preprocess/lexer_raw.ml{i,l}
|
|
|
|
# - LGPLv2 with exceptions: src/ocaml/preprocess/parser_raw.mly
|
|
|
|
# - LGPLv2 with exceptions: upstream/ocaml_411/parsing/parser.mly
|
|
|
|
# - LGPLv2 with exceptions: upstream/ocaml_412/parsing/parser.mly
|
|
|
|
#
|
|
|
|
# The final license is due to the linking exception on the LGPLv2 files.
|
2019-03-06 13:30:07 +00:00
|
|
|
License: MIT and QPL
|
2021-03-26 22:21:22 +00:00
|
|
|
URL: https://ocaml.github.io/%{srcname}/
|
|
|
|
Source0: https://github.com/ocaml/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
# Fix the tests to work with /usr/lib64 as well as /usr/lib
|
|
|
|
Patch0: %{name}-test-lib64.patch
|
|
|
|
# Update the Emacs interface for recent changes to emacs-iedit
|
|
|
|
Patch1: %{name}-iedit.patch
|
2019-03-06 13:30:07 +00:00
|
|
|
|
2021-03-26 22:21:22 +00:00
|
|
|
BuildRequires: emacs
|
|
|
|
BuildRequires: emacs-auto-complete
|
|
|
|
BuildRequires: emacs-company-mode
|
|
|
|
BuildRequires: emacs-iedit
|
|
|
|
BuildRequires: emacs-tuareg
|
|
|
|
BuildRequires: jq
|
|
|
|
BuildRequires: ocaml >= 4.11.1
|
2019-03-06 13:30:07 +00:00
|
|
|
BuildRequires: ocaml-biniou-devel
|
2021-03-26 22:21:22 +00:00
|
|
|
BuildRequires: ocaml-caml-mode
|
|
|
|
BuildRequires: ocaml-csexp-devel >= 1.2.3
|
|
|
|
BuildRequires: ocaml-dune >= 2.7.0
|
2019-03-06 13:30:07 +00:00
|
|
|
BuildRequires: ocaml-easy-format-devel
|
2021-03-26 22:21:22 +00:00
|
|
|
BuildRequires: ocaml-findlib-devel >= 1.6.0
|
|
|
|
BuildRequires: ocaml-menhir-devel
|
|
|
|
BuildRequires: ocaml-odoc
|
|
|
|
BuildRequires: ocaml-result-devel >= 1.5
|
|
|
|
BuildRequires: ocaml-source
|
|
|
|
BuildRequires: ocaml-yojson-devel >= 1.6.0
|
2019-03-06 13:30:07 +00:00
|
|
|
BuildRequires: vim-enhanced
|
2021-03-26 22:21:22 +00:00
|
|
|
|
|
|
|
Requires: dot-merlin-reader%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
%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 -n dot-merlin-reader
|
|
|
|
Summary: Merlin configuration file reader
|
|
|
|
|
|
|
|
%description -n dot-merlin-reader
|
|
|
|
This package contains a helper process that reads .merlin files and gives
|
|
|
|
the normalized content to merlin.
|
|
|
|
|
|
|
|
%package -n emacs-merlin
|
|
|
|
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
|
|
|
|
Recommends: emacs-tuareg
|
|
|
|
|
|
|
|
%description -n emacs-merlin %_desc
|
|
|
|
|
|
|
|
This package contains the Emacs interface to merlin.
|
|
|
|
|
|
|
|
%package -n vim-merlin
|
|
|
|
Summary: Context sensitive completion for OCaml in Vim
|
|
|
|
BuildArch: noarch
|
|
|
|
Requires: ocaml-merlin = %{version}-%{release}
|
2019-03-06 13:30:07 +00:00
|
|
|
Requires: vim-filesystem
|
|
|
|
|
2021-03-26 22:21:22 +00:00
|
|
|
%description -n vim-merlin %_desc
|
2019-03-06 13:30:07 +00:00
|
|
|
|
2021-03-26 22:21:22 +00:00
|
|
|
This package contains the Vim interface to merlin.
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
%prep
|
2021-03-26 22:21:22 +00:00
|
|
|
%autosetup -n %{srcname}-%{version} -p1
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
%build
|
2021-03-26 22:21:22 +00:00
|
|
|
dune build %{_smp_mflags}
|
|
|
|
dune build %{_smp_mflags} @doc
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
%install
|
2021-03-26 22:21:22 +00:00
|
|
|
dune install --destdir=%{buildroot}
|
|
|
|
|
|
|
|
# We do not want the dune markers
|
|
|
|
find _build/default/_doc/_html -name .dune-keep -delete
|
|
|
|
|
|
|
|
# We do not want the ml files
|
|
|
|
find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
|
|
|
|
|
|
|
|
# We install the documentation with the doc macro
|
|
|
|
rm -fr %{buildroot}%{_prefix}/doc
|
|
|
|
|
|
|
|
%ifarch %{ocaml_native_compiler}
|
|
|
|
# Add missing executable bits
|
|
|
|
find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
|
|
|
|
%endif
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
# Reinstall vim files to Fedora default location
|
|
|
|
mkdir -p %{buildroot}%{vimfiles_root}
|
2021-03-26 22:21:22 +00:00
|
|
|
mv %{buildroot}%{_datadir}/%{srcname}/vim/* %{buildroot}%{vimfiles_root}
|
|
|
|
rm -fr %{buildroot}%{_datadir}/%{srcname}
|
|
|
|
|
|
|
|
# Generate the autoload file for the Emacs interface and byte compile
|
|
|
|
cd %{buildroot}%{_emacs_sitelispdir}
|
|
|
|
emacs -batch --no-init-file --no-site-file \
|
|
|
|
--eval "(progn (setq generated-autoload-file \"$PWD/merlin-autoloads.el\" backup-inhibited t) (update-directory-autoloads \".\"))"
|
|
|
|
mkdir -p %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
mv merlin-autoloads.el %{buildroot}%{_emacs_sitestartdir}
|
|
|
|
%_emacs_bytecompile *.el
|
|
|
|
cd -
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
%check
|
2021-03-26 22:21:22 +00:00
|
|
|
dune runtest
|
2019-03-06 13:30:07 +00:00
|
|
|
|
|
|
|
%files
|
2021-03-26 22:21:22 +00:00
|
|
|
%doc featuremap.* CHANGES.md README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/ocamlmerlin
|
|
|
|
%{_bindir}/ocamlmerlin-server
|
|
|
|
%{_libdir}/ocaml/%{srcname}/
|
|
|
|
|
|
|
|
%files -n dot-merlin-reader
|
2019-12-01 12:30:47 +00:00
|
|
|
%license LICENSE
|
2021-03-26 22:21:22 +00:00
|
|
|
%{_bindir}/dot-merlin-reader
|
|
|
|
%{_libdir}/ocaml/dot-merlin-reader/
|
|
|
|
|
|
|
|
%files -n emacs-merlin
|
|
|
|
%{_emacs_sitelispdir}/merlin*
|
|
|
|
%{_emacs_sitestartdir}/merlin-autoloads.el
|
|
|
|
|
|
|
|
%files -n vim-merlin
|
2019-03-06 13:30:07 +00:00
|
|
|
%{vimfiles_root}/*/*
|
|
|
|
|
|
|
|
%changelog
|
2021-03-26 22:21:22 +00:00
|
|
|
* Fri Mar 26 2021 Jerry James <loganjerry@gmail.com> - 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
|
|
|
|
|
2021-03-01 18:22:36 +00:00
|
|
|
* Mon Mar 1 2021 Richard W.M. Jones <rjones@redhat.com> - 4.1-1
|
|
|
|
- New upstream version 4.1.
|
2021-03-01 17:25:38 +00:00
|
|
|
- OCaml 4.12.0 build
|
|
|
|
|
2021-01-26 22:00:20 +00:00
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7-0.4.preview1
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
2020-09-01 19:58:19 +00:00
|
|
|
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 3.3.7-0.3.preview1
|
|
|
|
- OCaml 4.11.1 rebuild
|
|
|
|
|
2020-08-21 11:55:28 +00:00
|
|
|
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 3.3.7-0.2.preview1
|
|
|
|
- OCaml 4.11.0 rebuild
|
|
|
|
|
2020-08-06 16:34:43 +00:00
|
|
|
* Fri Aug 7 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.7-0.1.preview1
|
|
|
|
- Update to 3.3.7-preview1
|
|
|
|
|
2020-08-01 06:39:04 +00:00
|
|
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.4-3
|
|
|
|
- Second attempt - Rebuilt for
|
|
|
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-07-28 12:12:21 +00:00
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.4-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
2020-04-18 02:00:38 +00:00
|
|
|
* Sat Apr 18 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.4-1
|
|
|
|
- Update to 3.3.4 final
|
|
|
|
|
2020-03-03 02:35:21 +00:00
|
|
|
* Tue Mar 3 2020 Robin Lee <cheeselee@fedoraproject.org> - 3.3.4-0.1.preview1
|
|
|
|
- Update to 3.3.4-preview1, supports OCaml 4.10 (BZ#1799817, BZ#1809312)
|
|
|
|
|
2020-01-29 19:38:43 +00:00
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.3-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
2019-12-01 12:30:47 +00:00
|
|
|
* Sun Dec 1 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.3-1
|
|
|
|
- Release 3.3.3 (RHBZ#1778280)
|
|
|
|
- Fix Release tag (RHBZ#1777835)
|
|
|
|
|
2019-08-03 02:20:00 +00:00
|
|
|
* Sat Aug 3 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.2-1
|
|
|
|
- Update to 3.3.2
|
|
|
|
|
2019-07-25 22:55:24 +00:00
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-06-28 10:21:12 +00:00
|
|
|
* Fri Jun 28 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.3.1-1
|
|
|
|
- Update to 3.3.1 (BZ#1703452)
|
|
|
|
|
2019-03-31 14:02:46 +00:00
|
|
|
* Sun Mar 31 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.2.2-2
|
|
|
|
- Fix ocaml library path
|
|
|
|
|
2019-03-06 13:30:07 +00:00
|
|
|
* Fri Mar 1 2019 Robin Lee <cheeselee@fedoraproject.org> - 3.2.2-1
|
|
|
|
- Initial packaging
|