2008-04-27 21:50:16 +00:00
|
|
|
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
Name: ocaml-gettext
|
2008-04-30 09:03:51 +00:00
|
|
|
Version: 0.3.0
|
|
|
|
Release: 1%{?dist}
|
2008-04-27 21:50:16 +00:00
|
|
|
Summary: OCaml library for i18n
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
License: LGPLv2+ with exceptions
|
|
|
|
URL: http://sylvain.le-gall.net/ocaml-gettext.html
|
|
|
|
Source0: http://sylvain.le-gall.net/download/%{name}-%{version}.tar.gz
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
|
|
|
|
BuildRequires: ocaml >= 3.10.0
|
2008-04-30 09:03:51 +00:00
|
|
|
BuildRequires: ocaml-findlib-devel >= 1.2.1-3
|
2008-04-27 21:50:16 +00:00
|
|
|
BuildRequires: ocaml-ocamldoc
|
|
|
|
BuildRequires: ocaml-camlp4-devel
|
|
|
|
BuildRequires: ocaml-fileutils-devel
|
|
|
|
BuildRequires: ocaml-camlidl-devel
|
|
|
|
BuildRequires: docbook-style-xsl
|
|
|
|
BuildRequires: libxslt
|
|
|
|
BuildRequires: libxml2
|
|
|
|
BuildRequires: chrpath
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
|
|
|
# When https://bugzilla.redhat.com/show_bug.cgi?id=438486 is fixed
|
|
|
|
# we can remove the ifarch ppc64 stuff in this file. In the meantime
|
|
|
|
# we have to build without camomile on ppc64.
|
|
|
|
%ifnarch ppc64
|
|
|
|
BuildRequires: ocaml-camomile-devel >= 0.7.1
|
|
|
|
BuildRequires: 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
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
Ocaml-gettext provides support for internationalization of Ocaml
|
|
|
|
programs.
|
|
|
|
|
|
|
|
Constraints :
|
|
|
|
|
|
|
|
* provides a pure Ocaml implementation,
|
|
|
|
* the API should be as close as possible to GNU gettext,
|
|
|
|
* provides a way to automatically extract translatable
|
|
|
|
strings from Ocaml source code.
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and signature files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
%ifnarch ppc64
|
|
|
|
%package camomile
|
|
|
|
Summary: Parts of %{name} which depend on Camomile
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description camomile
|
|
|
|
The %{name}-camomile package contains the parts of %{name} which
|
|
|
|
depend on Camomile.
|
|
|
|
|
|
|
|
|
|
|
|
%package camomile-devel
|
|
|
|
Summary: Development files for %{name}-camomile
|
|
|
|
Group: Development/Libraries
|
|
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description camomile-devel
|
|
|
|
The %{name}-camomile-devel package contains libraries and
|
|
|
|
signature files for developing applications that use
|
|
|
|
%{name}-camomile.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%ifnarch ppc64
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
|
./configure \
|
|
|
|
--libdir=%{_libdir} \
|
2008-04-30 09:03:51 +00:00
|
|
|
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
|
2008-04-27 21:50:16 +00:00
|
|
|
%else
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS" \
|
|
|
|
./configure \
|
|
|
|
--libdir=%{_libdir} \
|
|
|
|
--disable-camomile \
|
2008-04-30 09:03:51 +00:00
|
|
|
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
|
|
|
make
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
# make install in the package is screwed up completely. Install
|
|
|
|
# by hand instead.
|
|
|
|
export DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
|
|
|
mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
|
2008-04-30 09:03:51 +00:00
|
|
|
# Remove *.o files - these shouldn't be distributed.
|
|
|
|
find _build -name '*.o' -exec rm {} \;
|
|
|
|
|
|
|
|
ocamlfind install gettext _build/lib/gettext/*
|
|
|
|
ocamlfind install gettext-stub _build/lib/gettext-stub/*
|
2008-04-27 21:50:16 +00:00
|
|
|
%ifnarch ppc64
|
2008-04-30 09:03:51 +00:00
|
|
|
ocamlfind install gettext-camomile _build/lib/gettext-camomile/*
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
2008-04-30 09:03:51 +00:00
|
|
|
install -m 0755 _build/bin/* $RPM_BUILD_ROOT%{_bindir}/
|
2008-04-27 21:50:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
|
|
|
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
|
|
|
|
%if %opt
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.a
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.a
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
2008-04-30 09:03:51 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.mli
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.mli
|
2008-04-27 21:50:16 +00:00
|
|
|
%{_libdir}/ocaml/stublibs/*.so
|
|
|
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README CHANGELOG TODO
|
|
|
|
# %doc build/share/doc/html/*
|
|
|
|
%if %opt
|
|
|
|
%{_libdir}/ocaml/gettext/*.a
|
|
|
|
%{_libdir}/ocaml/gettext/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%{_libdir}/ocaml/gettext/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%{_libdir}/ocaml/gettext-stub/*.a
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%{_libdir}/ocaml/gettext-stub/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
2008-04-30 09:03:51 +00:00
|
|
|
%{_libdir}/ocaml/gettext/*.mli
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.mli
|
2008-04-27 21:50:16 +00:00
|
|
|
%{_bindir}/ocaml-gettext
|
|
|
|
%{_bindir}/ocaml-xgettext
|
|
|
|
|
|
|
|
|
|
|
|
%ifnarch ppc64
|
|
|
|
%files camomile
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING
|
|
|
|
%{_libdir}/ocaml/gettext-camomile
|
|
|
|
%if %opt
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-camomile/*.a
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext-camomile/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
2008-04-30 09:03:51 +00:00
|
|
|
%exclude %{_libdir}/ocaml/gettext-camomile/*.mli
|
2008-04-27 21:50:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files camomile-devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README
|
|
|
|
%if %opt
|
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.a
|
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.cmxa
|
2008-04-30 09:03:51 +00:00
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.cmx
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
2008-04-30 09:03:51 +00:00
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.mli
|
2008-04-27 21:50:16 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2008-04-30 09:03:51 +00:00
|
|
|
* Wed Apr 30 2008 Richard W.M. Jones <rjones@redhat.com> - 0.3.0-1
|
|
|
|
- New upstream version 0.3.0.
|
|
|
|
- Big patch no longer required (integrated with upstream).
|
|
|
|
- findlib < 1.2.1-3 known not to work with this.
|
|
|
|
- build/ -> _build/
|
|
|
|
- Re-enable documentation.
|
|
|
|
- Prevent *.o files from being distributed.
|
|
|
|
- Distribute *.cmx and *.mli files.
|
|
|
|
|
2008-04-27 21:50:16 +00:00
|
|
|
* Sat Apr 26 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.0-3.20080321patch
|
|
|
|
- Change the naming scheme to conform with "Snapshot packages" guideline.
|
|
|
|
- Don't duplicate all the docs in camomile-devel.
|
|
|
|
- Disable documentation. Wants 'fop', but 'fop' throws a giant Java
|
|
|
|
exception when present.
|
|
|
|
|
|
|
|
* Thu Apr 17 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.0-2rwmj20080321
|
|
|
|
- Build camomile subpackages because the camomile dependency is
|
|
|
|
rather large. However we can't build camomile on ppc64 yet so
|
|
|
|
don't build those subpackages there.
|
|
|
|
|
|
|
|
* Fri Mar 21 2008 Richard W.M. Jones <rjones@redhat.com> - 0.2.0-1rwmj20080321
|
|
|
|
- Initial RPM release.
|