From c2157f6a11a6b15afe19156ec9ca1802843640fb Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Sat, 8 Feb 2014 14:23:48 +0700 Subject: ocaml-yojson: incorporate review feedback --- ocaml/ocaml-yojson.spec | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/ocaml/ocaml-yojson.spec b/ocaml/ocaml-yojson.spec index eed1643..28e3f89 100644 --- a/ocaml/ocaml-yojson.spec +++ b/ocaml/ocaml-yojson.spec @@ -1,27 +1,28 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) +%if !%{opt} %global debug_package %{nil} -%global _use_internal_dependency_generator 0 -%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh -%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh -%define libname %(echo %{name} | sed -e 's/^ocaml-//') +%endif Name: ocaml-yojson Version: 1.1.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: An optimized parsing and printing library for the JSON format License: BSD URL: http://mjambon.com/yojson.html Source0: http://mjambon.com/releases/yojson/yojson-%{version}.tar.gz -Patch0: %{libname}-1.1.8-destdir.patch + +ExclusiveArch: %{ocaml_arches} BuildRequires: ocaml >= 3.10.0 -BuildRequires: ocaml-findlib-devel +BuildRequires: ocaml-findlib BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-biniou-devel BuildRequires: ocaml-cppo BuildRequires: ocaml-easy-format-devel +%global libname %(sed -e 's/^ocaml-//' <<< %{name}) + %description Yojson is an optimized parsing and printing library for the JSON format. It addresses a few shortcomings of json-wheel including 2x @@ -37,7 +38,7 @@ deserializers from type definitions. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for @@ -46,49 +47,48 @@ developing applications that use %{name}. %prep %setup -q -n %{libname}-%{version} -%patch0 -p1 -b .destdir +#patch0 -p1 -b .destdir %build -make +make META all %if %opt make opt %endif %install -rm -rf $RPM_BUILD_ROOT # These rules work if the library uses 'ocamlfind install' to install itself. -export DESTDIR=$RPM_BUILD_ROOT +export PREFIX=$RPM_BUILD_ROOT%{_prefix} export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $OCAMLFIND_DESTDIR make install -strip $RPM_BUILD_ROOT%{_bindir}/ydump -strip $OCAMLFIND_DESTDIR/%{libname}/*.cmxs - %files %doc LICENSE -%{_bindir}/ydump %{_libdir}/ocaml/%{libname}/ %if %opt +%{_bindir}/ydump %exclude %{_libdir}/ocaml/*/*.cmx +%exclude %{_libdir}/ocaml/*/*.o %endif %exclude %{_libdir}/ocaml/*/*.mli -%exclude %{_libdir}/ocaml/*/*.o %files devel -%doc LICENSE README.md Changes +%doc LICENSE README.md Changes examples %if %opt %{_libdir}/ocaml/*/*.cmx +%{_libdir}/ocaml/*/*.o %endif %{_libdir}/ocaml/*/*.mli -%{_libdir}/ocaml/*/*.o %changelog +* Sat Feb 8 2014 Michel Salim - 1.1.8-2 +- Incorporate review feedback + * Mon Jan 20 2014 Michel Salim - 1.1.8-1 - Initial package -- cgit