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