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: Expands [%here] into its location
11 Summary(pl.UTF-8): Rozwijanie [%here] na jego położenie
17 #Source0Download: https://github.com/janestreet/ppx_here/tags
18 Source0: https://github.com/janestreet/ppx_here/archive/v%{version}/ppx_here-%{version}.tar.gz
19 # Source0-md5: c188e5c348d52ca3da39aca20fb04171
20 URL: https://github.com/janestreet/ppx_here
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.11.0
26 %requires_eq ocaml-runtime
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %define debug_package %{nil}
32 A ppx rewriter that defines an extension node whose value is its
35 This package contains files needed to run bytecode executables using
38 %description -l pl.UTF-8
39 Moduł przepisujący ppx definiujący węzeł rozszerzenia, którego
40 wartością jest jego położenie w kodzie źródłowym.
42 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
43 używających biblioteki ppx_here.
46 Summary: Expands [%here] into its location - development part
47 Summary(pl.UTF-8): Rozwijanie [%here] na jego położenie - cześć programistyczna
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
51 Requires: ocaml-base-devel >= 0.14
52 Requires: ocaml-ppxlib-devel >= 0.11.0
55 This package contains files needed to develop OCaml programs using
58 %description devel -l pl.UTF-8
59 Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu
60 używających biblioteki ppx_here.
63 %setup -q -n ppx_here-%{version}
69 rm -rf $RPM_BUILD_ROOT
71 dune install --destdir=$RPM_BUILD_ROOT
74 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_here/*.ml
75 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_here/*/*.ml
77 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_here
80 rm -rf $RPM_BUILD_ROOT
83 %defattr(644,root,root,755)
84 %doc CHANGES.md LICENSE.md README.md
85 %dir %{_libdir}/ocaml/ppx_here
86 %attr(755,root,root) %{_libdir}/ocaml/ppx_here/ppx.exe
87 %{_libdir}/ocaml/ppx_here/META
88 %{_libdir}/ocaml/ppx_here/*.cma
89 %dir %{_libdir}/ocaml/ppx_here/expander
90 %{_libdir}/ocaml/ppx_here/expander/*.cma
91 %dir %{_libdir}/ocaml/ppx_here/runtime-lib
92 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cma
94 %attr(755,root,root) %{_libdir}/ocaml/ppx_here/*.cmxs
95 %attr(755,root,root) %{_libdir}/ocaml/ppx_here/expander/*.cmxs
96 %attr(755,root,root) %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmxs
100 %defattr(644,root,root,755)
101 %{_libdir}/ocaml/ppx_here/*.cmi
102 %{_libdir}/ocaml/ppx_here/*.cmt
103 %{_libdir}/ocaml/ppx_here/*.cmti
104 %{_libdir}/ocaml/ppx_here/*.mli
105 %{_libdir}/ocaml/ppx_here/expander/*.cmi
106 %{_libdir}/ocaml/ppx_here/expander/*.cmt
107 %{_libdir}/ocaml/ppx_here/expander/*.cmti
108 %{_libdir}/ocaml/ppx_here/expander/*.mli
109 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmi
110 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmt
111 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmti
112 %{_libdir}/ocaml/ppx_here/runtime-lib/*.mli
113 %if %{with ocaml_opt}
114 %{_libdir}/ocaml/ppx_here/ppx_here.a
115 %{_libdir}/ocaml/ppx_here/*.cmx
116 %{_libdir}/ocaml/ppx_here/*.cmxa
117 %{_libdir}/ocaml/ppx_here/expander/ppx_here_expander.a
118 %{_libdir}/ocaml/ppx_here/expander/*.cmx
119 %{_libdir}/ocaml/ppx_here/expander/*.cmxa
120 %{_libdir}/ocaml/ppx_here/runtime-lib/ppx_here_lib.a
121 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmx
122 %{_libdir}/ocaml/ppx_here/runtime-lib/*.cmxa
124 %{_libdir}/ocaml/ppx_here/dune-package
125 %{_libdir}/ocaml/ppx_here/opam