]>
Commit | Line | Data |
---|---|---|
18203397 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: Optimised OCaml functions to read and write int16/32/64 from strings and bigarrays | |
11 | Summary(pl.UTF-8): Zoptymalizowane funkcje OCamla do odczytu i zapisu typów int16/32/64 z typów string i bigarray | |
12 | Name: ocaml-ocplib-endian | |
13 | Version: 1.1 | |
14 | Release: 1 | |
15 | License: LGPL v2.1 with linking exception | |
16 | Group: Libraries | |
17 | #Source0Download: https://github.com/OCamlPro/ocplib-endian/releases | |
18 | Source0: https://github.com/OCamlPro/ocplib-endian/archive/%{version}/ocplib-endian-%{version}.tar.gz | |
19 | # Source0-md5: dedf4d69c1b87b3c6c7234f632399285 | |
20 | URL: https://github.com/OCamlPro/ocplib-endian | |
21 | BuildRequires: cppo >= 1.1.0 | |
22 | BuildRequires: ocaml >= 1:4.02.3 | |
23 | BuildRequires: ocaml-dune >= 1.0 | |
24 | %requires_eq ocaml-runtime | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %define debug_package %{nil} | |
28 | ||
29 | %description | |
30 | The library implements three modules: | |
31 | - EndianString works directly on strings, and provides submodules | |
32 | BigEndian and LittleEndian, with their unsafe counter-parts; | |
33 | - EndianBytes works directly on bytes, and provides submodules | |
34 | BigEndian and LittleEndian, with their unsafe counter-parts; | |
35 | - EndianBigstring works on bigstrings (Bigarrays of chars), and | |
36 | provides submodules BigEndian and LittleEndian, with their unsafe | |
37 | counter-parts. | |
38 | ||
39 | This package contains files needed to run bytecode executables using | |
40 | ocplib-endian library. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | Ta biblioteka implementuje trzy moduły: | |
44 | - EndianString działa bezpośrednio na łańcuchach i udostępnia | |
45 | podmoduły BigEndian oraz LittleEndian wraz z odpowiednikami "unsafe" | |
46 | - EndianBytes działa bezpośrednio na bajtach i udostępnia podmoduły | |
47 | BigEndian oraz LittleEndian wraz z odpowiednikami "unsafe" | |
48 | - EndianBigstring działa na dużych łańcuchach (Bigarray z elementami | |
49 | znakowymi) i udostępnia podmoduły BigEndian oraz LittleEndian wraz z | |
50 | odpowiednikami "unsafe" | |
51 | ||
52 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
53 | używających biblioteki ocplib-endian. | |
54 | ||
55 | %package devel | |
56 | Summary: Optimised OCaml functions to read and write int16/32/64 from strings and bigarrays - development part | |
38ae249f | 57 | Summary(pl.UTF-8): Zoptymalizowane funkcje OCamla do odczytu i zapisu typów int16/32/64 z typów string i bigarray - część programistyczna |
18203397 JB |
58 | Group: Development/Libraries |
59 | Requires: %{name} = %{version}-%{release} | |
60 | %requires_eq ocaml | |
61 | ||
62 | %description devel | |
63 | This package contains files needed to develop OCaml programs using | |
64 | ocplib-endian library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
68 | biblioteki ocplib-endian. | |
69 | ||
70 | %prep | |
71 | %setup -q -n ocplib-endian-%{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 | # sources | |
82 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/ocplib-endian/{,bigstring/}*.ml | |
83 | # packaged as %doc | |
84 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/ocplib-endian | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
91 | %doc CHANGES.md COPYING.txt README.md | |
92 | %dir %{_libdir}/ocaml/ocplib-endian | |
93 | %{_libdir}/ocaml/ocplib-endian/META | |
94 | %{_libdir}/ocaml/ocplib-endian/*.cma | |
95 | %dir %{_libdir}/ocaml/ocplib-endian/bigstring | |
96 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cma | |
97 | %if %{with ocaml_opt} | |
98 | %attr(755,root,root) %{_libdir}/ocaml/ocplib-endian/*.cmxs | |
99 | %attr(755,root,root) %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmxs | |
100 | %endif | |
101 | ||
102 | %files devel | |
103 | %defattr(644,root,root,755) | |
104 | %{_libdir}/ocaml/ocplib-endian/*.cmi | |
105 | %{_libdir}/ocaml/ocplib-endian/*.cmt | |
106 | %{_libdir}/ocaml/ocplib-endian/*.cmti | |
107 | %{_libdir}/ocaml/ocplib-endian/*.mli | |
108 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmi | |
109 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmt | |
110 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmti | |
111 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.mli | |
112 | %if %{with ocaml_opt} | |
113 | %{_libdir}/ocaml/ocplib-endian/*.a | |
114 | %{_libdir}/ocaml/ocplib-endian/*.cmx | |
115 | %{_libdir}/ocaml/ocplib-endian/*.cmxa | |
116 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.a | |
117 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmx | |
118 | %{_libdir}/ocaml/ocplib-endian/bigstring/*.cmxa | |
119 | %endif | |
120 | %{_libdir}/ocaml/ocplib-endian/dune-package | |
121 | %{_libdir}/ocaml/ocplib-endian/opam |