84 lines
2.7 KiB
RPMSpec
84 lines
2.7 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
Name: ocaml-gettext
|
|
Version: 0.3.7
|
|
Release: 8
|
|
Summary: Internationalization library for OCaml
|
|
License: LGPLv2+ with exceptions
|
|
URL: https://github.com/gildor478/ocaml-gettext
|
|
Source0: https://github.com/gildor478/ocaml-gettext/archive/%{version}.tar.gz
|
|
Patch0001: ocaml-gettext-0.3.7-bytes-fix.patch
|
|
BuildRequires: ocaml >= 4.00.1 ocaml-findlib-devel >= 1.3.3-3 ocaml-ocamldoc ocaml-camlp4-devel
|
|
BuildRequires: ocaml-fileutils-devel >= 0.4.4-4 docbook-style-xsl
|
|
BuildRequires: libxslt libxml2 chrpath autoconf automake
|
|
|
|
%global __ocaml_requires_opts -i Asttypes -i Parsetree
|
|
%global __ocaml_provides_opts -i Pr_gettext
|
|
|
|
%description
|
|
The package is used to support for internationalization of Ocaml programs.
|
|
|
|
%package devel
|
|
Summary: Development files for ocaml-gettext
|
|
Requires: ocaml-gettext = %{version}-%{release}
|
|
Requires: ocaml-fileutils-devel >= 0.4.0
|
|
|
|
%description devel
|
|
The ocaml-gettext-devel package contains development and libraries and files for ocaml-gettext.
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
autoreconf -i
|
|
|
|
%build
|
|
unset MAKEFLAGS
|
|
CFLAGS="$RPM_OPT_FLAGS" ./configure --libdir=%{_libdir} --disable-camomile \
|
|
--with-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets
|
|
make all
|
|
|
|
%install
|
|
export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
|
|
install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
|
|
install -d $RPM_BUILD_ROOT%{_bindir}
|
|
ocamlfind install gettext _build/lib/gettext/*
|
|
ocamlfind install gettext-stub _build/lib/gettext-stub/*
|
|
cp _build/bin/ocaml-gettext $RPM_BUILD_ROOT%{_bindir}/
|
|
chmod 0755 $RPM_BUILD_ROOT%{_bindir}/ocaml-gettext
|
|
cp _build/bin/ocaml-xgettext $RPM_BUILD_ROOT%{_bindir}/
|
|
chmod 0755 $RPM_BUILD_ROOT%{_bindir}/ocaml-xgettext
|
|
chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so
|
|
|
|
%files
|
|
%doc COPYING
|
|
%{_libdir}/ocaml/gettext/*.cma
|
|
%{_libdir}/ocaml/gettext/*.cmi
|
|
%{_libdir}/ocaml/gettext/*.cmo
|
|
%{_libdir}/ocaml/gettext/META
|
|
%{_libdir}/ocaml/stublibs/*.so
|
|
%{_libdir}/ocaml/stublibs/*.so.owner
|
|
%{_libdir}/ocaml/gettext-stub/*.cma
|
|
%{_libdir}/ocaml/gettext-stub/*.cmi
|
|
%{_libdir}/ocaml/gettext-stub/META
|
|
%exclude %{_libdir}/ocaml/gettext-stub/*.o
|
|
|
|
%files devel
|
|
%doc README CHANGELOG TODO
|
|
%{_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
|
|
%{_libdir}/ocaml/gettext/*.ml
|
|
%{_libdir}/ocaml/gettext/*.mli
|
|
%{_libdir}/ocaml/gettext-stub/*.ml
|
|
%{_bindir}/ocaml-gettext
|
|
%{_bindir}/ocaml-xgettext
|
|
|
|
%changelog
|
|
* Tue Mar 17 2020 Ling Yang <lingyang2@huawei.com> - 0.3.7-8
|
|
- Remove camomile package
|
|
|
|
* Thu Feb 27 2020 zhujunhao <zhujunhao5@huawei.com> - 0.3.7-7
|
|
- Package init
|