]>
Commit | Line | Data |
---|---|---|
1778c713 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) | |
4 | ||
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 | |
8 | %endif | |
9 | ||
10 | Summary: A ppx rewriter for easy construction of S-expressions | |
11 | Summary(pl.UTF-8): Moduł przepisujący ppx do łatwego konstruowania S-wyrażeń | |
12 | Name: ocaml-ppx_sexp_message | |
13 | Version: 0.14.1 | |
14 | Release: 1 | |
15 | License: MIT | |
16 | Group: Libraries | |
17 | #Source0Download: https://github.com/janestreet/ppx_sexp_message/tags | |
18 | Source0: https://github.com/janestreet/ppx_sexp_message/archive/v%{version}/ppx_sexp_message-%{version}.tar.gz | |
19 | # Source0-md5: a6f4478ba28e7f16cd37789e64a7cb79 | |
20 | URL: https://github.com/janestreet/ppx_sexp_message | |
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-ppx_here-devel >= 0.14 | |
26 | BuildRequires: ocaml-ppx_here-devel < 0.15 | |
27 | BuildRequires: ocaml-ppx_sexp_conv-devel >= 0.14 | |
28 | BuildRequires: ocaml-ppx_sexp_conv-devel < 0.15 | |
29 | BuildRequires: ocaml-ppxlib-devel >= 0.18.0 | |
30 | %requires_eq ocaml-runtime | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %define debug_package %{nil} | |
34 | ||
35 | %description | |
36 | The aim of ppx_sexp_message is to ease the creation of S-expressions | |
37 | in OCaml. This is mainly motivated by writing error and debugging | |
38 | messages, where one needs to construct a S-expression based on various | |
39 | element of the context such as function arguments. | |
40 | ||
41 | This package contains files needed to run bytecode executables using | |
42 | ppx_sexp_message library. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Celem ppx_sexp_message jest ułatwienie tworzenia S-wyrażeń w OCamlu. | |
46 | Motywacją do tego jest głównie wypisywanie komunikatów o błędach i | |
47 | diagnostycznych, gdzie potrzeba skonstruować S-wyrażenia w oparciu o | |
48 | różne elementy kontekstu, takie jak argumenty funkcji. | |
49 | ||
50 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
51 | używających biblioteki ppx_sexp_message. | |
52 | ||
53 | %package devel | |
54 | Summary: A ppx rewriter for easy construction of S-expressions - development part | |
47ffbd36 | 55 | Summary(pl.UTF-8): Moduł przepisujący ppx do łatwego konstruowania S-wyrażeń - część programistyczna |
1778c713 JB |
56 | Group: Development/Libraries |
57 | Requires: %{name} = %{version}-%{release} | |
58 | %requires_eq ocaml | |
59 | Requires: ocaml-base-devel >= 0.14 | |
60 | Requires: ocaml-ppx_here-devel >= 0.14 | |
61 | Requires: ocaml-ppx_sexp_conv-devel >= 0.14 | |
62 | Requires: ocaml-ppxlib-devel >= 0.18.0 | |
63 | ||
64 | %description devel | |
65 | This package contains files needed to develop OCaml programs using | |
66 | ppx_sexp_message library. | |
67 | ||
68 | %description devel -l pl.UTF-8 | |
69 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
70 | używających biblioteki ppx_sexp_message. | |
71 | ||
72 | %prep | |
73 | %setup -q -n ppx_sexp_message-%{version} | |
74 | ||
75 | %build | |
76 | dune build --verbose | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | dune install --destdir=$RPM_BUILD_ROOT | |
82 | ||
83 | # sources | |
84 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_sexp_message/*.ml | |
85 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_sexp_message/*/*.ml | |
86 | # packaged as %doc | |
87 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_sexp_message | |
88 | ||
89 | %clean | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
94 | %doc CHANGES.md LICENSE.md README.md | |
95 | %dir %{_libdir}/ocaml/ppx_sexp_message | |
96 | %attr(755,root,root) %{_libdir}/ocaml/ppx_sexp_message/ppx.exe | |
97 | %{_libdir}/ocaml/ppx_sexp_message/META | |
98 | %{_libdir}/ocaml/ppx_sexp_message/*.cma | |
99 | %dir %{_libdir}/ocaml/ppx_sexp_message/expander | |
100 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cma | |
101 | %if %{with ocaml_opt} | |
102 | %attr(755,root,root) %{_libdir}/ocaml/ppx_sexp_message/*.cmxs | |
103 | %attr(755,root,root) %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmxs | |
104 | %endif | |
105 | ||
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
108 | %{_libdir}/ocaml/ppx_sexp_message/*.cmi | |
109 | %{_libdir}/ocaml/ppx_sexp_message/*.cmt | |
110 | %{_libdir}/ocaml/ppx_sexp_message/*.cmti | |
111 | %{_libdir}/ocaml/ppx_sexp_message/*.mli | |
112 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmi | |
113 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmt | |
114 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmti | |
115 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.mli | |
116 | %if %{with ocaml_opt} | |
117 | %{_libdir}/ocaml/ppx_sexp_message/ppx_sexp_message.a | |
118 | %{_libdir}/ocaml/ppx_sexp_message/*.cmx | |
119 | %{_libdir}/ocaml/ppx_sexp_message/*.cmxa | |
120 | %{_libdir}/ocaml/ppx_sexp_message/expander/ppx_sexp_message_expander.a | |
121 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmx | |
122 | %{_libdir}/ocaml/ppx_sexp_message/expander/*.cmxa | |
123 | %endif | |
124 | %{_libdir}/ocaml/ppx_sexp_message/dune-package | |
125 | %{_libdir}/ocaml/ppx_sexp_message/opam |