]>
Commit | Line | Data |
---|---|---|
debaa55d JB |
1 | # |
2 | # Conditional build: | |
f55dc923 | 3 | %bcond_without ocaml_opt # native optimized binaries (bytecode is always built) |
debaa55d | 4 | |
f55dc923 | 5 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
debaa55d JB |
6 | %undefine with_ocaml_opt |
7 | %endif | |
8 | ||
9 | Summary: OCaml module to store data using OCaml notation | |
10 | Summary(pl.UTF-8): Moduł OCamla do przechowywania danych w notacji OCamla | |
11 | Name: ocaml-data-notation | |
12 | Version: 0.0.11 | |
f55dc923 | 13 | Release: 4 |
debaa55d JB |
14 | License: LGPL v2.1+ with OCaml static compilation exception |
15 | Group: Libraries | |
16 | Source0: https://forge.ocamlcore.org/frs/download.php/1310/%{name}-%{version}.tar.gz | |
17 | # Source0-md5: 0ab9cd196b4a7f22a037ab96a477896f | |
f55dc923 | 18 | Patch0: %{name}-string.patch |
debaa55d | 19 | URL: https://forge.ocamlcore.org/projects/odn/ |
f55dc923 | 20 | BuildRequires: ocaml >= 1:3.10.2 |
debaa55d JB |
21 | BuildRequires: ocaml-camlp4 |
22 | BuildRequires: ocaml-type_conv-devel >= 108.07.01 | |
23 | %requires_eq ocaml-runtime | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %define debug_package %{nil} | |
27 | ||
28 | %description | |
29 | odn is an OCaml module to store data using OCaml notation. | |
30 | ||
31 | This package contains files needed to run bytecode executables using | |
32 | odn library. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | odn to moduł OCamla do przechowywania danych w notacji OCamla. | |
36 | ||
37 | Ten pakiet zawiera binaria potrzebne do uruchamiania programów | |
38 | używających biblioteki odn. | |
39 | ||
40 | %package devel | |
41 | Summary: OCaml module to store data using OCaml notation - development part | |
42 | Summary(pl.UTF-8): Moduł OCamla do przechowywania danych w notacji OCamla - część programistyczna | |
43 | Group: Development/Libraries | |
44 | Requires: %{name} = %{version}-%{release} | |
45 | %requires_eq ocaml | |
46 | ||
47 | %description devel | |
48 | This package contains files needed to develop OCaml programs using odn | |
49 | library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Ten pakiet zawiera pliki niezbędne do tworzenia programów używających | |
53 | biblioteki odn. | |
54 | ||
55 | %prep | |
56 | %setup -q | |
f55dc923 | 57 | %patch0 -p1 |
debaa55d JB |
58 | |
59 | %build | |
60 | ocaml setup.ml -configure \ | |
61 | --prefix %{_prefix} \ | |
62 | --override bytecomp_c_compiler "%{__cc} %{rpmcflags} -fno-defer-pop -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC" \ | |
63 | --override native_c_compiler "%{__cc} %{rpmcflags} -D_FILE_OFFSET_BITS=64 -D_REENTRANT" | |
64 | ||
65 | ocaml setup.ml -all | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml | |
70 | ||
71 | export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml | |
72 | ocaml setup.ml -install | |
73 | ||
debaa55d JB |
74 | %clean |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %doc AUTHORS.txt CHANGES.txt COPYING.txt README.txt | |
251c5b8a | 80 | %dir %{_libdir}/ocaml/odn |
fe9d5f37 | 81 | %{_libdir}/ocaml/odn/META |
debaa55d JB |
82 | %{_libdir}/ocaml/odn/odn.cma |
83 | %{_libdir}/ocaml/odn/pa_noodn.cma | |
84 | %{_libdir}/ocaml/odn/pa_odn.cma | |
85 | %if %{with ocaml_opt} | |
86 | %attr(755,root,root) %{_libdir}/ocaml/odn/odn.cmxs | |
87 | %endif | |
debaa55d JB |
88 | |
89 | %files devel | |
90 | %defattr(644,root,root,755) | |
91 | %{_libdir}/ocaml/odn/ODN.cmi | |
92 | %{_libdir}/ocaml/odn/ODN.ml | |
93 | %{_libdir}/ocaml/odn/pa_noodn.cmi | |
94 | %{_libdir}/ocaml/odn/pa_noodn.ml | |
95 | %{_libdir}/ocaml/odn/pa_odn.cmi | |
96 | %{_libdir}/ocaml/odn/pa_odn.ml | |
97 | %if %{with ocaml_opt} | |
98 | %{_libdir}/ocaml/odn/ODN.cmx | |
99 | %{_libdir}/ocaml/odn/odn.a | |
100 | %{_libdir}/ocaml/odn/odn.cmxa | |
101 | %endif |