%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-curl Version: 0.5.1 Release: 3%{?dist} Summary: OCaml Curl library (ocurl) Group: Development/Libraries License: MIT URL: http://sourceforge.net/projects/ocurl Source0: http://downloads.sourceforge.net/ocurl/ocurl-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0-7 BuildRequires: ocaml-findlib-devel, curl-devel >= 7.12.0 BuildRequires: gawk %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 # Files in the archive have spurious +x mode. find -type f | xargs chmod 0644 chmod 0755 configure install-sh %build %configure --libdir=%{_libdir} --with-findlib 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 * Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 0.5.1-3 - Rebuild for OCaml 3.11.2. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 0.5.1-1 - New upstream version 0.5.1. - Rebuild for OCaml 3.11.1. * Thu Apr 16 2009 S390x secondary arch maintainer <fedora-s390x@lists.fedoraproject.org> - ExcludeArch sparc64, s390, s390x as we don't have OCaml on those archs (added sparc64 per request from the sparc maintainer) * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-3 - Rebuild for OCaml 3.11.0+rc1. * Wed Nov 19 2008 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-2 - Rebuild for OCaml 3.11.0 * Sun Aug 31 2008 Richard W.M. Jones <rjones@redhat.com> - 0.5.0-1 - New upstream release 0.5.0. * Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.2.1-9 - fix license tag * Wed Apr 23 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-8 - Rebuild for OCaml 3.10.2 * Sat Mar 1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-7 - Rebuild for ppc64. * Tue Feb 12 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-6 - Force rebuild for OCaml 3.10.1. * Thu Sep 6 2007 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-5 - Force rebuild because of changed build-requires/provides scripts in OCaml. * Thu Aug 30 2007 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-4 - Force rebuild because of changed BRs in base OCaml. * Thu Aug 2 2007 Richard W.M. Jones <rjones@redhat.com> - 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 <rjones@redhat.com> - 0.2.1-2 - Updated to latest packaging guidelines. * Sat May 26 2007 Richard W.M. Jones <rjones@redhat.com> - 0.2.1-1 - Initial RPM release.