]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # build opt | |
4 | %bcond_without tk # build without tk support | |
5 | ||
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
9 | ||
10 | %define ocaml_ver 1:4.04 | |
11 | Summary: OCaml module manager | |
12 | Summary(pl.UTF-8): Zarządca modułów OCamla | |
13 | Name: ocaml-findlib | |
14 | Version: 1.9.1 | |
15 | Release: 3 | |
16 | License: distributable | |
17 | Group: Development/Tools | |
18 | Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz | |
19 | # Source0-md5: 65e6dc9b305ccbed1267275fe180f538 | |
20 | Patch0: labltk.patch | |
21 | URL: http://projects.camlcity.org/projects/findlib.html | |
22 | BuildRequires: m4 | |
23 | BuildRequires: ncurses-devel | |
24 | BuildRequires: ocaml >= %{ocaml_ver} | |
25 | BuildRequires: ocaml-camlp4 | |
26 | %{?with_tk:BuildRequires: ocaml-labltk-devel} | |
27 | BuildRequires: ocaml-ocamldoc-devel | |
28 | BuildRequires: sed >= 4.0 | |
29 | %requires_eq ocaml | |
30 | Conflicts: ocaml-curses < 1.0.3-13 | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
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 | ||
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 | ||
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. | |
50 | ||
51 | %package devel | |
52 | Summary: OCaml module manager | |
53 | Summary(pl.UTF-8): Zarządca modułów OCamla | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
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 | ||
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. | |
70 | ||
71 | Ten pakiet zawiera biblioteki i skompilowane interfejsy findliba. | |
72 | ||
73 | %prep | |
74 | %setup -q -n findlib-%{version} | |
75 | %patch0 -p1 | |
76 | ||
77 | %build | |
78 | ./configure \ | |
79 | -bindir %{_bindir} \ | |
80 | -mandir %{_mandir} \ | |
81 | -config %{_sysconfdir}/ocamlfind.conf \ | |
82 | -sitelib %{_libdir}/ocaml \ | |
83 | -with-toolbox | |
84 | ||
85 | sed -i -e 's/-g//' Makefile | |
86 | ||
87 | %{__make} -j1 all %{?with_ocaml_opt:opt} | |
88 | ||
89 | %install | |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
92 | %{__make} install \ | |
93 | prefix=$RPM_BUILD_ROOT | |
94 | ||
95 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/*.mli | |
96 | ||
97 | # now provided by ocaml-dbm.spec (might not exist if building without ocaml-dbm installed) | |
98 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/dbm | |
99 | # now provided by ocaml-graphics | |
100 | %{__rm} -r $RPM_BUILD_ROOT%{_libdir}/ocaml/graphics | |
101 | # now provided by ocaml-labltk.spec (might not exist if building without ocaml-labltk installed) | |
102 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk | |
103 | # now provided by ocaml-ocamlbuild.spec (might not exist if building without ocaml-ocamlbuild installed) | |
104 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild | |
105 | ||
106 | ln -sf topfind $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlfind | |
107 | ||
108 | echo 'ldconf = "ignore"' >> $RPM_BUILD_ROOT%{_sysconfdir}/ocamlfind.conf | |
109 | ||
110 | %clean | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %doc doc/README LICENSE doc/*-html | |
116 | %attr(755,root,root) %{_bindir}/ocamlfind | |
117 | %attr(755,root,root) %{_bindir}/safe_camlp4 | |
118 | %config %{_sysconfdir}/ocamlfind.conf | |
119 | %dir %{_libdir}/ocaml/findlib | |
120 | %if %{with tk} | |
121 | %attr(755,root,root) %{_libdir}/ocaml/findlib/make_wizard | |
122 | %{_libdir}/ocaml/findlib/make_wizard.pattern | |
123 | %endif | |
124 | %{_libdir}/ocaml/findlib/META | |
125 | %{_libdir}/ocaml/findlib/Makefile.config | |
126 | %{_libdir}/ocaml/findlib/Makefile.packages | |
127 | %{_libdir}/ocaml/findlib/findlib.cma | |
128 | %{_libdir}/ocaml/findlib/findlib_dynload.cma | |
129 | %{_libdir}/ocaml/findlib/findlib_top.cma | |
130 | %if %{with ocaml_opt} | |
131 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib.cmxs | |
132 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_dynload.cmxs | |
133 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_top.cmxs | |
134 | %endif | |
135 | # META files for base ocaml packages | |
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 | |
145 | # camlp4 4.02 doesn't provide its META itself | |
146 | %{_libdir}/ocaml/camlp4 | |
147 | %{_mandir}/man1/ocamlfind.1* | |
148 | %{_mandir}/man5/META.5* | |
149 | %{_mandir}/man5/findlib.conf.5* | |
150 | %{_mandir}/man5/site-lib.5* | |
151 | ||
152 | %files devel | |
153 | %defattr(644,root,root,755) | |
154 | %{_libdir}/ocaml/findlib/findlib.cmi | |
155 | %{_libdir}/ocaml/findlib/fl_*.cmi | |
156 | %{_libdir}/ocaml/findlib/topfind.cmi | |
157 | %if %{with ocaml_opt} | |
158 | %{_libdir}/ocaml/findlib/findlib.a | |
159 | %{_libdir}/ocaml/findlib/findlib.cmxa | |
160 | %{_libdir}/ocaml/findlib/findlib_dynload.a | |
161 | %{_libdir}/ocaml/findlib/findlib_dynload.cmxa | |
162 | %{_libdir}/ocaml/findlib/findlib_top.a | |
163 | %{_libdir}/ocaml/findlib/findlib_top.cmxa | |
164 | %endif | |
165 | %{_libdir}/ocaml/ocamlfind | |
166 | %{_libdir}/ocaml/topfind |