%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocamldsort Version: 0.14.4 Release: 7%{?dist} Summary: Dependency sorter for OCaml source files Group: Development/Libraries License: GPLv2+ URL: http://dimitri.mutu.net/ocaml.html Source0: ftp://quatramaran.ens.fr/pub/ara/ocamldsort/ocamldsort-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) ExcludeArch: sparc64 s390 s390x BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-camlp4-devel %description The ocamldsort command scans a set of Objective Caml source files (.ml and .mli files), sorts them according to their dependencies and prints the sorted files in order to link their corresponding .cmo files. For ocamldsort to work it must get a list of dependencies generated by ocamldep, if the standard input to ocamldsort has been redirected then ocamldsort assumes that this is a dependency file generated by ocamldep. Otherwise ocamldsort calls ocamldep to generate the dependency list itself. In either case the source files to be sorted should be given as arguments to the ocamldsort command. %prep %setup -q # The configure script for this package contains some mistakes # but they don't affect building. ./configure --libdir=%{_libdir} %build make %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 %if %opt install -m 0755 ocamldsort.opt $RPM_BUILD_ROOT%{_bindir}/ocamldsort %else install -m 0755 ocamldsort $RPM_BUILD_ROOT%{_bindir} %endif strip $RPM_BUILD_ROOT%{_bindir}/ocamldsort gzip ocamldsort.1 install -m 0644 ocamldsort.1.gz $RPM_BUILD_ROOT%{_mandir}/man1 %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc %{_bindir}/ocamldsort %{_mandir}/man1/ocamldsort.1.gz %changelog * Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.4-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sat May 23 2009 Richard W.M. Jones <rjones@redhat.com> - 0.14.4-6 - 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.14.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Nov 26 2008 Richard W.M. Jones <rjones@redhat.com> - 0.14.4-4 - Rebuild for OCaml 3.11.0+rc1. * Mon Mar 3 2008 Richard W.M. Jones <rjones@redhat.com> - 0.14.4-3 - Rebuild for ppc64. * Sat Mar 1 2008 Richard W.M. Jones <rjones@redhat.com> - 0.14.4-2 - Add missing BR ocaml-camlp4-devel and test in mock. * Sun Feb 24 2008 Richard W.M. Jones <rjones@redhat.com> - 0.14.4-1 - Initial RPM release.