SPECS: ocaml.spec - added ocaml-doc-info subpkg (but info page suf...

twittner twittner at pld-linux.org
Fri Aug 26 19:13:19 CEST 2005


Author: twittner                     Date: Fri Aug 26 17:13:19 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added ocaml-doc-info subpkg (but info page suffer from
  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

---- Files affected:
SPECS:
   ocaml.spec (1.98 -> 1.99) 

---- Diffs:

================================================================
Index: SPECS/ocaml.spec
diff -u SPECS/ocaml.spec:1.98 SPECS/ocaml.spec:1.99
--- SPECS/ocaml.spec:1.98	Mon Aug 15 17:59:03 2005
+++ SPECS/ocaml.spec	Fri Aug 26 19:13:12 2005
@@ -16,7 +16,7 @@
 Summary(pl):	Kompilator OCamla (Objective Caml) oraz środowisko programistyczne
 Name:		ocaml
 Version:	3.08.4
-Release:	1
+Release:	2
 Epoch:		1
 License:	distributable
 Vendor:		Group of implementors <caml-light at inria.fr>
@@ -39,6 +39,8 @@
 # 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
@@ -51,6 +53,7 @@
 %{!?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
@@ -78,17 +81,38 @@
 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
-PostScript documentation for OCaml. HTML documentation is in main package.
+PostScript documentation for OCaml.
 
 %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
@@ -215,6 +239,17 @@
 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
@@ -278,9 +313,9 @@
 mkdir examples
 tar xjf %{SOURCE7} -C examples
 tar xzf %{SOURCE8} -C examples
+tar xzf %{SOURCE9}
 # order mess with docs somewhat
-mkdir docs
-mkdir docs/html
+mkdir -p docs/html
 mv htmlman docs/html/ocaml
 cp %{SOURCE2} docs/ocaml.ps.gz
 mv camlp4-%{p4ver}-manual.html docs/html/camlp4
@@ -293,10 +328,18 @@
 #%patch3 -p1
 %patch4 -p1
 
-%build
+# 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 at -pg -O -DPROFILING@ $(CFLAGS) @' asmrun/Makefile
+%{__sed} -i -e 's at -O@$(CFLAGS)@' otherlibs/systhreads/Makefile
+
+%build 
 cp -f /usr/share/automake/config.sub config/gnu
 ./configure \
-        -cc "%{__cc} %{rpmcflags}" \
+        -cc "%{__cc}" \
 	-bindir %{_bindir} \
 	-libdir %{_libdir}/%{name} \
 	-mandir %{_mandir}/man1 \
@@ -305,12 +348,12 @@
 	-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 -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} \
@@ -360,9 +403,18 @@
 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
 
+%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
@@ -378,7 +430,6 @@
 %files
 %defattr(644,root,root,755)
 %doc LICENSE Changes README Upgrading
-%doc docs/html/ocaml
 %attr(755,root,root) %{_bindir}/ocaml*
 %{!?_without_tk:%exclude %{_bindir}/ocamlbrowser}
 %exclude %{_bindir}/ocamlrun
@@ -423,7 +474,6 @@
 
 %files camlp4
 %defattr(644,root,root,755)
-%doc docs/html/camlp4*
 %attr(755,root,root) %{_bindir}/*camlp4*
 %attr(755,root,root) %{_bindir}/ocpp
 # Not installed since 3.05, is is needed?
@@ -432,6 +482,10 @@
 %{_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)
@@ -472,16 +526,34 @@
 %{_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-info
+%defattr(644,root,root,755)
+%{_infodir}/ocaml.info*
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.99  2005/08/26 17:13:12  twittner
+- added ocaml-doc-info subpkg (but info page suffer from
+  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
+
 Revision 1.98  2005/08/15 15:59:03  qboosh
 - updated to 3.08.4, removed outdated gcc-pr21291-workaround patch
 - updated pure-fun and ds-contrib source URL
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ocaml.spec?r1=1.98&r2=1.99&f=u




More information about the pld-cvs-commit mailing list