New upstream version 1.4.

- Build debuginfo.
- Add -g option when running ocamlopt to generate debuginfo.
- Don't need anti-prelink / stripping hacks for modern OCaml.
- Modernize spec file.
This commit is contained in:
Richard W.M. Jones 2013-09-13 21:51:47 +01:00
parent a29447b14b
commit 2f66070125
5 changed files with 29 additions and 45 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ findlib-1.2.5.tar.gz
/findlib-1.2.8.tar.gz /findlib-1.2.8.tar.gz
/findlib-1.3.1.tar.gz /findlib-1.3.1.tar.gz
/findlib-1.3.3.tar.gz /findlib-1.3.3.tar.gz
/findlib-1.4.tar.gz

View File

@ -1,11 +0,0 @@
--- findlib-1.3.1/src/findlib/Makefile.old 2012-06-07 19:40:09.366026562 +0100
+++ findlib-1.3.1/src/findlib/Makefile 2012-06-07 19:40:24.583320659 +0100
@@ -116,7 +116,7 @@
$(OCAMLOPT) -c $<
.ml.cmo:
- $(OCAMLC) -g -c $<
+ $(OCAMLC) -I +compiler-libs -g -c $<
.mli.cmi:
$(OCAMLC) -c $<

View File

@ -0,0 +1,11 @@
--- ./findlib-1.4/src/findlib/Makefile.old 2013-09-13 22:13:25.322978268 +0100
+++ ./findlib-1.4/src/findlib/Makefile 2013-09-13 22:13:38.289999908 +0100
@@ -14,7 +14,7 @@
# Need compiler-libs since ocaml-4.00
OCAMLC = ocamlc -I +compiler-libs
-OCAMLOPT = ocamlopt -I +compiler-libs
+OCAMLOPT = ocamlopt -I +compiler-libs -g
OCAMLDEP = ocamldep
OCAMLLEX = ocamllex
#CAMLP4O = camlp4 pa_o.cmo pa_op.cmo pr_o.cmo --

View File

@ -1,22 +1,20 @@
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%global debug_package %{nil}
%if !%opt
%global __strip /bin/true
%endif
Name: ocaml-findlib Name: ocaml-findlib
Version: 1.3.3 Version: 1.4
Release: 5%{?dist} Release: 1%{?dist}
Summary: Objective CAML package manager and build helper Summary: Objective CAML package manager and build helper
Group: Development/Libraries
License: BSD License: BSD
URL: http://projects.camlcity.org/projects/findlib.html URL: http://projects.camlcity.org/projects/findlib.html
Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Use ocamlopt -g patch to include debug information.
Patch1: findlib-1.4-add-debug.patch
ExcludeArch: sparc64 s390 s390x ExcludeArch: sparc64 s390 s390x
BuildRequires: ocaml >= 4.00.1 BuildRequires: ocaml >= 4.01.0
BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-camlp4-devel
BuildRequires: ocaml-labltk-devel BuildRequires: ocaml-labltk-devel
BuildRequires: ocaml-compiler-libs BuildRequires: ocaml-compiler-libs
@ -34,7 +32,6 @@ Objective CAML package manager and build helper.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -45,6 +42,7 @@ developing applications that use %{name}.
%prep %prep
%setup -q -n findlib-%{version} %setup -q -n findlib-%{version}
%patch1 -p2
%build %build
@ -66,31 +64,13 @@ rm doc/guide-html/TIMESTAMP
%install %install
rm -rf $RPM_BUILD_ROOT
# Grrr destdir grrrr # Grrr destdir grrrr
mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_bindir}
make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir} make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir} mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
%if %opt
strip $RPM_BUILD_ROOT%{_bindir}/ocamlfind
%endif
# If ocamlfind is bytecode, don't strip it and prevent prelink from
# stripping it as well (RHBZ#435559).
%if !%opt
mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d
echo '-b /usr/bin/ocamlfind' \
> $RPM_BUILD_ROOT/etc/prelink.conf.d/ocaml-ocamlfind.conf
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-)
%doc LICENSE doc/README %doc LICENSE doc/README
%config(noreplace) %{_sysconfdir}/ocamlfind.conf %config(noreplace) %{_sysconfdir}/ocamlfind.conf
%{_bindir}/* %{_bindir}/*
@ -108,13 +88,9 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{_libdir}/ocaml/findlib/make_wizard %exclude %{_libdir}/ocaml/findlib/make_wizard
%exclude %{_libdir}/ocaml/findlib/make_wizard.pattern %exclude %{_libdir}/ocaml/findlib/make_wizard.pattern
%{_libdir}/ocaml/num-top %{_libdir}/ocaml/num-top
%if !%opt
%config(noreplace) %{_sysconfdir}/prelink.conf.d/ocaml-ocamlfind.conf
%endif
%files devel %files devel
%defattr(-,root,root,-)
%doc LICENSE doc/README doc/guide-html %doc LICENSE doc/README doc/guide-html
%if %opt %if %opt
%{_libdir}/ocaml/findlib/*.a %{_libdir}/ocaml/findlib/*.a
@ -127,6 +103,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Sep 13 2013 Richard W.M. Jones <rjones@redhat.com> - 1.4-1
- New upstream version 1.4.
- Build debuginfo.
- Add -g option when running ocamlopt to generate debuginfo.
- Don't need anti-prelink / stripping hacks for modern OCaml.
- Modernize spec file.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-5 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

View File

@ -1 +1 @@
a4c22ad5e0d38367a73cf58a25fcbebd findlib-1.3.3.tar.gz 5d1f8238c53964fdd14387b87b48b5d9 findlib-1.4.tar.gz