|
|
|
@ -1,24 +1,30 @@
|
|
|
|
|
%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
|
|
|
|
|
|
|
|
|
|
# Optionally disable camomile dep on RHEL.
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
%bcond_without camomile
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with camomile
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: ocaml-gettext
|
|
|
|
|
Version: 0.3.5
|
|
|
|
|
Release: 10%{?dist}.1
|
|
|
|
|
Version: 0.4.2
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: OCaml library for i18n
|
|
|
|
|
|
|
|
|
|
License: LGPLv2+ with exceptions
|
|
|
|
|
URL: http://forge.ocamlcore.org/projects/ocaml-gettext
|
|
|
|
|
URL: https://github.com/gildor478/ocaml-gettext
|
|
|
|
|
|
|
|
|
|
Source0: https://forge.ocamlcore.org/frs/download.php/1433/%{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
Patch1: ocaml-gettext-0.3.4-use-ocamlopt-g.patch
|
|
|
|
|
# Disable warning 31, so we can compile (with warnings) on OCaml 4.04.
|
|
|
|
|
Patch2: ocaml-gettext-0.3.5-disable-warning-31.patch
|
|
|
|
|
Source0: https://github.com/gildor478/%{name}/archive/v%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: ocaml >= 4.00.1
|
|
|
|
|
BuildRequires: ocaml-findlib-devel >= 1.3.3-3
|
|
|
|
|
BuildRequires: ocaml-compiler-libs
|
|
|
|
|
BuildRequires: ocaml-ocamldoc
|
|
|
|
|
BuildRequires: ocaml-camlp4-devel
|
|
|
|
|
BuildRequires: ocaml-fileutils-devel >= 0.4.4-4
|
|
|
|
|
BuildRequires: ocaml-dune-devel
|
|
|
|
|
BuildRequires: ocaml-cppo
|
|
|
|
|
BuildRequires: docbook-style-xsl
|
|
|
|
|
BuildRequires: libxslt
|
|
|
|
|
BuildRequires: libxml2
|
|
|
|
@ -26,11 +32,14 @@ BuildRequires: chrpath
|
|
|
|
|
BuildRequires: autoconf
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
BuildRequires: ocaml-ounit-devel
|
|
|
|
|
BuildRequires: ocaml-camomile-devel >= 0.8.1
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with camomile}
|
|
|
|
|
BuildRequires: ocaml-camomile-devel >= 0.8.6-3
|
|
|
|
|
BuildRequires: ocaml-camomile-data
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: autoconf, automake
|
|
|
|
|
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
%if %{with camomile}
|
|
|
|
|
# ocaml-gettext program needs camomile data files
|
|
|
|
|
Requires: ocaml-camomile-data
|
|
|
|
|
%endif
|
|
|
|
@ -64,7 +73,7 @@ The %{name}-devel package contains libraries and signature files for
|
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
%if %{with camomile}
|
|
|
|
|
%package camomile
|
|
|
|
|
Summary: Parts of %{name} which depend on Camomile
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
@ -89,99 +98,89 @@ signature files for developing applications that use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
%autopatch -p1
|
|
|
|
|
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch2 -p1
|
|
|
|
|
# Remove dependency on batteries.
|
|
|
|
|
sed -i -e 's/batteries//' test/dune
|
|
|
|
|
sed -i -e 's/batteries//' test/test-stub/dune
|
|
|
|
|
|
|
|
|
|
%if %{without camomile}
|
|
|
|
|
# Remove dependency on camomile.
|
|
|
|
|
rm -r src/lib/gettext-camomile
|
|
|
|
|
rm -r test/test-camomile
|
|
|
|
|
sed -i -e 's/camomile//' `find -name dune`
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Parallel builds don't work.
|
|
|
|
|
unset MAKEFLAGS
|
|
|
|
|
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
|
|
|
|
|
make build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %opt
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
pushd test
|
|
|
|
|
../_build/bin/test
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
%endif
|
|
|
|
|
#check
|
|
|
|
|
# Tests require batteries, so they are disabled at present.
|
|
|
|
|
# Under discussion with upstream.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# 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%{_libdir}/ocaml
|
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
|
|
|
|
dune install --destdir=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
# Remove *.o files - these shouldn't be distributed.
|
|
|
|
|
find _build -name '*.o' -exec rm {} \;
|
|
|
|
|
# Remove this, we will use our own rules for documentation.
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/doc
|
|
|
|
|
|
|
|
|
|
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/*
|
|
|
|
|
%if %{without camomile}
|
|
|
|
|
# If you use --without camomile but happen to have the camomile
|
|
|
|
|
# packages installed then it will still build them.
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT/%{_libdir}/ocaml/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}/
|
|
|
|
|
|
|
|
|
|
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc COPYING
|
|
|
|
|
%doc LICENSE.txt
|
|
|
|
|
%{_libdir}/ocaml/gettext
|
|
|
|
|
%{_libdir}/ocaml/gettext-stub
|
|
|
|
|
%if %opt
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.a
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.cmxa
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.cmx
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*/*.a
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*/*.cmxa
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*/*.cmx
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.a
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.cmxa
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.cmx
|
|
|
|
|
%endif
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.ml
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*.mli
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*/*.ml
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext/*/*.mli
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.ml
|
|
|
|
|
%{_libdir}/ocaml/stublibs/*.so
|
|
|
|
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%doc README CHANGELOG TODO
|
|
|
|
|
%doc README.md CHANGES.md THANKS TODO.md
|
|
|
|
|
# %doc build/share/doc/html/*
|
|
|
|
|
%if %opt
|
|
|
|
|
%{_libdir}/ocaml/gettext/*.a
|
|
|
|
|
%{_libdir}/ocaml/gettext/*.cmxa
|
|
|
|
|
%{_libdir}/ocaml/gettext/*.cmx
|
|
|
|
|
%{_libdir}/ocaml/gettext/*/*.a
|
|
|
|
|
%{_libdir}/ocaml/gettext/*/*.cmxa
|
|
|
|
|
%{_libdir}/ocaml/gettext/*/*.cmx
|
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.a
|
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.cmxa
|
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.cmx
|
|
|
|
|
%endif
|
|
|
|
|
%{_libdir}/ocaml/gettext/*.ml
|
|
|
|
|
%{_libdir}/ocaml/gettext/*.mli
|
|
|
|
|
%{_libdir}/ocaml/gettext/*/*.ml
|
|
|
|
|
%{_libdir}/ocaml/gettext/*/*.mli
|
|
|
|
|
%{_libdir}/ocaml/gettext-stub/*.ml
|
|
|
|
|
%{_bindir}/ocaml-gettext
|
|
|
|
|
%{_bindir}/ocaml-xgettext
|
|
|
|
|
%{_mandir}/man1/ocaml-gettext.1*
|
|
|
|
|
%{_mandir}/man1/ocaml-xgettext.1*
|
|
|
|
|
%{_mandir}/man5/ocaml-gettext.5*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if !0%{?rhel}
|
|
|
|
|
%if %{with camomile}
|
|
|
|
|
%files camomile
|
|
|
|
|
%doc COPYING
|
|
|
|
|
%doc LICENSE.txt
|
|
|
|
|
%{_libdir}/ocaml/gettext-camomile
|
|
|
|
|
%if %opt
|
|
|
|
|
%exclude %{_libdir}/ocaml/gettext-camomile/*.a
|
|
|
|
@ -192,7 +191,7 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files camomile-devel
|
|
|
|
|
%doc README
|
|
|
|
|
%doc README.md
|
|
|
|
|
%if %opt
|
|
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.a
|
|
|
|
|
%{_libdir}/ocaml/gettext-camomile/*.cmxa
|
|
|
|
@ -203,10 +202,133 @@ chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Aug 30 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-10.fc26.1
|
|
|
|
|
* Tue Mar 30 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-3
|
|
|
|
|
- Bump and rebuild for ELN.
|
|
|
|
|
|
|
|
|
|
* Mon Mar 8 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-2
|
|
|
|
|
- Better handling of optional camomile subpackage.
|
|
|
|
|
|
|
|
|
|
* Tue Mar 2 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.2-1
|
|
|
|
|
- New upstream version 4.2
|
|
|
|
|
- Remove patch now upstream.
|
|
|
|
|
- BR ocaml-cppo
|
|
|
|
|
|
|
|
|
|
* Mon Mar 1 23:22:35 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-9
|
|
|
|
|
- OCaml 4.12.0 build
|
|
|
|
|
|
|
|
|
|
* Wed Feb 24 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-8
|
|
|
|
|
- Remove ocaml-camomile dep on RHEL 9.
|
|
|
|
|
|
|
|
|
|
* Mon Feb 1 2021 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-7
|
|
|
|
|
- Bump and rebuild for updated ocaml-camomile.
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-5
|
|
|
|
|
- OCaml 4.11.1 rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-4
|
|
|
|
|
- OCaml 4.11.0 rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-2
|
|
|
|
|
- OCaml 4.11.0+dev2-2020-04-22 rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Apr 22 2020 Richard W.M. Jones <rjones@redhat.com> - 0.4.1-1
|
|
|
|
|
- New upstream version 0.4.1.
|
|
|
|
|
- Add small fix for OCaml 4.11.
|
|
|
|
|
- Package the man pages.
|
|
|
|
|
|
|
|
|
|
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.7.git3aecf8e5350f
|
|
|
|
|
- OCaml 4.11.0 pre-release attempt 2
|
|
|
|
|
|
|
|
|
|
* Sat Apr 04 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.6.git3aecf8e5350f
|
|
|
|
|
- Update all OCaml dependencies for RPM 4.16.
|
|
|
|
|
|
|
|
|
|
* Thu Feb 27 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.5.git3aecf8e5350f
|
|
|
|
|
- OCaml 4.10.0 final.
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.8-0.4.git3aecf8e5350f
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.3.git3aecf8e5350f
|
|
|
|
|
- OCaml 4.10.0+beta1 rebuild.
|
|
|
|
|
|
|
|
|
|
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.2.git3aecf8e5350f
|
|
|
|
|
- OCaml 4.09.0 (final) rebuild.
|
|
|
|
|
|
|
|
|
|
* Tue Oct 1 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.8-0.1
|
|
|
|
|
- Move to pre-release of 0.3.8.
|
|
|
|
|
- Requires dune.
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-13
|
|
|
|
|
- Bump release and rebuild.
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-12
|
|
|
|
|
- OCaml 4.08.1 (final) rebuild.
|
|
|
|
|
|
|
|
|
|
* Wed Jul 31 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-11
|
|
|
|
|
- OCaml 4.08.1 (rc2) rebuild.
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 19 2019 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-9
|
|
|
|
|
- Remove camlp4 dependency.
|
|
|
|
|
- Add all upstream patches since 0.3.7.
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 11 2018 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-5
|
|
|
|
|
- OCaml 4.07.0 (final) rebuild.
|
|
|
|
|
|
|
|
|
|
* Wed Jun 20 2018 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-4
|
|
|
|
|
- OCaml 4.07.0-rc1 rebuild.
|
|
|
|
|
|
|
|
|
|
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.7-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Nov 08 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-2
|
|
|
|
|
- OCaml 4.06.0 rebuild.
|
|
|
|
|
- Add fix for immutable strings.
|
|
|
|
|
|
|
|
|
|
* Sat Sep 23 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.7-1
|
|
|
|
|
- Update to new upstream version 0.3.7.
|
|
|
|
|
- New URL.
|
|
|
|
|
- Include upstream patches since 0.3.7 was released.
|
|
|
|
|
|
|
|
|
|
* Wed Aug 30 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-18
|
|
|
|
|
- Subpackage ocaml-gettext-camomile-devel should depend on
|
|
|
|
|
ocaml-gettext-camomile (thanks: Pino Toscano).
|
|
|
|
|
|
|
|
|
|
* Mon Aug 07 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-17
|
|
|
|
|
- OCaml 4.05.0 rebuild.
|
|
|
|
|
|
|
|
|
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-16
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-15
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-14
|
|
|
|
|
- Bump release and rebuild.
|
|
|
|
|
|
|
|
|
|
* Mon Jun 26 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-13
|
|
|
|
|
- OCaml 4.04.2 rebuild.
|
|
|
|
|
|
|
|
|
|
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-12
|
|
|
|
|
- Bump release and rebuild.
|
|
|
|
|
|
|
|
|
|
* Fri May 12 2017 Richard W.M. Jones <rjones@redhat.com> - 0.3.5-11
|
|
|
|
|
- OCaml 4.04.1 rebuild.
|
|
|
|
|
|
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.5-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|