From d425b4fa49fc5fb8b94b6da34c58b42319e5f261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 23 Mar 2012 10:42:20 +0100 Subject: [PATCH] conditionalize ocaml support - fix build on 64-bit arches --- brltty.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/brltty.spec b/brltty.spec index 862d876..5bb4b91 100644 --- a/brltty.spec +++ b/brltty.spec @@ -15,9 +15,13 @@ # with speech dispatcher iff on Fedora: %define with_speech_dispatcher 0%{?fedora} +%ifarch %{ocaml_arches} +%global with_ocaml 1 +%endif + Name: brltty Version: %{pkg_version} -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://mielke.cc/brltty/ @@ -137,6 +141,7 @@ Summary: Java binding for BrlAPI %description -n brlapi-java This package provides the Java binding for BrlAPI. +%if 0%{?with_ocaml} %package -n ocaml-brlapi Version: %{api_version} Group: Development/System @@ -146,6 +151,7 @@ BuildRequires: ocaml Summary: OCaml binding for BrlAPI %description -n ocaml-brlapi This package provides the OCaml binding for BrlAPI. +%endif %define version %{pkg_version} @@ -203,8 +209,8 @@ install -d -m 755 "${RPM_BUILD_ROOT}%{_sysconfdir}" "$RPM_BUILD_ROOT%{_mandir}/m install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}" echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5 -%ifarch x86_64 - #Manually place java plugin on x64_64 +%if %{_lib} == "lib64" + #Manually place java plugin on 64-bit arches mkdir $RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/ install -m 755 Bindings/Java/libbrlapi_java.so "$RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/" %endif @@ -308,12 +314,18 @@ exit 0 %{_jnidir}/libbrlapi_java.so %{_javadir}/brlapi.jar +%if 0%{?with_ocaml} %files -n ocaml-brlapi %defattr(-,root,root) %{_prefix}/%{_lib}/ocaml/brlapi/ %{_prefix}/%{_lib}/ocaml/stublibs/ +%endif %changelog +* Fri Mar 23 2012 Dan HorĂ¡k - 4.3-5 +- conditionalize ocaml support +- fix build on 64-bit arches + * Mon Feb 06 2012 Jon Ciesla - 4.3-4 - Added ocaml subpackage, BZ 702724.