- (RHEL only) Disable camomile, ocaml-ounit, tests.
- Modernize the spec file.
This commit is contained in:
parent
4efc0a13a4
commit
fe507498f3
@ -1,39 +1,41 @@
|
||||
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||
%define debug_package %{nil}
|
||||
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: ocaml-gettext
|
||||
Version: 0.3.4
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: OCaml library for i18n
|
||||
|
||||
Group: Development/Libraries
|
||||
License: LGPLv2+ with exceptions
|
||||
URL: http://forge.ocamlcore.org/projects/ocaml-gettext
|
||||
Source0: http://forge.ocamlcore.org/frs/download.php/676/ocaml-gettext-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
ExcludeArch: sparc64 s390 s390x
|
||||
|
||||
Source0: http://forge.ocamlcore.org/frs/download.php/676/ocaml-gettext-%{version}.tar.gz
|
||||
|
||||
BuildRequires: ocaml >= 3.12.0-3
|
||||
BuildRequires: ocaml-findlib-devel >= 1.2.1-3
|
||||
BuildRequires: ocaml-ocamldoc
|
||||
BuildRequires: ocaml-camlp4-devel
|
||||
BuildRequires: ocaml-fileutils-devel >= 0.4.0
|
||||
BuildRequires: ocaml-ounit-devel
|
||||
BuildRequires: docbook-style-xsl
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: libxml2
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: autoconf
|
||||
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: ocaml-ounit-devel
|
||||
BuildRequires: ocaml-camomile-devel >= 0.8.1
|
||||
BuildRequires: ocaml-camomile-data
|
||||
%endif
|
||||
|
||||
%if !0%{?rhel}
|
||||
# ocaml-gettext program needs camomile data files
|
||||
Requires: ocaml-camomile-data
|
||||
%endif
|
||||
|
||||
%define _use_internal_dependency_generator 0
|
||||
%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Parsetree
|
||||
%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh -i Pr_gettext
|
||||
%global __ocaml_requires_opts -i Asttypes -i Parsetree
|
||||
%global __ocaml_provides_opts -i Pr_gettext
|
||||
|
||||
|
||||
%description
|
||||
@ -62,6 +64,7 @@ The %{name}-devel package contains libraries and signature files for
|
||||
developing applications that use %{name}.
|
||||
|
||||
|
||||
%if !0%{?rhel}
|
||||
%package camomile
|
||||
Summary: Parts of %{name} which depend on Camomile
|
||||
Group: Development/Libraries
|
||||
@ -83,6 +86,7 @@ Requires: %{name}-devel = %{version}-%{release}
|
||||
The %{name}-camomile-devel package contains libraries and
|
||||
signature files for developing applications that use
|
||||
%{name}-camomile.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@ -93,19 +97,24 @@ signature files for developing applications that use
|
||||
CFLAGS="$RPM_OPT_FLAGS" \
|
||||
./configure \
|
||||
--libdir=%{_libdir} \
|
||||
%if 0%{?rhel}
|
||||
--disable-camomile \
|
||||
%else
|
||||
--enable-test \
|
||||
%endif
|
||||
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
|
||||
make all
|
||||
|
||||
|
||||
%check
|
||||
%if !0%{?rhel}
|
||||
pushd test
|
||||
../_build/bin/test
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
# make install in the package is screwed up completely. Install
|
||||
# by hand instead.
|
||||
export DESTDIR=$RPM_BUILD_ROOT
|
||||
@ -118,7 +127,9 @@ find _build -name '*.o' -exec rm {} \;
|
||||
|
||||
ocamlfind install gettext _build/lib/gettext/*
|
||||
ocamlfind install gettext-stub _build/lib/gettext-stub/*
|
||||
%if !0%{?rhel}
|
||||
ocamlfind install gettext-camomile _build/lib/gettext-camomile/*
|
||||
%endif
|
||||
install -m 0755 _build/bin/ocaml-gettext $RPM_BUILD_ROOT%{_bindir}/
|
||||
install -m 0755 _build/bin/ocaml-xgettext $RPM_BUILD_ROOT%{_bindir}/
|
||||
|
||||
@ -127,12 +138,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
||||
strip $RPM_BUILD_ROOT%{_bindir}/ocaml-gettext
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING
|
||||
%{_libdir}/ocaml/gettext
|
||||
%{_libdir}/ocaml/gettext-stub
|
||||
@ -152,7 +158,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc README CHANGELOG TODO
|
||||
# %doc build/share/doc/html/*
|
||||
%if %opt
|
||||
@ -170,8 +175,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_bindir}/ocaml-xgettext
|
||||
|
||||
|
||||
%if !0%{?rhel}
|
||||
%files camomile
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING
|
||||
%{_libdir}/ocaml/gettext-camomile
|
||||
%if %opt
|
||||
@ -183,7 +188,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files camomile-devel
|
||||
%defattr(-,root,root,-)
|
||||
%doc README
|
||||
%if %opt
|
||||
%{_libdir}/ocaml/gettext-camomile/*.a
|
||||
@ -191,9 +195,14 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/ocaml/gettext-camomile/*.cmx
|
||||
%endif
|
||||
%{_libdir}/ocaml/gettext-camomile/*.mli
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 25 2012 Richard W.M. Jones <rjones@redhat.com> - 0.3.4-6
|
||||
- (RHEL only) Disable camomile, ocaml-ounit, tests.
|
||||
- Modernize the spec file.
|
||||
|
||||
* Sat Jul 28 2012 Richard W.M. Jones <rjones@redhat.com> - 0.3.4-5
|
||||
- Bump and rebuild against new OCaml 4.00.0 official release.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user