lack of index).
- moved html docs in separate subpkgs: ocaml-doc-html,
ocaml-camlp4-doc-html. Updated descriptions.
- replace (by editing Makefiles by sed) hardcoded `-O',
`-pg', `-DPROFILING' with $(CFLAGS). Allow passing
CFLAGS="%%{rpmcflags}" directly to make. BR: sed >= 4.0
- rel. 2
Changed files:
ocaml.spec -> 1.99
Summary(pl): Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
Name: ocaml
Version: 3.08.4
Summary(pl): Kompilator OCamla (Objective Caml) oraz ¶rodowisko programistyczne
Name: ocaml
Version: 3.08.4
Epoch: 1
License: distributable
Vendor: Group of implementors <caml-light@inria.fr>
Epoch: 1
License: distributable
Vendor: Group of implementors <caml-light@inria.fr>
# Source7-md5: 567bc681b4cc1cfcbbfb6fa5f012019b
Source8: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
# Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
# Source7-md5: 567bc681b4cc1cfcbbfb6fa5f012019b
Source8: http://www.ocaml.info/ocaml_sources/ds-contrib.tar.gz
# Source8-md5: 77fa1da7375dea1393cc0b6cd802d7e1
+Source9: http://caml.inria.fr/distrib/%{name}-%{sver}/%{name}-%{sver}-refman.info.tar.gz
+# Source9-md5: 49b68ec07ccd7ce45eb6bd3f3fdee140
Patch0: %{name}-build.patch
Patch1: %{name}-db3.patch
Patch2: %{name}-objinfo.patch
Patch0: %{name}-build.patch
Patch1: %{name}-db3.patch
Patch2: %{name}-objinfo.patch
%{!?with_db3:BuildRequires: db-devel >= 4.1}
%{?with_tk:BuildRequires: tk-devel}
%if %{with emacs}
%{!?with_db3:BuildRequires: db-devel >= 4.1}
%{?with_tk:BuildRequires: tk-devel}
%if %{with emacs}
+BuildRequires: sed >= 4.0
BuildRequires: xemacs
BuildRequires: xemacs-common
BuildRequires: xemacs-fsf-compat-pkg
BuildRequires: xemacs
BuildRequires: xemacs-common
BuildRequires: xemacs-fsf-compat-pkg
pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
(ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
pracy, narzêdzia do tworzenia analizatorów leksykalnych oraz sk³adniowych
(ocamllex, ocamlyacc), odpluskwiacz (ocamldebug) i biblioteki.
+%package doc-html
+Summary: HTML documentation for OCaml
+Summary(pl): Dokumentacja dla OCamla w formacie HTML
+Group: Development/Tools
+
+%description doc-html
+HTML documentation for OCaml.
+
+%description doc-html -l pl
+Dokumentacja dla OCamla w formacie HTML.
+
%package doc-ps
Summary: PostScript documentation for OCaml
Summary(pl): Dokumentacja dla OCamla w formacie PostScript
Group: Development/Tools
%description doc-ps
%package doc-ps
Summary: PostScript documentation for OCaml
Summary(pl): Dokumentacja dla OCamla w formacie PostScript
Group: Development/Tools
%description doc-ps
-PostScript documentation for OCaml. HTML documentation is in main package.
+PostScript documentation for OCaml.
%description doc-ps -l pl
%description doc-ps -l pl
-Dokumentacja dla OCamla w formacie PostScript. Dokumentacja HTML jest
-w g³ównym pakiecie.
+Dokumentacja dla OCamla w formacie PostScript.
+
+%package doc-info
+Summary: Info documentation for OCaml
+Summary(pl): Dokumentacja info dla OCamla
+Group: Development/Tools
+
+%description doc-info
+Info documentation for OCaml.
+
+%description doc-info -l pl
+Dokumentacja info dla OCamla.
%package emacs
Summary: Emacs mode for OCaml
%package emacs
Summary: Emacs mode for OCaml
poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
sk³adni na drug±.
poprawionej sk³adni OCamla. Potrafi tak¿e t³umaczyæ programy z jednej
sk³adni na drug±.
+%package camlp4-doc-html
+Summary: Objective Caml Preprocessor - HTML documentation
+Summary(pl): Preprocesor OCamla - dokumentacja HTML
+Group: Development/Languages
+
+%description camlp4-doc-html
+Objective Caml Preprocessor - HTML documentation.
+
+%description camlp4-doc-html -l pl
+Preprocesor OCamla - dokumentacja HTML.
+
%package compiler-objects
Summary: Compiled parts of OCaml compiler
Summary(pl): Skompilowane czê¶ci kompilatora OCamla
%package compiler-objects
Summary: Compiled parts of OCaml compiler
Summary(pl): Skompilowane czê¶ci kompilatora OCamla
mkdir examples
tar xjf %{SOURCE7} -C examples
tar xzf %{SOURCE8} -C examples
mkdir examples
tar xjf %{SOURCE7} -C examples
tar xzf %{SOURCE8} -C examples
# order mess with docs somewhat
# order mess with docs somewhat
-mkdir docs
-mkdir docs/html
mv htmlman docs/html/ocaml
cp %{SOURCE2} docs/ocaml.ps.gz
mv camlp4-%{p4ver}-manual.html docs/html/camlp4
mv htmlman docs/html/ocaml
cp %{SOURCE2} docs/ocaml.ps.gz
mv camlp4-%{p4ver}-manual.html docs/html/camlp4
+# allow pass CFLAGS, replace -O, -pg,-DPROFILING with $(CFAGS)
+Makefiles=$(find . -type f -name Makefile\*)
+%{__sed} -i -e 's@^CFLAGS[ \t]*=@override CFLAGS += @' $Makefiles
+%{__sed} -i -e 's@\(^override CFLAGS += .*\)-O \(.*\)@\1\2@' $Makefiles
+%{__sed} -i -e 's@^CCFLAGS[ \t]*=\(.*\)@override CCFLAGS += \1 $(CFLAGS)@' $Makefiles
+%{__sed} -i -e 's@-pg -O -DPROFILING@ $(CFLAGS) @' asmrun/Makefile
+%{__sed} -i -e 's@-O@$(CFLAGS)@' otherlibs/systhreads/Makefile
+
+%build
cp -f /usr/share/automake/config.sub config/gnu
./configure \
cp -f /usr/share/automake/config.sub config/gnu
./configure \
- -cc "%{__cc} %{rpmcflags}" \
-bindir %{_bindir} \
-libdir %{_libdir}/%{name} \
-mandir %{_mandir}/man1 \
-bindir %{_bindir} \
-libdir %{_libdir}/%{name} \
-mandir %{_mandir}/man1 \
-with-pthread \
-x11lib /usr/X11R6/%{_lib}
-with-pthread \
-x11lib /usr/X11R6/%{_lib}
-%{__make} world bootstrap opt.opt
-%{__make} -C tools objinfo
+%{__make} world bootstrap opt.opt CFLAGS="%{rpmcflags} -Wall"
+%{__make} -C tools objinfo CFLAGS="%{rpmcflags} -Wall"
%install
rm -rf $RPM_BUILD_ROOT
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_includedir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
+install -d $RPM_BUILD_ROOT{%{_includedir},%{_infodir},%{_examplesdir}/%{name}-{labltk-,}%{version}}
%{__make} install \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
%{__make} install \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
rm -rf $RPM_BUILD_ROOT%{_mandir}/man3
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/labltk/{labltktop,pp}
+# install info pages
+cp -f infoman/*.gz $RPM_BUILD_ROOT%{_infodir}
+
%clean
rm -rf $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
+%post doc-info
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+
+%postun doc-info
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+
%files runtime
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ocamlrun
%files runtime
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/ocamlrun
%files
%defattr(644,root,root,755)
%doc LICENSE Changes README Upgrading
%files
%defattr(644,root,root,755)
%doc LICENSE Changes README Upgrading
%attr(755,root,root) %{_bindir}/ocaml*
%{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
%exclude %{_bindir}/ocamlrun
%attr(755,root,root) %{_bindir}/ocaml*
%{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
%exclude %{_bindir}/ocamlrun
%files camlp4
%defattr(644,root,root,755)
%files camlp4
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/*camlp4*
%attr(755,root,root) %{_bindir}/ocpp
# Not installed since 3.05, is is needed?
%attr(755,root,root) %{_bindir}/*camlp4*
%attr(755,root,root) %{_bindir}/ocpp
# Not installed since 3.05, is is needed?
%{_mandir}/man*/*camlp4*
%{_mandir}/man*/*ocpp*
%{_mandir}/man*/*camlp4*
%{_mandir}/man*/*ocpp*
+%files camlp4-doc-html
+%defattr(644,root,root,755)
+%doc docs/html/camlp4*
+
%if %{with tk}
%files labltk-devel
%defattr(644,root,root,755)
%if %{with tk}
%files labltk-devel
%defattr(644,root,root,755)
%{_libdir}/%{name}/ocamldoc/*.cm*
%{_libdir}/%{name}/ocamldoc/*.a
%{_libdir}/%{name}/ocamldoc/*.cm*
%{_libdir}/%{name}/ocamldoc/*.a
+%files doc-html
+%defattr(644,root,root,755)
+%doc docs/html/ocaml/*
+
%files doc-ps
%defattr(644,root,root,755)
%doc docs/*.ps.gz
%files doc-ps
%defattr(644,root,root,755)
%doc docs/*.ps.gz
+
+%files doc-info
+%defattr(644,root,root,755)
+%{_infodir}/ocaml.info*