ocaml-ppx-tools/ocaml-ppx-tools.spec

175 lines
4.6 KiB
RPMSpec
Raw Normal View History

2020-02-12 02:26:37 +00:00
%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif
2021-03-01 14:47:39 +00:00
# Documentation adds a circular dependency, so by
# default we build without.
%bcond_with doc
2020-02-12 02:26:37 +00:00
%global srcname ppx-tools
%global upname ppx_tools
Name: ocaml-%{srcname}
2020-12-08 20:27:05 +00:00
Version: 6.3
2021-03-01 12:17:36 +00:00
Release: 4%{?dist}
2020-02-12 02:26:37 +00:00
Summary: Tools for authors of ppx rewriters
License: MIT
URL: https://github.com/ocaml-ppx/%{upname}
Source0: %{url}/archive/%{version}/%{upname}-%{version}.tar.gz
2020-02-12 02:26:37 +00:00
BuildRequires: ocaml >= 4.08.0
2020-12-08 20:27:05 +00:00
BuildRequires: ocaml-cppo
2020-02-12 03:13:07 +00:00
BuildRequires: ocaml-dune >= 1.6
2021-03-01 14:47:39 +00:00
%if %{with doc}
2020-02-12 03:13:07 +00:00
BuildRequires: ocaml-odoc
2021-03-01 14:47:39 +00:00
%endif
2020-02-12 02:26:37 +00:00
%description
Tools for authors of syntactic tools (such as ppx rewriters).
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
2021-03-01 14:47:39 +00:00
%if %{with doc}
2020-02-12 03:13:07 +00:00
%package doc
Summary: Documentation for %{name}
BuildArch: noarch
%description doc
Documentation for %{name}.
2021-03-01 14:47:39 +00:00
%endif
2020-02-12 03:13:07 +00:00
2020-02-12 02:26:37 +00:00
%prep
%autosetup -n %{upname}-%{version}
2020-02-12 02:26:37 +00:00
%build
2020-02-12 03:13:07 +00:00
dune build %{?_smp_mflags}
2021-03-01 14:47:39 +00:00
%if %{with doc}
2020-02-12 03:13:07 +00:00
dune build %{?_smp_mflags} @doc
2021-03-01 14:47:39 +00:00
%endif
2020-02-12 02:26:37 +00:00
%install
2020-02-12 03:13:07 +00:00
dune install --destdir=%{buildroot}
2021-03-01 14:47:39 +00:00
%if %{with doc}
2020-02-12 03:13:07 +00:00
# We do not want the dune markers
find _build/default/_doc/_html -name .dune-keep -delete
2021-03-01 14:47:39 +00:00
%endif
2020-02-12 03:13:07 +00:00
# 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
%check
dune runtest
2020-02-12 02:26:37 +00:00
%files
%doc README.md
%license LICENSE
%dir %{_libdir}/ocaml/%{upname}/
2020-02-12 03:13:07 +00:00
%dir %{_libdir}/ocaml/%{upname}/ast_lifter/
%dir %{_libdir}/ocaml/%{upname}/metaquot/
2020-02-12 02:26:37 +00:00
%{_libdir}/ocaml/%{upname}/META
%{_libdir}/ocaml/%{upname}/dumpast
%{_libdir}/ocaml/%{upname}/genlifter
%{_libdir}/ocaml/%{upname}/ppx_metaquot
%{_libdir}/ocaml/%{upname}/rewriter
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/metaquot/ppx.exe
2020-02-12 02:26:37 +00:00
%{_libdir}/ocaml/%{upname}/*.cma
%{_libdir}/ocaml/%{upname}/*.cmi
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/*/*.cma
%{_libdir}/ocaml/%{upname}/*/*.cmi
2020-02-12 02:26:37 +00:00
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{upname}/*.cmxs
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/*/*.cmxs
2020-02-12 02:26:37 +00:00
%endif
%files devel
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/dune-package
2020-02-12 02:26:37 +00:00
%{_libdir}/ocaml/%{upname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{upname}/*.a
%{_libdir}/ocaml/%{upname}/*.cmx
%{_libdir}/ocaml/%{upname}/*.cmxa
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/*/*.a
%{_libdir}/ocaml/%{upname}/*/*.cmx
%{_libdir}/ocaml/%{upname}/*/*.cmxa
2020-02-12 02:26:37 +00:00
%endif
%{_libdir}/ocaml/%{upname}/*.cmt
%{_libdir}/ocaml/%{upname}/*.cmti
%{_libdir}/ocaml/%{upname}/*.mli
2020-02-12 03:13:07 +00:00
%{_libdir}/ocaml/%{upname}/*/*.cmt
2021-03-01 14:47:39 +00:00
%if %{with doc}
2020-02-12 03:13:07 +00:00
%files doc
%doc _build/default/_doc/_html/
%doc _build/default/_doc/_mlds/
%doc _build/default/_doc/_odoc/
%license LICENSE
2021-03-01 14:47:39 +00:00
%endif
2020-02-12 02:26:37 +00:00
%changelog
2021-03-01 12:17:36 +00:00
* Mon Mar 1 12:17:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 6.3-4
- OCaml 4.12.0 build
2021-03-01 14:47:39 +00:00
- Make the -doc subpackage conditional.
2021-03-01 12:17:36 +00:00
2021-02-21 20:42:50 +00:00
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 6.3-3
- Bump and rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2020-12-08 20:27:05 +00:00
* Mon Dec 7 2020 Jerry James <loganjerry@gmail.com> - 6.3-1
- Version 6.3
2020-09-01 22:56:07 +00:00
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 6.2-4
- OCaml 4.11.1 rebuild
2020-08-22 05:41:24 +00:00
* Sat Aug 22 2020 Richard W.M. Jones <rjones@redhat.com> - 6.2-3
- Bump and rebuild
2020-08-21 21:20:58 +00:00
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 6.2-2
- OCaml 4.11.0 rebuild
* Wed Aug 5 2020 Jerry James <loganjerry@gmail.com> - 6.2-1
- Version 6.2
- Drop upstreamed ppx_tools-6.1-ocaml-4.11.patch
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-7
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2020-05-05 14:51:49 +00:00
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 6.1-5
- OCaml 4.11.0+dev2-2020-04-22 rebuild
2020-04-22 14:18:56 +00:00
* Wed Apr 22 2020 Richard W.M. Jones <rjones@redhat.com> - 6.1-4
- OCaml 4.11.0 pre-release attempt 2
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 6.1-3
- Update all OCaml dependencies for RPM 4.16.
2020-03-04 16:42:28 +00:00
* Wed Mar 4 2020 Jerry James <loganjerry@gmail.com> - 6.1-2
- OCaml 4.10.0 final
2020-02-12 03:13:07 +00:00
* Wed Feb 12 2020 Jerry James <loganjerry@gmail.com> - 6.1-1
- Version 6.1
2020-02-12 02:26:37 +00:00
* Wed Feb 5 2020 Jerry James <loganjerry@gmail.com> - 5.3-1
- Initial RPM