]> git.pld-linux.org Git - SPECS.git/blob - ocaml-sqlite.spec
SPECS updated Sat 31 Jul 20:27:02 CEST 2021
[SPECS.git] / ocaml-sqlite.spec
1 # TODO
2 # - tests. W: Tests are turned off, consider enabling with 'ocaml setup.ml -configure --enable-tests'
3 #
4 # Conditional build:
5 %bcond_without  ocaml_opt       # skip building native optimized binaries (bytecode is always built)
6
7 # not yet available on x32 (ocaml 4.02.1), remove when upstream will support it
8 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
9 %undefine       with_ocaml_opt
10 %endif
11
12 %if %{without ocaml_opt}
13 %define         _enable_debug_packages  0
14 %endif
15
16 %define         module  sqlite3
17 Summary:        sqlite3 binding for OCaml
18 Name:           ocaml-sqlite
19 Version:        4.1.3
20 Release:        2
21 License:        BSD
22 Group:          Libraries
23 Source0:        https://github.com/mmottl/sqlite3-ocaml/archive/v%{version}/sqlite3-ocaml-%{version}.tar.gz
24 # Source0-md5:  1b7c29a831fb517dfa0df399eaea2ceb
25 URL:            http://mmottl.github.io/sqlite3-ocaml/
26 BuildRequires:  ocaml >= 3.04-7
27 BuildRequires:  ocaml-camlp4
28 BuildRequires:  ocaml-findlib-devel
29 BuildRequires:  ocaml-ocamlbuild
30 BuildRequires:  sqlite3-devel
31 %requires_eq    ocaml-runtime
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 SQLite 3 database library wrapper for OCaml.
36
37 %package devel
38 Summary:        sqlite3 binding for OCaml - development part
39 Group:          Development/Libraries
40 Requires:       %{name} = %{version}-%{release}
41 %requires_eq ocaml
42
43 %description devel
44 This package contains files needed to develop OCaml programs using
45 ocaml-sqlite3 library.
46
47 %prep
48 %setup -q -n %{module}-ocaml-%{version}
49
50 %build
51 ./configure \
52         --prefix=%{_prefix} \
53         --libdir=%{_libdir} \
54         --docdir=%{_docdir}/%{name} \
55         --destdir=$RPM_BUILD_ROOT
56
57 %{__make} -j1 all \
58         CC="%{__cc} %{rpmcflags} -fPIC"
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{%{module},stublibs}
63
64 %{__make} -j1 install \
65         DESTDIR=$RPM_BUILD_ROOT \
66         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
67         OCAMLFIND_DOCDIR=$RPM_BUILD_ROOT%{_docdir}/%{name}
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
73 %defattr(644,root,root,755)
74 %dir %{_libdir}/ocaml/%{module}
75 %{_libdir}/ocaml/%{module}/META
76 %{_libdir}/ocaml/%{module}/*.annot
77 %{_libdir}/ocaml/%{module}/*.cma
78 %{_libdir}/ocaml/%{module}/*.cmi
79 %{_libdir}/ocaml/%{module}/*.cmt
80 %{_libdir}/ocaml/%{module}/*.cmti
81 %if %{with ocaml_opt}
82 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
83 %{_libdir}/ocaml/stublibs/*.so.owner
84 %{_libdir}/ocaml/%{module}/*.cmxs
85 %endif
86
87 %files devel
88 %defattr(644,root,root,755)
89 %doc CHANGES.txt README.md TODO.md test
90 %{_libdir}/ocaml/%{module}/*.a
91 %if %{with ocaml_opt}
92 %{_libdir}/ocaml/%{module}/*.cmxa
93 %{_libdir}/ocaml/%{module}/*.cmx
94 %endif
95 %{_libdir}/ocaml/%{module}/*.mli
This page took 0.809896 seconds and 3 git commands to generate.