Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
136 - 1
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
2
%global debug_package %{nil}
3
%global _use_internal_dependency_generator 0
4
%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
5
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
6
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
7
 
8
Name:
9
Version:
10
Release:        1%{?dist}
11
Summary:
12
 
13
Group:          Development/Libraries
14
License:
15
URL:
16
Source0:
17
 
18
BuildRequires:  ocaml >= 3.10.0
19
BuildRequires:  ocaml-findlib-devel
20
BuildRequires:  ocaml-ocamldoc
21
BuildRequires:  chrpath
22
 
23
%description
24
 
25
 
26
%package        devel
27
Summary:        Development files for %{name}
28
Group:          Development/Libraries
29
Requires:       %{name} = %{version}-%{release}
30
 
31
%description    devel
32
The %{name}-devel package contains libraries and signature files for
33
developing applications that use %{name}.
34
 
35
 
36
%prep
37
%setup -q -n %{libname}-%{version}
38
 
39
 
40
%build
41
# You may need a %%configure step here (or ./configure if it doesn't work).
42
make byte
43
%if %opt
44
make opt
45
%endif
46
 
47
 
48
%install
49
rm -rf $RPM_BUILD_ROOT
50
# These rules work if the library uses 'ocamlfind install' to install itself.
51
export DESTDIR=$RPM_BUILD_ROOT
52
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
53
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
54
make install
55
 
56
strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
57
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
58
 
59
 
60
%clean
61
rm -rf $RPM_BUILD_ROOT
62
 
63
 
64
%files
65
%defattr(-,root,root,-)
66
%doc LICENSE
67
%dir %{_libdir}/ocaml/%{libname}/
68
%if %opt
69
%exclude %{_libdir}/ocaml/*/*.a
70
%exclude %{_libdir}/ocaml/*/*.cmxa
71
%exclude %{_libdir}/ocaml/*/*.cmx
72
%endif
73
%exclude %{_libdir}/ocaml/*/*.mli
74
%{_libdir}/ocaml/stublibs/*.so
75
%{_libdir}/ocaml/stublibs/*.so.owner
76
 
77
 
78
%files devel
79
%defattr(-,root,root,-)
80
%doc LICENSE README
81
%if %opt
82
%{_libdir}/ocaml/*/*.a
83
%{_libdir}/ocaml/*/*.cmxa
84
%{_libdir}/ocaml/*/*.cmx
85
%endif
86
%{_libdir}/ocaml/*/*.mli
87
 
88
 
89
%changelog