%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} %define ocaml_major 3.11 %define ocaml_minor 2 %define _default_patch_fuzz 2 Name: ocaml-cmigrep Version: 1.5 Release: 16%{?dist} Summary: Search OCaml compiled interface (cmi) files Group: Development/Libraries License: GPLv2+ URL: http://homepage.mac.com/letaris/ Source0: http://homepage.mac.com/letaris/cmigrep-%{version}.tar.bz2 #Source1: http://caml.inria.fr/distrib/ocaml-%{ocaml_major}/ocaml-%{ocaml_major}.%{ocaml_minor}.tar.gz Source1: ftp://ftp.inria.fr/INRIA/Projects/cristal/ocaml/ocaml-3.11/ocaml-3.11.2+rc1.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x Patch0: cmigrep-make-without-godi-debian.patch Patch1: ocaml-3.11.0-rpath.patch Patch2: ocaml-user-cflags.patch Patch3: ocaml-3.11.0-ppc64.patch # Sent upstream on 2008-11-20. Patch10: ocaml-cmigrep-3.11.0-updated-types.patch BuildRequires: ocaml(runtime) = %{ocaml_major}.%{ocaml_minor} BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-pcre-devel BuildRequires: ocaml-ocamldoc %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 A utility to mine the data in Caml compiled interface (cmi) files, and elisp that allows emacs to use cmigrep for completion. %prep %setup -q -n cmigrep-%{version} %patch0 -p1 # Unpack OCaml sources into compiler/ subdirectory. # XXX On Debian the compiled compiler libs are shipped in a # +compiler-libs directory. It would be good to copy this, # however in Debian the only packages which actually use # compiler-libs are camlp5 & cmigrep. bzcat %{SOURCE1} | tar xf - mv ocaml-%{ocaml_major}.%{ocaml_minor}+rc1 compiler pushd compiler %patch1 -p1 %patch2 -p1 %patch3 -p1 popd %patch10 -p1 %build # Build the compiler libs. pushd compiler CFLAGS="$RPM_OPT_FLAGS" ./configure \ -bindir %{_bindir} \ -libdir %{_libdir}/ocaml \ -x11lib %{_libdir} \ -x11include %{_includedir} \ -mandir %{_mandir}/man1 make world %if %opt make opt.opt %endif popd # Build cmigrep itself. make byte %if %opt make all %endif strip cmigrep %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m 0755 cmigrep $RPM_BUILD_ROOT%{_bindir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc GPL README cmigrep.el %{_bindir}/cmigrep %changelog * Thu Jan 14 2010 Richard W.M. Jones <rjones@redhat.com> - 1.5-16 - Really rebuild for OCaml 3.11.2+rc1 (fixes RHBZ#555413). - Recheck package with rpmlint. * Wed Dec 30 2009 Richard W.M. Jones <rjones@redhat.com> - 1.5-15 - Rebuild for OCaml 3.11.2+rc1. * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 1.5-12 - Rebuild for OCaml 3.11.1+rc0. * 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> - 1.5-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu Dec 4 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-9 - Rebuild for OCaml 3.11.0. * Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-8 - Rebuild for OCaml 3.11.0+rc1. - Remove string-index-from patch. * Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-7 - Apply string-index-from patch from OCaml package. * Thu Nov 20 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-6 - Fix for OCaml 3.11.0+beta1. * Tue Nov 18 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-5 - Rebuild against OCaml 3.11.0+beta1. * Tue Aug 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-4 - Restore ordinary patch fuzz. * Tue Aug 26 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-3 - Rebuild. * Mon Jun 9 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-2 - Include ppc64 compiler patch. - Include MAP_32BITS compiler patch. - Include no-executable-stack compiler patch. - Rebuild for OCaml 3.10.2-4 (https://bugzilla.redhat.com/show_bug.cgi?id=444428#c5) * Mon Apr 28 2008 Richard W.M. Jones <rjones@redhat.com> - 1.5-1 - Initial RPM release.