]>
Commit | Line | Data |
---|---|---|
0014a606 JR |
1 | # |
2 | # Conditional build: | |
7daadaa5 | 3 | %bcond_without ocaml_opt # build opt |
cfe70656 | 4 | %bcond_without tk # build without tk support |
0014a606 | 5 | |
c7e9c637 | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
7daadaa5 | 7 | %undefine with_ocaml_opt |
0014a606 JR |
8 | %endif |
9 | ||
b5a35397 | 10 | %define ocaml_ver 1:4.04 |
5e8dafba | 11 | Summary: OCaml module manager |
6048ed4a | 12 | Summary(pl.UTF-8): Zarządca modułów OCamla |
5e8dafba | 13 | Name: ocaml-findlib |
cfe70656 | 14 | Version: 1.9.1 |
cb91a67b | 15 | Release: 3 |
5e8dafba | 16 | License: distributable |
3315f5d1 | 17 | Group: Development/Tools |
41110fe1 | 18 | Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz |
cfe70656 JR |
19 | # Source0-md5: 65e6dc9b305ccbed1267275fe180f538 |
20 | Patch0: labltk.patch | |
21 | URL: http://projects.camlcity.org/projects/findlib.html | |
e9c2be74 | 22 | BuildRequires: m4 |
23 | BuildRequires: ncurses-devel | |
e62d0e17 | 24 | BuildRequires: ocaml >= %{ocaml_ver} |
5e8dafba | 25 | BuildRequires: ocaml-camlp4 |
9be5e175 | 26 | %{?with_tk:BuildRequires: ocaml-labltk-devel} |
cfe70656 | 27 | BuildRequires: ocaml-ocamldoc-devel |
41110fe1 | 28 | BuildRequires: sed >= 4.0 |
5e8dafba | 29 | %requires_eq ocaml |
c7e9c637 | 30 | Conflicts: ocaml-curses < 1.0.3-13 |
5e8dafba MM |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
32 | ||
7daadaa5 JB |
33 | %if %{without ocaml_opt} |
34 | %define no_install_post_strip 1 | |
35 | # debug package strips binaries which renders ocamlfind broken | |
36 | %define _enable_debug_packages 0 | |
37 | %endif | |
38 | ||
5e8dafba MM |
39 | %description |
40 | The "findlib" library provides a scheme to manage reusable software | |
41 | components (packages), and includes tools that support this scheme. | |
42 | Packages are collections of OCaml modules for which metainformation | |
43 | can be stored. | |
44 | ||
8b412a2d JR |
45 | %description -l pl.UTF-8 |
46 | Biblioteka "findlib" udostępnia metodę zarządzania komponentami | |
47 | oprogramowania (pakietami) oraz zawiera narzędzia, które ową metodę | |
48 | wspierają. Pakiety są kolekcjami modułów w OCamlu, dla których mogą | |
49 | być przechowywane metainformacje. | |
5e8dafba | 50 | |
3315f5d1 MM |
51 | %package devel |
52 | Summary: OCaml module manager | |
6048ed4a | 53 | Summary(pl.UTF-8): Zarządca modułów OCamla |
3315f5d1 | 54 | Group: Development/Libraries |
cba9c46d | 55 | Requires: %{name} = %{version}-%{release} |
3315f5d1 MM |
56 | |
57 | %description devel | |
58 | The "findlib" library provides a scheme to manage reusable software | |
59 | components (packages), and includes tools that support this scheme. | |
60 | Packages are collections of OCaml modules for which metainformation | |
61 | can be stored. | |
62 | ||
63 | This package includes libraries and compiled interfaces of findlib. | |
64 | ||
8b412a2d JR |
65 | %description devel -l pl.UTF-8 |
66 | Biblioteka "findlib" udostępnia metodę zarządzania komponentami | |
67 | oprogramowania (pakietami) oraz zawiera narzędzia, które ową metodę | |
68 | wspierają. Pakiety są kolekcjami modułów w OCamlu, dla których mogą | |
69 | być przechowywane metainformacje. | |
3315f5d1 MM |
70 | |
71 | Ten pakiet zawiera biblioteki i skompilowane interfejsy findliba. | |
72 | ||
5e8dafba | 73 | %prep |
7c98d47b | 74 | %setup -q -n findlib-%{version} |
d17c9760 | 75 | %patch0 -p1 |
5e8dafba MM |
76 | |
77 | %build | |
78 | ./configure \ | |
79 | -bindir %{_bindir} \ | |
80 | -mandir %{_mandir} \ | |
d17c9760 | 81 | -config %{_sysconfdir}/ocamlfind.conf \ |
73a8c389 | 82 | -sitelib %{_libdir}/ocaml \ |
d17c9760 | 83 | -with-toolbox |
5e8dafba | 84 | |
41110fe1 | 85 | sed -i -e 's/-g//' Makefile |
3315f5d1 | 86 | |
7daadaa5 | 87 | %{__make} -j1 all %{?with_ocaml_opt:opt} |
5e8dafba MM |
88 | |
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
41110fe1 JB |
92 | %{__make} install \ |
93 | prefix=$RPM_BUILD_ROOT | |
5e8dafba | 94 | |
73a8c389 | 95 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/*.mli |
5e8dafba | 96 | |
71915828 | 97 | # now provided by ocaml-dbm.spec (might not exist if building without ocaml-dbm installed) |
73a8c389 | 98 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/dbm |
e72d91e8 JB |
99 | # now provided by ocaml-graphics |
100 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/ocaml/graphics | |
c7e9c637 | 101 | # now provided by ocaml-labltk.spec (might not exist if building without ocaml-labltk installed) |
73a8c389 | 102 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk |
c7e9c637 | 103 | # now provided by ocaml-ocamlbuild.spec (might not exist if building without ocaml-ocamlbuild installed) |
73a8c389 | 104 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild |
d17c9760 | 105 | |
57c87e37 | 106 | ln -sf topfind $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlfind |
57c87e37 | 107 | |
513672a1 | 108 | echo 'ldconf = "ignore"' >> $RPM_BUILD_ROOT%{_sysconfdir}/ocamlfind.conf |
3315f5d1 | 109 | |
5e8dafba MM |
110 | %clean |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
34f915d1 | 115 | %doc doc/README LICENSE doc/*-html |
41110fe1 JB |
116 | %attr(755,root,root) %{_bindir}/ocamlfind |
117 | %attr(755,root,root) %{_bindir}/safe_camlp4 | |
5e8dafba | 118 | %config %{_sysconfdir}/ocamlfind.conf |
d17c9760 | 119 | %dir %{_libdir}/ocaml/findlib |
9be5e175 | 120 | %if %{with tk} |
d17c9760 JB |
121 | %attr(755,root,root) %{_libdir}/ocaml/findlib/make_wizard |
122 | %{_libdir}/ocaml/findlib/make_wizard.pattern | |
9be5e175 | 123 | %endif |
e72d91e8 | 124 | %{_libdir}/ocaml/findlib/META |
9be5e175 | 125 | %{_libdir}/ocaml/findlib/Makefile.config |
cfe70656 | 126 | %{_libdir}/ocaml/findlib/Makefile.packages |
0154fcb6 | 127 | %{_libdir}/ocaml/findlib/findlib.cma |
343c6db9 | 128 | %{_libdir}/ocaml/findlib/findlib_dynload.cma |
0154fcb6 JB |
129 | %{_libdir}/ocaml/findlib/findlib_top.cma |
130 | %if %{with ocaml_opt} | |
131 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib.cmxs | |
343c6db9 | 132 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_dynload.cmxs |
c7e9c637 | 133 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_top.cmxs |
0154fcb6 | 134 | %endif |
57c87e37 | 135 | # META files for base ocaml packages |
73a8c389 JR |
136 | %{_libdir}/ocaml/bigarray |
137 | %{_libdir}/ocaml/bytes | |
138 | %{_libdir}/ocaml/compiler-libs | |
139 | %{_libdir}/ocaml/dynlink | |
140 | %{_libdir}/ocaml/ocamldoc | |
141 | %{_libdir}/ocaml/stdlib | |
142 | %{_libdir}/ocaml/str | |
143 | %{_libdir}/ocaml/threads | |
144 | %{_libdir}/ocaml/unix | |
71915828 | 145 | # camlp4 4.02 doesn't provide its META itself |
73a8c389 | 146 | %{_libdir}/ocaml/camlp4 |
41110fe1 JB |
147 | %{_mandir}/man1/ocamlfind.1* |
148 | %{_mandir}/man5/META.5* | |
149 | %{_mandir}/man5/findlib.conf.5* | |
150 | %{_mandir}/man5/site-lib.5* | |
3315f5d1 MM |
151 | |
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
0154fcb6 JB |
154 | %{_libdir}/ocaml/findlib/findlib.cmi |
155 | %{_libdir}/ocaml/findlib/fl_*.cmi | |
156 | %{_libdir}/ocaml/findlib/topfind.cmi | |
7daadaa5 | 157 | %if %{with ocaml_opt} |
0154fcb6 JB |
158 | %{_libdir}/ocaml/findlib/findlib.a |
159 | %{_libdir}/ocaml/findlib/findlib.cmxa | |
343c6db9 JB |
160 | %{_libdir}/ocaml/findlib/findlib_dynload.a |
161 | %{_libdir}/ocaml/findlib/findlib_dynload.cmxa | |
c7e9c637 JB |
162 | %{_libdir}/ocaml/findlib/findlib_top.a |
163 | %{_libdir}/ocaml/findlib/findlib_top.cmxa | |
0014a606 | 164 | %endif |
c72edd72 MM |
165 | %{_libdir}/ocaml/ocamlfind |
166 | %{_libdir}/ocaml/topfind |