1 |
Name: ocaml-pgocaml |
2 |
Version: 1.7.1 |
3 |
Release: %mkrel 13 |
4 |
Summary: OCaml library for type-safe access to PostgreSQL databases |
5 |
Group: Development/OCaml |
6 |
License: LGPLv2+ with exceptions |
7 |
URL: http://pgocaml.forge.ocamlcore.org/ |
8 |
Source0: https://forge.ocamlcore.org/frs/download.php/1098/pgocaml-%{version}.tgz |
9 |
|
10 |
BuildRequires: ocaml-compiler >= 3.10.0 |
11 |
BuildRequires: postgresql-devel |
12 |
BuildRequires: ocaml-findlib-devel |
13 |
BuildRequires: ocaml-batteries-devel |
14 |
BuildRequires: pkgconfig(libpcre) |
15 |
BuildRequires: ocaml-pcre-devel |
16 |
BuildRequires: ocaml-calendar-devel >= 2.0.4 |
17 |
BuildRequires: ocaml-csv-devel |
18 |
BuildRequires: ocaml-camlp4-devel |
19 |
Requires: ocaml-pcre |
20 |
Requires: ocaml-batteries |
21 |
Requires: ocaml-calendar |
22 |
Requires: ocaml-csv |
23 |
|
24 |
# The find-requires/provides scripts don't understand the packed |
25 |
# CalendarLib module well. Ignore the packed submodules. (Fedora) |
26 |
%global __ocaml_requires_opts -i Asttypes -i Calendar_builder -i Calendar_sig -i Date -i Date_sig -i Fcalendar -i Ftime -i Parsetree -i Period -i Printer -i Time -i Time_sig -i Time_Zone -i Utils -i Version -i PGOCaml_config |
27 |
|
28 |
%description |
29 |
PG'OCaml is a type-safe, simple interface to PostgreSQL from OCaml. |
30 |
It lets you embed SQL statements directly into OCaml code. |
31 |
|
32 |
%package devel |
33 |
Summary: Development files for %{name} |
34 |
Group: Development/OCaml |
35 |
Requires: %{name} = %{version}-%{release} |
36 |
# Compilation with findlib fails if these are not installed |
37 |
Requires: ocaml-pcre-devel |
38 |
Requires: ocaml-batteries-devel |
39 |
Requires: ocaml-calendar-devel |
40 |
Requires: ocaml-csv-devel |
41 |
|
42 |
%description devel |
43 |
The %{name}-devel package contains libraries and signature files for |
44 |
developing applications that use %{name}. |
45 |
|
46 |
%prep |
47 |
%setup -q -n pgocaml-1.7 |
48 |
|
49 |
%build |
50 |
ocaml setup.ml -configure \ |
51 |
--prefix %{_prefix} \ |
52 |
--destdir %{buildroot} \ |
53 |
--docdir %{_docdir}/ocaml-pgocaml |
54 |
|
55 |
ocaml setup.ml -build |
56 |
ocaml setup.ml -doc |
57 |
mv doc/* ./ |
58 |
mv APIDOC.docdir html |
59 |
|
60 |
%install |
61 |
export DESTDIR=%{buildroot} |
62 |
export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml |
63 |
mkdir -p $OCAMLFIND_DESTDIR |
64 |
ocaml setup.ml -install |
65 |
|
66 |
%files |
67 |
%doc LICENSE.txt CONTRIBUTORS.txt |
68 |
%dir %{_libdir}/ocaml/pgocaml |
69 |
%{_libdir}/ocaml/pgocaml/META |
70 |
%{_libdir}/ocaml/pgocaml/*.cmi |
71 |
%{_libdir}/ocaml/pgocaml/*.cma |
72 |
%{_libdir}/ocaml/pgocaml/*.cmxs |
73 |
|
74 |
%files devel |
75 |
%doc README.txt CHANGELOG.txt PROFILING.txt BUGS.txt HOW_IT_WORKS.txt |
76 |
%doc /usr/share/doc/ocaml-pgocaml/api/ |
77 |
%dir %{_docdir}/ocaml-pgocaml/api |
78 |
%{_libdir}/ocaml/pgocaml/*.a |
79 |
%{_libdir}/ocaml/pgocaml/*.ml |
80 |
%{_libdir}/ocaml/pgocaml/*.cmxa |
81 |
%{_libdir}/ocaml/pgocaml/*.cmx |
82 |
%{_libdir}/ocaml/pgocaml/*.mli |