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