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