]> git.pld-linux.org Git - packages/ocaml-ounit.git/blob - ocaml-ounit.spec
ec028e1871c77733d691d149d6083fac61304686
[packages/ocaml-ounit.git] / ocaml-ounit.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # build opt (native code)
4
5 %ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9 
6 %undefine       with_ocaml_opt
7 %endif
8
9 Summary:        OUnit: unit tests for OCaml
10 Summary(pl.UTF-8):      OUnit - testy jednostkowe dla OCamla
11 Name:           ocaml-ounit
12 Version:        2.0.0
13 Release:        6
14 License:        MIT
15 Group:          Libraries
16 Source0:        http://forge.ocamlcore.org/frs/download.php/1258/ounit-%{version}.tar.gz
17 # Source0-md5:  2e0a24648c55005978d4923eb4925b28
18 URL:            http://ounit.forge.ocamlcore.org/
19 BuildRequires:  ocaml >= 3.04-7
20 BuildRequires:  ocaml-findlib
21 %requires_eq    ocaml
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 OUnit is a unit testing framework for OCaml, inspired by the JUnit
26 tool for Java, and the HUnit tool for Haskell.
27
28 %description -l pl.UTF-8
29 OUnit to szkielet testów jednostkowych dla OCamla, zainspirowany
30 narzędziami JUnit dla Javy oraz HUnit dla Haskella.
31
32 %prep
33 %setup -q -n ounit-%{version}
34
35 %build
36 # not autoconf configure
37 ./configure \
38         --prefix=%{_prefix} \
39         --override bytecomp_c_compiler "%{__cc} %{rpmcflags} -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC" \
40         --override native_c_compiler "%{__cc} %{rpmcflags} -D_FILE_OFFSET_BITS=64 -D_REENTRANT"
41
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{site-lib/oUnit,stublibs}
47
48 %{__make} install \
49         OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
50
51 mv $RPM_BUILD_ROOT%{_libdir}/ocaml/oUnit/META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/oUnit
52 cat >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/oUnit/META <<EOF
53 directory = "+oUnit"
54 EOF
55
56 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
57 cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
58
59 # packaged as %doc
60 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/oUnit/oUnit*.mli
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %files
66 %defattr(644,root,root,755)
67 %doc AUTHORS.txt LICENSE.txt README.txt doc/manual.txt src/oUnit*.mli
68 %dir %{_libdir}/ocaml/oUnit
69 %if %{with ocaml_opt}
70 %{_libdir}/ocaml/oUnit/oUnit.a
71 %{_libdir}/ocaml/oUnit/oUnitAdvanced.a
72 %{_libdir}/ocaml/oUnit/oUnitThreads.a
73 %endif
74 %{_libdir}/ocaml/oUnit/oUnit*.cm[ixa]*
75 %{_libdir}/ocaml/oUnit/oUnit*.ml
76 %{_libdir}/ocaml/site-lib/oUnit
77 %{_examplesdir}/%{name}-%{version}
This page took 0.036661 seconds and 2 git commands to generate.