]>
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 |
c7e9c637 | 15 | Release: 1 |
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 JB |
81 | -config %{_sysconfdir}/ocamlfind.conf \ |
82 | -with-toolbox | |
5e8dafba | 83 | |
41110fe1 | 84 | sed -i -e 's/-g//' Makefile |
3315f5d1 | 85 | |
7daadaa5 | 86 | %{__make} -j1 all %{?with_ocaml_opt:opt} |
5e8dafba MM |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
41110fe1 JB |
91 | %{__make} install \ |
92 | prefix=$RPM_BUILD_ROOT | |
5e8dafba | 93 | |
41110fe1 | 94 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib/*.mli |
5e8dafba | 95 | |
71915828 JB |
96 | # now provided by ocaml-dbm.spec (might not exist if building without ocaml-dbm installed) |
97 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/dbm | |
c7e9c637 JB |
98 | # now provided by ocaml-labltk.spec (might not exist if building without ocaml-labltk installed) |
99 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/labltk | |
100 | # now provided by ocaml-ocamlbuild.spec (might not exist if building without ocaml-ocamlbuild installed) | |
101 | %{__rm} -rf $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/ocamlbuild | |
d17c9760 | 102 | |
3315f5d1 | 103 | # in PLD only META files are stored in site-lib/pkg |
fe8e45a9 | 104 | sed -i -e 's|/site-lib||' $RPM_BUILD_ROOT%{_libdir}/ocaml/topfind |
57c87e37 JB |
105 | ln -sf topfind $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlfind |
106 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib \ | |
3315f5d1 | 107 | $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib |
57c87e37 JB |
108 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib |
109 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/META \ | |
110 | $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib | |
cf282a18 | 111 | echo 'directory = "+findlib"' >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/findlib/META |
57c87e37 | 112 | |
513672a1 | 113 | echo 'ldconf = "ignore"' >> $RPM_BUILD_ROOT%{_sysconfdir}/ocamlfind.conf |
3315f5d1 | 114 | |
57c87e37 JB |
115 | ln -sf ../stublibs $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/libexec |
116 | ln -sf ../stublibs $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/stublibs | |
5e8dafba MM |
117 | |
118 | %clean | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
c7e9c637 JB |
121 | %pretrans |
122 | # handle ocaml-findlib-1.6.2-{2,3} + ocaml-curses < 1.0.3-13 mess | |
123 | [ -L %{_libdir}/ocaml/site-lib/libexec ] || rmdir %{_libdir}/ocaml/site-lib/libexec || : | |
124 | [ -L %{_libdir}/ocaml/site-lib/stublibs ] || rmdir %{_libdir}/ocaml/site-lib/stublibs || : | |
125 | ||
5e8dafba MM |
126 | %files |
127 | %defattr(644,root,root,755) | |
34f915d1 | 128 | %doc doc/README LICENSE doc/*-html |
41110fe1 JB |
129 | %attr(755,root,root) %{_bindir}/ocamlfind |
130 | %attr(755,root,root) %{_bindir}/safe_camlp4 | |
5e8dafba | 131 | %config %{_sysconfdir}/ocamlfind.conf |
d17c9760 | 132 | %dir %{_libdir}/ocaml/findlib |
9be5e175 | 133 | %if %{with tk} |
d17c9760 JB |
134 | %attr(755,root,root) %{_libdir}/ocaml/findlib/make_wizard |
135 | %{_libdir}/ocaml/findlib/make_wizard.pattern | |
9be5e175 MM |
136 | %endif |
137 | %{_libdir}/ocaml/findlib/Makefile.config | |
cfe70656 | 138 | %{_libdir}/ocaml/findlib/Makefile.packages |
0154fcb6 | 139 | %{_libdir}/ocaml/findlib/findlib.cma |
343c6db9 | 140 | %{_libdir}/ocaml/findlib/findlib_dynload.cma |
0154fcb6 JB |
141 | %{_libdir}/ocaml/findlib/findlib_top.cma |
142 | %if %{with ocaml_opt} | |
143 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib.cmxs | |
343c6db9 | 144 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_dynload.cmxs |
c7e9c637 | 145 | %attr(755,root,root) %{_libdir}/ocaml/findlib/findlib_top.cmxs |
0154fcb6 | 146 | %endif |
da32f438 | 147 | %{_libdir}/ocaml/site-lib/findlib |
c7e9c637 JB |
148 | # symlinks |
149 | %{_libdir}/ocaml/site-lib/libexec | |
150 | %{_libdir}/ocaml/site-lib/stublibs | |
57c87e37 JB |
151 | # META files for base ocaml packages |
152 | %{_libdir}/ocaml/site-lib/bigarray | |
71915828 | 153 | %{_libdir}/ocaml/site-lib/bytes |
9b552343 | 154 | %{_libdir}/ocaml/site-lib/compiler-libs |
57c87e37 | 155 | %{_libdir}/ocaml/site-lib/dynlink |
343c6db9 | 156 | %{_libdir}/ocaml/site-lib/ocamldoc |
57c87e37 JB |
157 | %{_libdir}/ocaml/site-lib/stdlib |
158 | %{_libdir}/ocaml/site-lib/str | |
159 | %{_libdir}/ocaml/site-lib/threads | |
160 | %{_libdir}/ocaml/site-lib/unix | |
71915828 JB |
161 | # camlp4 4.02 doesn't provide its META itself |
162 | %{_libdir}/ocaml/site-lib/camlp4 | |
41110fe1 JB |
163 | %{_mandir}/man1/ocamlfind.1* |
164 | %{_mandir}/man5/META.5* | |
165 | %{_mandir}/man5/findlib.conf.5* | |
166 | %{_mandir}/man5/site-lib.5* | |
3315f5d1 MM |
167 | |
168 | %files devel | |
169 | %defattr(644,root,root,755) | |
0154fcb6 JB |
170 | %{_libdir}/ocaml/findlib/findlib.cmi |
171 | %{_libdir}/ocaml/findlib/fl_*.cmi | |
172 | %{_libdir}/ocaml/findlib/topfind.cmi | |
7daadaa5 | 173 | %if %{with ocaml_opt} |
0154fcb6 JB |
174 | %{_libdir}/ocaml/findlib/findlib.a |
175 | %{_libdir}/ocaml/findlib/findlib.cmxa | |
343c6db9 JB |
176 | %{_libdir}/ocaml/findlib/findlib_dynload.a |
177 | %{_libdir}/ocaml/findlib/findlib_dynload.cmxa | |
c7e9c637 JB |
178 | %{_libdir}/ocaml/findlib/findlib_top.a |
179 | %{_libdir}/ocaml/findlib/findlib_top.cmxa | |
0014a606 | 180 | %endif |
c72edd72 MM |
181 | %{_libdir}/ocaml/ocamlfind |
182 | %{_libdir}/ocaml/topfind |