%define libname ocaml-mascot-lib Name: mascot Version: 1.0 Release: %mkrel 5 Summary: Style-checker for OCaml sources License: GPL v3 Group: Development/OCaml URL: http://mascot.x9c.fr/ Source0: http://download.ocamlcore.org/mascot/%{version}/sources/mascot-%{version}.tar.gz Source1: mascot-man-page-%{version}.1 Source2: example.conf Patch0: mascot-1.0.fix-build-doc.patch Patch1: mascot-1.0-mageia-fix-ocaml-4.02-build.patch BuildRequires: ocaml-findlib BuildRequires: ocaml-compiler-libs BuildRequires: camlp4-devel Requires: camlp4 %description Mascot is a style-checker for OCaml sources. It provides checks in various categories: code, documentation, interface, metrics, and typography. The goal of the tool is to allow a (team of) developer(s) to enforce style properties over a source codebase for greater coherency and style uniformity. The tool is highly customizable, allowing one to choose the checks to perform, as well as exceptions to those checks in given files. Moreover, a plugin system allows the developer to add its own checks, and output modes. Bundled output modes range from bare text to CheckStyle- and JDepend-compatible XML file in order to allow integration with Jenkins. %package -n %{libname} Summary: Development files for %{name} Group: Development/OCaml Requires: %{name} = %{version}-%{release} Requires: ocaml-compiler Requires: camlp4-devel Requires: ocaml-compiler-libs %description -n %{libname} This package contains libraries and signature files for developing applications with %{name}. %package -n %{libname}-devel Summary: Development files for %{name} Group: Development/OCaml Requires: %{libname} = %{version}-%{release} %description -n %{libname}-devel This package contains native libraries files for developing applications with %{name}. %prep %setup -q -n mascot-%{version} %patch0 -p1 %patch1 -p1 %build sh configure make all make doc mv doc manual # Fix META file sed -i 's/mascot/mascotLibrary/g' META %check make tests %install rm -rf %{buildroot} export DESTDIR=%{buildroot} export OCAMLFIND_DESTDIR=%{buildroot}/%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR/mascot make install PATH_OCAMLFIND="/usr/bin/ocamlfind" # make an easier command line invocation install -d -m 755 %{buildroot}/%{_bindir} pushd %{buildroot}%{_bindir}/ ln -s \ %{_libdir}/ocaml/mascot/mascot.native \ mascot popd mkdir -p %{buildroot}%{_mandir}/man1 cp %{SOURCE1} %{buildroot}%{_mandir}/man1/mascot.1 cp %{SOURCE2} . %files %doc README COPYING CHANGES FEATURES VERSION %doc manual/ %doc example.conf %dir %{_libdir}/ocaml/mascot %{_libdir}/ocaml/mascot/mascot.byte %{_libdir}/ocaml/mascot/mascot.native %{_bindir}/mascot %{_mandir}/man1/mascot.1* %files -n %{libname} %doc tests/ %doc ocamldoc/ %{_libdir}/ocaml/mascot/META %{_libdir}/ocaml/mascot/*.cmi %{_libdir}/ocaml/mascot/*.cmo %files -n %{libname}-devel %{_libdir}/ocaml/mascot/*.cmx %{_libdir}/ocaml/mascot/*.o