]>
Commit | Line | Data |
---|---|---|
c69d1f51 JB |
1 | # |
2 | # Conditional build: | |
c5539cc3 | 3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) |
c69d1f51 | 4 | |
c5539cc3 JB |
5 | %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 |
6 | %undefine with_ocaml_opt | |
49e82ea3 JR |
7 | %endif |
8 | ||
c69d1f51 JB |
9 | %define module dbm |
10 | Summary: DBM binding for OCaml | |
11 | Summary(pl.UTF-8): Wiązania DBM dla OCamla | |
12 | Name: ocaml-dbm | |
848b7a3c | 13 | Version: 1.2 |
756dabb9 | 14 | Release: 2 |
c69d1f51 JB |
15 | License: LGPL v2 with linking exception |
16 | Group: Libraries | |
848b7a3c JR |
17 | Source0: https://github.com/ocaml/dbm/archive/camldbm-%{version}/camldbm-%{version}.tar.gz |
18 | # Source0-md5: 180133dd10b0b10dc47bdd8a6ab8feab | |
c69d1f51 | 19 | Patch0: %{name}-destdir.patch |
7eea36a2 | 20 | Patch1: %{name}-no-ocamlopt.patch |
c69d1f51 JB |
21 | URL: https://forge.ocamlcore.org/projects/camldbm/ |
22 | BuildRequires: db-devel | |
e3848a8f | 23 | BuildRequires: ocaml >= 1:4 |
c69d1f51 JB |
24 | %requires_eq ocaml-runtime |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %define debug_package %{nil} | |
28 | ||
29 | %description | |
30 | This OCaml library is a binding to the NDBM/GDBM Unix "databases". | |
31 | ||
32 | %description -l pl.UTF-8 | |
33 | Ta biblioteka OCamla to wiązania do uniksowych "baz danych" NDBM/GDBM. | |
34 | ||
35 | %package devel | |
36 | Summary: DBM binding for OCaml - development part | |
44643bb7 | 37 | Summary(pl.UTF-8): Wiązania DBM dla OCamla - część programistyczna |
c69d1f51 JB |
38 | Group: Development/Libraries |
39 | Requires: %{name} = %{version}-%{release} | |
40 | %requires_eq ocaml | |
e3848a8f | 41 | Conflicts: ocaml-findlib < 1.5.5 |
c69d1f51 JB |
42 | |
43 | %description devel | |
44 | This package contains files needed to develop OCaml programs using | |
45 | DBM library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
49 | DBM biblioteki. | |
50 | ||
51 | %prep | |
848b7a3c | 52 | %setup -q -n dbm-camldbm-%{version} |
c69d1f51 | 53 | %patch0 -p1 |
7eea36a2 | 54 | %{!?with_ocaml_opt:%patch1 -p1} |
c69d1f51 JB |
55 | |
56 | %build | |
57 | # instead of unpredictable configure | |
58 | cat >Makefile.config <<EOF | |
59 | OCAML_STDLIB=%{_libdir}/ocaml | |
60 | DBM_INCLUDES= | |
61 | DBM_LINK=-ldb | |
62 | DBM_DEFINES= | |
63 | EOF | |
64 | ||
65 | %{__make} | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
848b7a3c | 69 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{dbm,stublibs} |
c69d1f51 JB |
70 | |
71 | %{__make} install \ | |
72 | DESTDIR=$RPM_BUILD_ROOT | |
73 | ||
848b7a3c JR |
74 | cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/dbm |
75 | cat >>$RPM_BUILD_ROOT%{_libdir}/ocaml/dbm/META <<EOF | |
c69d1f51 JB |
76 | directory="^" |
77 | EOF | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
848b7a3c JR |
84 | %doc Changelog LICENSE README.md |
85 | %dir %{_libdir}/ocaml/dbm | |
86 | %{_libdir}/ocaml/dbm/META | |
d8ac6563 JB |
87 | %{_libdir}/ocaml/dbm.cma |
88 | %if %{with ocaml_opt} | |
89 | %attr(755,root,root) %{_libdir}/ocaml/dbm.cmxs | |
90 | %endif | |
c69d1f51 JB |
91 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllcamldbm.so |
92 | ||
93 | %files devel | |
94 | %defattr(644,root,root,755) | |
c69d1f51 JB |
95 | %{_libdir}/ocaml/dbm.cmi |
96 | %{_libdir}/ocaml/dbm.mli | |
c5539cc3 | 97 | %if %{with ocaml_opt} |
c69d1f51 JB |
98 | %{_libdir}/ocaml/dbm.a |
99 | %{_libdir}/ocaml/dbm.cmxa | |
c69d1f51 JB |
100 | %endif |
101 | %{_libdir}/ocaml/libcamldbm.a |