]> git.pld-linux.org Git - packages/ocaml-ppx_variants_conv.git/blob - ocaml-ppx_variants_conv.spec
- new
[packages/ocaml-ppx_variants_conv.git] / ocaml-ppx_variants_conv.spec
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:        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
13 Version:        0.14.2
14 Release:        1
15 License:        MIT
16 Group:          Libraries
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)
30
31 %define         debug_package   %{nil}
32
33 %description
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
37 type.
38
39 This package contains files needed to run bytecode executables using
40 ppx_variants_conv library.
41
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
47 wariantowych.
48
49 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
50 używających biblioteki ppx_variants_conv.
51
52 %package devel
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}
57 %requires_eq    ocaml
58 Requires:       ocaml-base-devel >= 0.14
59 Requires:       ocaml-ppxlib-devel >= 0.23.0
60 Requires:       ocaml-variantslib-devel >= 0.14
61
62 %description devel
63 This package contains files needed to develop OCaml programs using
64 ppx_variants_conv library.
65
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.
69
70 %prep
71 %setup -q -n ppx_variants_conv-%{version}
72
73 %build
74 dune build --verbose
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 dune install --destdir=$RPM_BUILD_ROOT
80
81 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
82 cp -pr example/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
83
84 # sources
85 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ppx_variants_conv/*.ml
86 # packaged as %doc
87 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ppx_variants_conv
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_variants_conv
96 %{_libdir}/ocaml/ppx_variants_conv/META
97 %{_libdir}/ocaml/ppx_variants_conv/*.cma
98 %if %{with ocaml_opt}
99 %attr(755,root,root) %{_libdir}/ocaml/ppx_variants_conv/*.cmxs
100 %endif
101
102 %files devel
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
112 %endif
113 %{_libdir}/ocaml/ppx_variants_conv/dune-package
114 %{_libdir}/ocaml/ppx_variants_conv/opam
115 %{_examplesdir}/%{name}-%{version}
This page took 0.04843 seconds and 3 git commands to generate.