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: Optional compilation for OCaml
11 Summary(pl.UTF-8): Opcjonalna kompilacja dla OCamla
12 Name: ocaml-ppx_optcomp
17 #Source0Download: https://github.com/janestreet/ppx_optcomp/tags
18 Source0: https://github.com/janestreet/ppx_optcomp/archive/v%{version}/ppx_optcomp-%{version}.tar.gz
19 # Source0-md5: 2d012df62dd0bc82d2ea4ab25b628992
20 URL: https://github.com/janestreet/ppx_optcomp
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-devel >= 2.0.0
25 BuildRequires: ocaml-ppxlib-devel >= 0.18.0
26 BuildRequires: ocaml-stdio-devel >= 0.14
27 BuildRequires: ocaml-stdio-devel < 0.15
28 %requires_eq ocaml-runtime
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define debug_package %{nil}
34 ppx_optcomp stands for Optional Compilation. It is a tool used to
35 handle optional compilations of pieces of code depending of the word
36 size, the version of the compiler, ...
38 This package contains files needed to run bytecode executables using
41 %description -l pl.UTF-8
42 ppx_optcomp oznacza Optional Compilation, czyli opcjonalną kompilację.
43 Jest to narzędzie służące do obsługi opcjonalnej kompilacji fragmentów
44 kodu w zależności od rozmiaru słowa, wersji kompilatora itd.
46 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
47 używających biblioteki ppx_optcomp.
50 Summary: ppx_optcomp binding for OCaml - development part
51 Summary(pl.UTF-8): Wiązania ppx_optcomp dla OCamla - cześć programistyczna
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
55 Requires: ocaml-base-devel >= 0.14
56 Requires: ocaml-dune-devel >= 2.0.0
57 Requires: ocaml-ppxlib-devel >= 0.18.0
58 Requires: ocaml-stdio-devel >= 0.14
61 This package contains files needed to develop OCaml programs using
64 %description devel -l pl.UTF-8
65 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
66 używających biblioteki ppx_optcomp.
69 %setup -q -n ppx_optcomp-%{version}
75 rm -rf $RPM_BUILD_ROOT
77 dune install --destdir=$RPM_BUILD_ROOT
80 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_optcomp/*.ml
82 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_optcomp
85 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGES.md LICENSE.md README.md
90 %dir %{_libdir}/ocaml/ppx_optcomp
91 %{_libdir}/ocaml/ppx_optcomp/META
92 %{_libdir}/ocaml/ppx_optcomp/*.cma
94 %attr(755,root,root) %{_libdir}/ocaml/ppx_optcomp/*.cmxs
98 %defattr(644,root,root,755)
99 %{_libdir}/ocaml/ppx_optcomp/*.cmi
100 %{_libdir}/ocaml/ppx_optcomp/*.cmt
101 %if %{with ocaml_opt}
102 %{_libdir}/ocaml/ppx_optcomp/ppx_optcomp.a
103 %{_libdir}/ocaml/ppx_optcomp/*.cmx
104 %{_libdir}/ocaml/ppx_optcomp/*.cmxa
106 %{_libdir}/ocaml/ppx_optcomp/dune-package
107 %{_libdir}/ocaml/ppx_optcomp/opam