%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-curl Version: 0.2.1 Release: 3%{?dist} Summary: OCaml Curl library (ocurl) Group: Development/Libraries License: LGPL URL: http://sourceforge.net/projects/ocurl Source0: http://downloads.sourceforge.net/ocurl/ocurl-0.2.1.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: ppc64 BuildRequires: ocaml, ocaml-findlib-devel, curl-devel >= 7.9.8 %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 The Ocaml Curl Library (Ocurl) is an interface library for the programming language Ocaml to the networking library libcurl. %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 -n ocurl-%{version} # Files in the archive have spurious +x mode. find -type f | xargs chmod 0644 chmod 0755 configure install-sh %configure --libdir=%{_libdir} --with-findlib %build make all %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 # Install curl.mli cp curl.mli $OCAMLFIND_DESTDIR/curl # Make clean in the examples dir so our docs don't contain binaries. make -C examples clean %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING %{_libdir}/ocaml/curl %if %opt %exclude %{_libdir}/ocaml/curl/*.a %exclude %{_libdir}/ocaml/curl/*.cmxa %endif %exclude %{_libdir}/ocaml/curl/*.mli %files devel %defattr(-,root,root,-) %doc examples/* %if %opt %{_libdir}/ocaml/curl/*.a %{_libdir}/ocaml/curl/*.cmxa %endif %{_libdir}/ocaml/curl/*.mli %changelog * Thu Aug 2 2007 Richard W.M. Jones - 0.2.1-3 - ExcludeArch ppc64 - Remove Requires curl, which is not necessary. - Use %-doc to handle docs in the devel package. * Mon Jun 11 2007 Richard W.M. Jones - 0.2.1-2 - Updated to latest packaging guidelines. * Sat May 26 2007 Richard W.M. Jones - 0.2.1-1 - Initial RPM release.