ocaml-menhir/ocaml-menhir.spec

117 lines
3.5 KiB
RPMSpec
Raw Normal View History

2011-12-21 15:43:28 +00:00
%global debug_package %{nil}
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%if %opt
%global target opt
%else
%global target byte
%endif
Name: ocaml-menhir
2013-01-21 18:45:29 +00:00
Version: 20130116
Release: 3%{?dist}
2011-12-21 15:43:28 +00:00
Summary: LR(1) parser generator for OCaml
License: (QPL with exceptions) and (LGPLv2+ with exceptions)
URL: http://gallium.inria.fr/~fpottier/menhir/
Source0: http://gallium.inria.fr/~fpottier/menhir/menhir-%{version}.tar.gz
# Patch from Scott Tsai to allow demos to build outside of source tree
Patch0: 0001-Makfile-use-menhir-ocamldep-instead-of-ocamldep.wra.patch
BuildRequires: ocaml
BuildRequires: ocaml-findlib-devel
ExclusiveArch: %{ocaml_arches}
%description
Menhir is a LR(1) parser generator for the Objective Caml programming
language. That is, Menhir compiles LR(1) grammar specifications down to
OCaml code. Menhir was designed and implemented by François Pottier and
Yann Régis-Gianas.
%package devel
Summary: Development files for %{name}
License: LGPLv2+ with exceptions
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and signature files
for developing applications that use %{name}.
%prep
%setup -q -n menhir-%{version}
%patch0 -p1
# Fix encodings
for f in AUTHORS menhir.1; do
iconv -f ISO8859-1 -t UTF-8 $f > $f.fixed
touch -r $f $f.fixed
mv -f $f.fixed $f
done
# Remove OMake generated files in the upstream tarball
rm -f demos/calc/.omakedb* demos/calc/*.omc
# Fix a dependency
sed "s|/usr/bin/env ocaml|/usr/bin/ocaml|" demos/ocamldep.wrapper > foo
touch -r demos/ocamldep.wrapper foo
mv -f foo demos/ocamldep.wrapper
chmod a+x demos/ocamldep.wrapper
%build
make PREFIX=%{_prefix} TARGET=%{target}
strip src/menhir
make -C demos clean
%install
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $OCAMLFIND_DESTDIR
make install PREFIX=$RPM_BUILD_ROOT%{_prefix} TARGET=%{target}
rm -fr $RPM_BUILD_ROOT%{_defaultdocdir}/menhir
# Install the ocamldep wrapper
mv demos/ocamldep.wrapper $RPM_BUILD_ROOT%{_bindir}/menhir-ocamldep
%files
%doc AUTHORS CHANGES LICENSE manual.pdf demos
%{_bindir}/menhir*
%{_mandir}/man1/menhir.1*
%{_datadir}/menhir/
%files devel
%{_libdir}/ocaml/menhirLib/
%changelog
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20130116-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20130116-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2013-01-21 18:45:29 +00:00
* Mon Jan 21 2013 Jerry James <loganjerry@gmail.com> - 20130116-1
- New upstream version
2012-10-17 15:22:13 +00:00
* Wed Oct 17 2012 Jerry James <loganjerry@gmail.com> - 20120123-5
- Rebuild for OCaml 4.00.1.
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20120123-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-06-11 08:10:44 +00:00
* Mon Jun 11 2012 Richard W.M. Jones <rjones@redhat.com> - 20120123-3
- Rebuild for OCaml 4.00.0.
2012-06-08 22:13:37 +00:00
* Fri Jun 8 2012 Jerry James <loganjerry@gmail.com> - 20120123-2
- Rebuild for OCaml 4.00.0
2012-01-23 18:14:36 +00:00
* Mon Jan 23 2012 Jerry James <loganjerry@gmail.com> - 20120123-1
- New upstream version
2012-01-06 17:25:35 +00:00
* Fri Jan 6 2012 Jerry James <loganjerry@gmail.com> - 20111019-3
- Rebuild for ocaml 3.12.1
2011-12-21 15:43:28 +00:00
* Mon Dec 19 2011 Jerry James <loganjerry@gmail.com> - 20111019-2
- Change the subpackages to match Debian
- Add patch to allow building demos outside of the menhir source tree
* Wed Nov 9 2011 Jerry James <loganjerry@gmail.com> - 20111019-1
- Initial RPM