3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 Summary: Generation of accessor and iteration functions for OCaml variant types
11 Summary(pl.UTF-8): Generowanie funkcji dostępowych i iterujących dla typów wariantowych w OCamlu
12 Name: ocaml-ppx_variants_conv
17 #Source0Download: https://github.com/janestreet/ppx_variants_conv/tags
18 Source0: https://github.com/janestreet/ppx_variants_conv/archive/v%{version}/ppx_variants_conv-%{version}.tar.gz
19 # Source0-md5: de29f93732da2fad0b221edbd763f5c1
20 URL: https://github.com/janestreet/ppx_variants_conv
21 BuildRequires: ocaml >= 1:4.04.2
22 BuildRequires: ocaml-base-devel >= 0.14
23 BuildRequires: ocaml-base-devel < 0.15
24 BuildRequires: ocaml-dune >= 2.0.0
25 BuildRequires: ocaml-ppxlib-devel >= 0.23.0
26 BuildRequires: ocaml-variantslib-devel >= 0.14
27 BuildRequires: ocaml-variantslib-devel < 0.15
28 %requires_eq ocaml-runtime
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define debug_package %{nil}
34 ppx_variants_conv is a ppx rewriter that can be used to define first
35 class values representing variant constructors, and additional
36 routines to fold, iterate and map over all constructors of a variant
39 This package contains files needed to run bytecode executables using
40 ppx_variants_conv library.
42 %description -l pl.UTF-8
43 ppx_variants_conv to moduł przepisujący ppx, który można wykorzystać
44 do definiowania pierwszoklasowych wartości reprezentujących
45 konstruktory wariantowe oraz dodatkowych funkcji do zawijania,
46 iterowania i mapowania po wszystkich konstruktorach typów
49 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
50 używających biblioteki ppx_variants_conv.
53 Summary: Generation of accessor and iteration functions for OCaml variant types - development part
54 Summary(pl.UTF-8): Generowanie funkcji dostępowych i iterujących dla typów wariantowych w OCamlu - cześć programistyczna
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
58 Requires: ocaml-base-devel >= 0.14
59 Requires: ocaml-ppxlib-devel >= 0.23.0
60 Requires: ocaml-variantslib-devel >= 0.14
63 This package contains files needed to develop OCaml programs using
64 ppx_variants_conv library.
66 %description devel -l pl.UTF-8
67 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
68 używających biblioteki ppx_variants_conv.
71 %setup -q -n ppx_variants_conv-%{version}
77 rm -rf $RPM_BUILD_ROOT
79 dune install --destdir=$RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82 cp -pr example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
85 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_variants_conv/*.ml
87 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_variants_conv
90 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
94 %doc CHANGES.md LICENSE.md README.md
95 %dir %{_libdir}/ocaml/ppx_variants_conv
96 %{_libdir}/ocaml/ppx_variants_conv/META
97 %{_libdir}/ocaml/ppx_variants_conv/*.cma
99 %attr(755,root,root) %{_libdir}/ocaml/ppx_variants_conv/*.cmxs
103 %defattr(644,root,root,755)
104 %{_libdir}/ocaml/ppx_variants_conv/*.cmi
105 %{_libdir}/ocaml/ppx_variants_conv/*.cmt
106 %{_libdir}/ocaml/ppx_variants_conv/*.cmti
107 %{_libdir}/ocaml/ppx_variants_conv/*.mli
108 %if %{with ocaml_opt}
109 %{_libdir}/ocaml/ppx_variants_conv/ppx_variants_conv.a
110 %{_libdir}/ocaml/ppx_variants_conv/*.cmx
111 %{_libdir}/ocaml/ppx_variants_conv/*.cmxa
113 %{_libdir}/ocaml/ppx_variants_conv/dune-package
114 %{_libdir}/ocaml/ppx_variants_conv/opam
115 %{_examplesdir}/%{name}-%{version}