Blame | Last modification | View Log | RSS feed
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)%global debug_package %{nil}%global _use_internal_dependency_generator 0%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh%global libname %(echo %{name} | sed -e 's/^ocaml-//')Name:Version:Release: 1%{?dist}Summary:Group: Development/LibrariesLicense:URL:Source0:BuildRequires: ocaml >= 3.10.0BuildRequires: ocaml-findlib-develBuildRequires: ocaml-ocamldocBuildRequires: chrpath%description%package develSummary: Development files for %{name}Group: Development/LibrariesRequires: %{name} = %{version}-%{release}%description develThe %{name}-devel package contains libraries and signature files fordeveloping applications that use %{name}.%prep%setup -q -n %{libname}-%{version}%build# You may need a %%configure step here (or ./configure if it doesn't work).make byte%if %optmake opt%endif%installrm -rf $RPM_BUILD_ROOT# These rules work if the library uses 'ocamlfind install' to install itself.export DESTDIR=$RPM_BUILD_ROOTexport OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocamlmkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibsmake installstrip $OCAMLFIND_DESTDIR/stublibs/dll*.sochrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so%cleanrm -rf $RPM_BUILD_ROOT%files%defattr(-,root,root,-)%doc LICENSE%dir %{_libdir}/ocaml/%{libname}/%if %opt%exclude %{_libdir}/ocaml/*/*.a%exclude %{_libdir}/ocaml/*/*.cmxa%exclude %{_libdir}/ocaml/*/*.cmx%endif%exclude %{_libdir}/ocaml/*/*.mli%{_libdir}/ocaml/stublibs/*.so%{_libdir}/ocaml/stublibs/*.so.owner%files devel%defattr(-,root,root,-)%doc LICENSE README%if %opt%{_libdir}/ocaml/*/*.a%{_libdir}/ocaml/*/*.cmxa%{_libdir}/ocaml/*/*.cmx%endif%{_libdir}/ocaml/*/*.mli%changelog