]>
Commit | Line | Data |
---|---|---|
7ebc219f ER |
1 | # |
2 | # Conditional build: | |
6fb4fcee | 3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) |
7ebc219f | 4 | |
06bc3075 | 5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
2bd7838d | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
44fcb5b9 | 7 | %undefine with_ocaml_opt |
e24c4309 JR |
8 | %endif |
9 | ||
87cbd86e JR |
10 | %if %{without ocaml_opt} |
11 | %define _enable_debug_packages 0 | |
12 | %endif | |
13 | ||
846e7db4 ER |
14 | %define module %{module} |
15 | Summary: %{module} binding for OCaml | |
16 | Summary(pl.UTF-8): Wiązania %{module} dla OCamla | |
17 | Name: ocaml-%{module} | |
7dfc48d9 | 18 | Version: - |
9e120d3c | 19 | Release: 1 |
7dfc48d9 | 20 | License: - (enter GPL/LGPL/BSD/BSD-like/other license name here) |
9e120d3c | 21 | Group: Libraries |
846e7db4 | 22 | Source0: %{module}-%{version}.tar.gz |
f2b77a6b | 23 | URL: - |
7dfc48d9 | 24 | # Source0-md5: - |
846e7db4 | 25 | #BuildRequires: -devel |
9e120d3c MM |
26 | BuildRequires: ocaml >= 3.04-7 |
27 | %requires_eq ocaml-runtime | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
846e7db4 | 30 | %define debug_package %{nil} |
06bc3075 JB |
31 | %if %{without ocaml_opt} |
32 | %define no_install_post_strip 1 | |
33 | # no opt means no native binary, stripping bytecode breaks such programs | |
34 | %define _enable_debug_packages 0 | |
35 | %endif | |
846e7db4 | 36 | |
9e120d3c | 37 | %description |
d954f2a4 | 38 | This package contains files needed to run bytecode executables using |
51635295 | 39 | TEMPLATE library. |
9e120d3c | 40 | |
9be49f18 JR |
41 | %description -l pl.UTF-8 |
42 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
51635295 | 43 | używających biblioteki TEMPLATE. |
9e120d3c MM |
44 | |
45 | %package devel | |
efaa8943 ER |
46 | Summary: TEMPLATE binding for OCaml - development part |
47 | Summary(pl.UTF-8): Wiązania TEMPLATE dla OCamla - cześć programistyczna | |
9e120d3c MM |
48 | Group: Development/Libraries |
49 | Requires: %{name} = %{version}-%{release} | |
50 | %requires_eq ocaml | |
51 | ||
52 | %description devel | |
d954f2a4 | 53 | This package contains files needed to develop OCaml programs using |
efaa8943 | 54 | TEMPLATE library. |
9e120d3c | 55 | |
9be49f18 JR |
56 | %description devel -l pl.UTF-8 |
57 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
06bc3075 | 58 | biblioteki TEMPLATE. |
9e120d3c MM |
59 | |
60 | %prep | |
846e7db4 | 61 | %setup -q -n %{module}-%{version} |
9e120d3c MM |
62 | |
63 | %build | |
86b3d4c5 | 64 | %{__make} -j1 all %{?with_ocaml_opt:opt} \ |
795d4115 | 65 | CC="%{__cc} %{rpmcflags} -fPIC" |
9e120d3c MM |
66 | |
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
59705d57 | 69 | |
846e7db4 ER |
70 | export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml |
71 | install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs | |
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
74 | ||
75 | #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
76 | #cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
77 | ||
9e120d3c MM |
78 | %clean |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
83 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so | |
06bc3075 | 84 | %dir %{_libdir}/ocaml/%{module} |
59705d57 | 85 | %{_libdir}/ocaml/%{module}/META |
06bc3075 JB |
86 | %{_libdir}/ocaml/%{module}/*.cma |
87 | %if %{with ocaml_opt} | |
88 | %attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs | |
89 | %endif | |
9e120d3c MM |
90 | |
91 | %files devel | |
92 | %defattr(644,root,root,755) | |
846e7db4 | 93 | %doc LICENSE |
06bc3075 | 94 | %{_libdir}/ocaml/%{module}/*.cmi |
846e7db4 ER |
95 | %{_libdir}/ocaml/%{module}/*.cmo |
96 | %{_libdir}/ocaml/%{module}/*.mli | |
86b3d4c5 | 97 | %if %{with ocaml_opt} |
846e7db4 | 98 | %{_libdir}/ocaml/%{module}/*.[ao] |
06bc3075 | 99 | %{_libdir}/ocaml/%{module}/*.cmx |
846e7db4 ER |
100 | %{_libdir}/ocaml/%{module}/*.cmxa |
101 | %endif | |
9e120d3c | 102 | %{_examplesdir}/%{name}-%{version} |