conditionalize ocaml support

- fix build on 64-bit arches
This commit is contained in:
Dan Horák 2012-03-23 10:42:20 +01:00
parent 244c368933
commit d425b4fa49

View File

@ -15,9 +15,13 @@
# with speech dispatcher iff on Fedora: # with speech dispatcher iff on Fedora:
%define with_speech_dispatcher 0%{?fedora} %define with_speech_dispatcher 0%{?fedora}
%ifarch %{ocaml_arches}
%global with_ocaml 1
%endif
Name: brltty Name: brltty
Version: %{pkg_version} Version: %{pkg_version}
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://mielke.cc/brltty/ URL: http://mielke.cc/brltty/
@ -137,6 +141,7 @@ Summary: Java binding for BrlAPI
%description -n brlapi-java %description -n brlapi-java
This package provides the Java binding for BrlAPI. This package provides the Java binding for BrlAPI.
%if 0%{?with_ocaml}
%package -n ocaml-brlapi %package -n ocaml-brlapi
Version: %{api_version} Version: %{api_version}
Group: Development/System Group: Development/System
@ -146,6 +151,7 @@ BuildRequires: ocaml
Summary: OCaml binding for BrlAPI Summary: OCaml binding for BrlAPI
%description -n ocaml-brlapi %description -n ocaml-brlapi
This package provides the OCaml binding for BrlAPI. This package provides the OCaml binding for BrlAPI.
%endif
%define version %{pkg_version} %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}" install -m 644 Documents/brltty.conf "${RPM_BUILD_ROOT}%{_sysconfdir}"
echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5 echo ".so man1/brltty.1" > $RPM_BUILD_ROOT%{_mandir}/man5/brltty.conf.5
%ifarch x86_64 %if %{_lib} == "lib64"
#Manually place java plugin on x64_64 #Manually place java plugin on 64-bit arches
mkdir $RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/ mkdir $RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/
install -m 755 Bindings/Java/libbrlapi_java.so "$RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/" install -m 755 Bindings/Java/libbrlapi_java.so "$RPM_BUILD_ROOT%{_prefix}/%{_lib}/java/"
%endif %endif
@ -308,12 +314,18 @@ exit 0
%{_jnidir}/libbrlapi_java.so %{_jnidir}/libbrlapi_java.so
%{_javadir}/brlapi.jar %{_javadir}/brlapi.jar
%if 0%{?with_ocaml}
%files -n ocaml-brlapi %files -n ocaml-brlapi
%defattr(-,root,root) %defattr(-,root,root)
%{_prefix}/%{_lib}/ocaml/brlapi/ %{_prefix}/%{_lib}/ocaml/brlapi/
%{_prefix}/%{_lib}/ocaml/stublibs/ %{_prefix}/%{_lib}/ocaml/stublibs/
%endif
%changelog %changelog
* Fri Mar 23 2012 Dan Horák <dan[at]danny.cz> - 4.3-5
- conditionalize ocaml support
- fix build on 64-bit arches
* Mon Feb 06 2012 Jon Ciesla <limburgher@gmail.com> - 4.3-4 * Mon Feb 06 2012 Jon Ciesla <limburgher@gmail.com> - 4.3-4
- Added ocaml subpackage, BZ 702724. - Added ocaml subpackage, BZ 702724.