%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} Name: ocaml-ulex Version: 1.0 Release: 1%{?dist} Summary: OCaml lexer generator for Unicode Group: Development/Libraries License: LGPL URL: http://www.cduce.org/download.html Source0: http://www.cduce.org/download/ulex-1.0.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ocaml = 3.10.0, ocaml-findlib-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh %description Ulex is an OCaml lexer generator for Unicode - ulex is a lexer generator. - it is implemented as an OCaml syntax extension: lexer specifications are embedded in regular OCaml code. - the lexers work with a new kind of "lexbuf" that supports Unicode; a single lexer can work with arbitrary encodings of the input stream. %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 ulex-%{version} %build make all %if %opt make all.opt %endif %install rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $OCAMLFIND_DESTDIR make install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGES README LICENSE %{_libdir}/ocaml/ulex %if %opt %exclude %{_libdir}/ocaml/ulex/*.a %exclude %{_libdir}/ocaml/ulex/*.cmxa %endif %exclude %{_libdir}/ocaml/ulex/*.mli %files devel %defattr(-,root,root,-) %doc CHANGES README LICENSE %if %opt %{_libdir}/ocaml/ulex/*.a %{_libdir}/ocaml/ulex/*.cmxa %endif %{_libdir}/ocaml/ulex/*.mli %changelog * Mon Jun 11 2007 Richard W.M. Jones - 1.0-1 - Upstream release to match OCaml 3.10. - Updated to latest packaging guidelines. * Sat May 26 2007 Richard W.M. Jones - 0.8-1 - Initial RPM release.