Rebuild for OCaml 4.01.0.

- Enable debuginfo.
- Fix URL and Source.
- Modernize spec file.
This commit is contained in:
Richard W.M. Jones 2013-09-14 11:03:56 +01:00
parent 20ecfa2df6
commit 9ff966a5ff
2 changed files with 42 additions and 21 deletions

View File

@ -0,0 +1,24 @@
--- ancient-0.9.0/Makefile.old 2013-09-14 11:04:51.109114454 +0100
+++ ancient-0.9.0/Makefile 2013-09-14 11:05:11.083141905 +0100
@@ -12,7 +12,7 @@
OCAMLCPACKAGES := -package unix
OCAMLCLIBS := -linkpkg
-OCAMLOPTFLAGS :=
+OCAMLOPTFLAGS := $(OCAMLCFLAGS)
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
OCAMLOPTLIBS := -linkpkg
@@ -26,10 +26,10 @@
all: $(TARGETS)
ancient.cma: ancient.cmo ancient_c.o
- ocamlmklib -o ancient -Lmmalloc -lmmalloc $^
+ ocamlmklib -g -o ancient -Lmmalloc -lmmalloc $^
ancient.cmxa: ancient.cmx ancient_c.o
- ocamlmklib -o ancient -Lmmalloc -lmmalloc $^
+ ocamlmklib -g -o ancient -Lmmalloc -lmmalloc $^
test_ancient_dict_write.opt: ancient.cmxa test_ancient_dict_write.cmx
LIBRARY_PATH=.:$$LIBRARY_PATH \

View File

@ -1,18 +1,20 @@
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define ocamllibdir %{_libdir}/ocaml
Name: ocaml-ancient
Version: 0.9.0
Release: 12%{?dist}
Release: 13%{?dist}
Summary: OCaml library for large memory structures and sharing
Group: Development/Libraries
License: LGPLv2+ with exceptions
URL: http://merjis.com/developers/ancient
Source0: http://merjis.com/_file/ancient-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Upstream website is dead, but the code is maintained at
# http://git.annexia.org/?p=ocaml-ancient.git;a=summary. The current
# tarball is based on the last one released upstream.
URL: http://git.annexia.org/?p=ocaml-ancient.git;a=summary
Source0: ancient-%{version}.tar.gz
Patch1: ancient-0.9.0-use-ocamlopt-g.patch
BuildRequires: ocaml >= 3.10.0
BuildRequires: ocaml-findlib-devel
@ -20,10 +22,6 @@ BuildRequires: ocaml-ocamldoc
BuildRequires: chrpath
ExcludeArch: sparc64 s390 s390x
%define _use_internal_dependency_generator 0
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
%description
Ancient is an OCaml module that allows you to use in-memory data
@ -47,7 +45,6 @@ ocaml-ancient-devel package carefully.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
@ -59,6 +56,8 @@ developing applications that use %{name}.
%prep
%setup -q -n ancient-%{version}
%patch1 -p1
%build
pushd mmalloc
@ -72,7 +71,6 @@ make doc ||:
%install
rm -rf $RPM_BUILD_ROOT
export DESTDIR=$RPM_BUILD_ROOT
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
mkdir -p $RPM_BUILD_ROOT%{_libdir}
@ -80,16 +78,10 @@ mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
ocamlfind install ancient ancient.cmi *.mli *.cma ancient.cmx *.cmxa *.a *.so \
mmalloc/*.a META
strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc mmalloc/COPYING.LIB
%{_libdir}/ocaml/ancient
%if %opt
@ -103,7 +95,6 @@ rm -rf $RPM_BUILD_ROOT
%files devel
%defattr(-,root,root,-)
%doc README.txt html/*
%if %opt
%{_libdir}/ocaml/ancient/*.a
@ -114,6 +105,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Sep 14 2013 Richard W.M. Jones <rjones@redhat.com> - 0.9.0-13
- Rebuild for OCaml 4.01.0.
- Enable debuginfo.
- Fix URL and Source.
- Modernize spec file.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild