%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-expat Version: 0.9.1 Release: 4%{?dist} Summary: OCaml wrapper for the Expat XML parsing library Group: Development/Libraries License: LGPL URL: http://www.xs4all.nl/~mmzeeman/ocaml/ Source0: http://www.xs4all.nl/~mmzeeman/ocaml/ocaml-expat-0.9.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: ppc64 BuildRequires: ocaml, ocaml-findlib-devel, expat-devel, chrpath %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh %description An ocaml wrapper for the Expat XML parsing library. It allows you to write XML-Parsers using the SAX method. An XML document is parsed on the fly without needing to load the entire XML-Tree into memory. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q %build make depend make all %if %opt make allopt %endif %install rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs make install # Remove rpath from stublibs .so file and strip it. chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so strip $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENCE README changelog %{_libdir}/ocaml/expat %{_libdir}/ocaml/stublibs/*.so %{_libdir}/ocaml/stublibs/*.so.owner %if %opt %exclude %{_libdir}/ocaml/expat/*.a %exclude %{_libdir}/ocaml/expat/*.cmxa %endif %exclude %{_libdir}/ocaml/expat/*.mli %files devel %defattr(-,root,root,-) %doc LICENCE README changelog %if %opt %{_libdir}/ocaml/expat/*.a %{_libdir}/ocaml/expat/*.cmxa %endif %{_libdir}/ocaml/expat/*.mli %changelog * Thu Aug 2 2007 Richard W.M. Jones - 0.9.1-4 - ExcludeArch ppc64 - Remove rpath from the stublibs .so file. - Strip the stublibs .so file. * Tue Jun 19 2007 Richard W.M. Jones - 0.9.1-3 - BuildRequires expat-devel. * Mon Jun 11 2007 Richard W.M. Jones - 0.9.1-2 - Updated to latest packaging guidelines. * Sat May 26 2007 Richard W.M. Jones - 0.9.1-1 - Initial RPM release.