summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2014-02-08 14:23:48 +0700
committerMichel Alexandre Salim <salimma@fedoraproject.org>2014-02-08 14:23:48 +0700
commitc2157f6a11a6b15afe19156ec9ca1802843640fb (patch)
tree896bca5a869e446b0cb8865c46630fd8f68b0a48
parent17d3a2aed0c36874be17a8e80c68eceac1653225 (diff)
downloadspecs-c2157f6a11a6b15afe19156ec9ca1802843640fb.tar.gz
specs-c2157f6a11a6b15afe19156ec9ca1802843640fb.tar.xz
specs-c2157f6a11a6b15afe19156ec9ca1802843640fb.zip
ocaml-yojson: incorporate review feedback
-rw-r--r--ocaml/ocaml-yojson.spec38
1 files 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 <salimma@fedoraproject.org> - 1.1.8-2
+- Incorporate review feedback
+
* Mon Jan 20 2014 Michel Salim <salimma@fedoraproject.org> - 1.1.8-1
- Initial package