]> git.pld-linux.org Git - packages/ocaml-data-notation.git/blob - ocaml-data-notation.spec
- added string patch (fix deprecation causing build failure); release 4
[packages/ocaml-data-notation.git] / ocaml-data-notation.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # native optimized binaries (bytecode is always built)
4
5 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
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
13 Release:        4
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
18 Patch0:         %{name}-string.patch
19 URL:            https://forge.ocamlcore.org/projects/odn/
20 BuildRequires:  ocaml >= 1:3.10.2
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
57 %patch0 -p1
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
74 # move to dir pld ocamlfind looks
75 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/odn
76 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/odn/META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/odn
77 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/odn/META
78 directory="+odn"
79 EOF
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %files
85 %defattr(644,root,root,755)
86 %doc AUTHORS.txt CHANGES.txt COPYING.txt README.txt
87 %dir %{_libdir}/ocaml/odn
88 %{_libdir}/ocaml/odn/odn.cma
89 %{_libdir}/ocaml/odn/pa_noodn.cma
90 %{_libdir}/ocaml/odn/pa_odn.cma
91 %if %{with ocaml_opt}
92 %attr(755,root,root) %{_libdir}/ocaml/odn/odn.cmxs
93 %endif
94 %{_libdir}/ocaml/site-lib/odn
95
96 %files devel
97 %defattr(644,root,root,755)
98 %{_libdir}/ocaml/odn/ODN.cmi
99 %{_libdir}/ocaml/odn/ODN.ml
100 %{_libdir}/ocaml/odn/pa_noodn.cmi
101 %{_libdir}/ocaml/odn/pa_noodn.ml
102 %{_libdir}/ocaml/odn/pa_odn.cmi
103 %{_libdir}/ocaml/odn/pa_odn.ml
104 %if %{with ocaml_opt}
105 %{_libdir}/ocaml/odn/ODN.cmx
106 %{_libdir}/ocaml/odn/odn.a
107 %{_libdir}/ocaml/odn/odn.cmxa
108 %endif
This page took 0.078966 seconds and 3 git commands to generate.