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