%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocamldsort Version: 0.14.4 Release: 2%{?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: ppc64 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 Mar 1 2008 Richard W.M. Jones - 0.14.4-2 - Add missing BR ocaml-camlp4-devel and test in mock. * Sun Feb 24 2008 Richard W.M. Jones - 0.14.4-1 - Initial RPM release.