Browse Source

2015-01-26 Ryoichi INAGAKI <ryo1@toki.waseda.jp>

	* ledit: rebuilt
	* ocaml, ocaml-findlib: updated
	* ocaml-camlp4, ocaml-labltk: split from ocaml
	* ocaml-camlp5, pcaml-facile: updated and renamed
	


git-svn-id: http://trac.vinelinux.org/repos/projects/specs@9296 ec354946-7b23-47d6-9f5a-488ba84defc7
inagaki 9 years ago
parent
commit
a9d290a64d

+ 6 - 3
l/ledit/ledit-vl.spec

@@ -4,7 +4,7 @@ Summary: Line editor
 Summary(ja): ラインエディタ
 Summary(ja): ラインエディタ
 Name: ledit
 Name: ledit
 Version: 2.03
 Version: 2.03
-Release: 2%{?_dist_release}
+Release: 3%{?_dist_release}
 
 
 License: BSD
 License: BSD
 Group: Development/Tools
 Group: Development/Tools
@@ -13,8 +13,7 @@ URL: http://pauillac.inria.fr/~ddr/ledit/
 Source0: ledit-%{version}.tgz
 Source0: ledit-%{version}.tgz
 
 
 Buildroot: %{_tmppath}/%{name}-%{version}-root
 Buildroot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: camlp5
-BuildRequires: ocaml
+BuildRequires: ocaml-camlp5-devel
 BuildRequires: ncurses-devel
 BuildRequires: ncurses-devel
 
 
 %description
 %description
@@ -46,6 +45,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/*
 %{_mandir}/man1/*
 
 
 %changelog
 %changelog
+* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 2.03-3
+- rebuilt with ocaml 4.02.1 and ocaml-camlp5 6.12
+- used BR: ocaml-camlp5-devel instead of camlp5
+
 * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.03-2
 * Sat Dec 28 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.03-2
 - merge VinePlus/6 package
 - merge VinePlus/6 package
 
 

+ 136 - 0
o/ocaml-camlp4/ocaml-camlp4-vl.spec

@@ -0,0 +1,136 @@
+%define        ocaml_version 4.02.1
+%define        sup 2
+
+#ifarch %{ocaml_native_compiler}
+#global native_compiler 1
+#else
+#global native_compiler 0
+#endif
+
+Summary:       Pre-Processor-Pretty-Printer for OCaml
+Summary(ja):   OCaml 用プリプロセッサ、プリティプリンタ
+Name:          ocaml-camlp4
+Version:       %{ocaml_version}%{?sup:.%{sup}}
+Release:       1%{?_dist_release}
+
+Group:         Development/Languages
+License:       LGPLv2+ with exceptions
+URL:           https://github.com/ocaml/camlp4
+
+Source0:       https://github.com/ocaml/camlp4/archive/%{ocaml_version}%{?sup:+%{sup}}.tar.gz
+
+BuildRoot:     %{_tmppath}/%{name}-%{version}-root
+# This package used to be part of the upstream compiler.  We still
+# need to keep it in lock step with the compiler, so whenever a new
+# compiler is released we will also update this package also.
+BuildRequires: ocaml = %{ocaml_version}
+Requires:      ocaml(runtime) = %{ocaml_version}
+#Requires:     ocaml-runtime = %{version}
+
+%description
+Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
+file and printing some result on standard output.
+
+This package contains the runtime files.
+
+
+%package devel
+Summary:       Development files of Pre-Processor-Pretty-Printer for OCaml
+Summary(ja):   %{name} の開発用ファイル
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+
+%description devel
+Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
+file and printing some result on standard output.
+
+This package contains the development files.
+
+
+%prep
+%setup -q -n camlp4-%{ocaml_version}%{?sup:-%{sup}}
+
+
+%build
+./configure
+# Incompatible with parallel builds:
+unset MAKEFLAGS
+#%if !%{native_compiler}
+#make byte
+#%else
+make all
+#%endif
+
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/camlp4
+make install \
+  BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+  LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
+  PKGDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/camlp4
+
+
+%files
+%doc README.md LICENSE
+%dir %{_libdir}/ocaml/camlp4
+%{_libdir}/ocaml/camlp4/*.cmi
+%{_libdir}/ocaml/camlp4/*.cma
+%{_libdir}/ocaml/camlp4/*.cmo
+%dir %{_libdir}/ocaml/camlp4/Camlp4Filters
+%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmi
+%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmo
+%dir %{_libdir}/ocaml/camlp4/Camlp4Parsers
+%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmo
+%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmi
+%dir %{_libdir}/ocaml/camlp4/Camlp4Printers
+%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmi
+%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmo
+%dir %{_libdir}/ocaml/camlp4/Camlp4Top
+%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmi
+%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmo
+
+
+%files devel
+%doc LICENSE
+%{_bindir}/camlp4*
+%{_bindir}/mkcamlp4
+#if %{native_compiler}
+%{_libdir}/ocaml/camlp4/*.a
+%{_libdir}/ocaml/camlp4/*.cmxa
+%{_libdir}/ocaml/camlp4/*.cmx
+%{_libdir}/ocaml/camlp4/*.o
+%{_libdir}/ocaml/camlp4/Camlp4Filters/*.cmx
+%{_libdir}/ocaml/camlp4/Camlp4Filters/*.o
+%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.cmx
+%{_libdir}/ocaml/camlp4/Camlp4Parsers/*.o
+%{_libdir}/ocaml/camlp4/Camlp4Printers/*.cmx
+%{_libdir}/ocaml/camlp4/Camlp4Printers/*.o
+%{_libdir}/ocaml/camlp4/Camlp4Top/*.cmx
+%{_libdir}/ocaml/camlp4/Camlp4Top/*.o
+#endif
+
+
+%changelog
+* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.02.1.2-1
+- Initial build for Vine Linux (splitted from ocaml package)
+- as of 4.02.1+2
+
+* Sat Aug 30 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.7.git87c6a6b0
+- ocaml-4.02.0 final rebuild.
+
+* Fri Aug 22 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.6.git87c6a6b0
+- ocaml-4.02.0+rc1 rebuild.
+
+* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.02.0-0.5.git87c6a6b0
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Fri Aug 01 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.4.git87c6a6b0
+- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
+
+* Sat Jul 19 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.3.git87c6a6b0
+- OCaml 4.02.0 beta rebuild.
+
+* Wed Jul 16 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.2
+- Initial packaging of new out-of-tree ocaml-camlp4.

+ 153 - 0
o/ocaml-camlp5/ocaml-camlp5-vl.spec

@@ -0,0 +1,153 @@
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%if !%{opt}
+%global debug_package %{nil}
+%endif
+
+Name:           ocaml-camlp5
+Summary:        Classical version of camlp4 OCaml preprocessor
+Summary(ja):    Camlp4 OCaml プリプロセッサの古典的な実装 
+Version:        6.12
+Release:        1%{?_dist_release}
+
+License:        BSD
+Group:          Development/Languages
+URL:            http://camlp5.gforge.inria.fr/
+
+Source0:        http://camlp5.gforge.inria.fr/distrib/src/camlp5-%{version}.tgz
+# Kill -warn-error A
+Patch0:         camlp5-6.11-kill-warn-error.patch
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-root
+BuildRequires:  ocaml
+
+Vendor:         Project Vine
+Distribution:   Vine Linux
+Packager:       inagaki
+
+%global __ocaml_requires_opts -i Asttypes -i Parsetree -i Pa_extend
+%global __ocaml_provides_opts -i Dynlink -i Dynlinkaux -i Pa_extend
+
+%description
+Camlp5 is a preprocessor-pretty-printer of OCaml.
+
+It is the continuation of the classical camlp4 with new features.
+
+OCaml 3.10 and above have an official camlp4 which is incompatible
+with classical (<= 3.09) versions.  You can find that in the
+ocaml-camlp4 package.
+
+
+%package        devel
+Summary:        Development files for %{name}
+Summary(ja):    %{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}.
+
+
+%prep
+%setup -q -n camlp5-%{version}
+%patch0 -p1
+
+# Build with debug information
+sed -i 's,WARNERR="",WARNERR="-g",' configure
+sed -i 's,-linkall,& -g,g' top/Makefile
+for fil in compile/compile.sh $(find . -name Makefile); do
+  sed -i 's,\$[({]OCAMLN[})]c,& -g,;s,\$[({]OCAMLN[})]opt,& -g,;s,LINKFLAGS=,&-g ,' $fil
+done
+
+
+%build
+./configure
+%if %opt
+# For ppc64 we need a larger stack than default to compile some files
+# because the stages in the OCaml compiler are not mutually tail
+# recursive.
+%ifarch ppc64 ppc64le
+ulimit -a
+ulimit -Hs 65536
+ulimit -Ss 65536
+%endif
+make world.opt
+%else
+make world
+%endif
+make -C doc/htmlp
+
+%install
+if [ -d $RPM_BUILD_ROOT ]; then rm -rf $RPM_BUILD_ROOT; fi
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_mandir}
+make install \
+  LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
+  OLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
+  BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+  MANDIR=$RPM_BUILD_ROOT%{_mandir}
+cp -p etc/META $RPM_BUILD_ROOT%{_libdir}/ocaml/camlp5
+rm -f doc/html/.cvsignore doc/htmlp/{.cvsignore,*.sh,Makefile,html2*}
+
+%clean
+if [ -d $RPM_BUILD_ROOT ]; then %{__rm} -rf $RPM_BUILD_ROOT; fi
+
+%files
+%defattr (-,root,root)
+%doc README LICENSE
+%{_libdir}/ocaml/camlp5
+%if %opt
+%exclude %{_libdir}/ocaml/camlp5/*.a
+%exclude %{_libdir}/ocaml/camlp5/*.cmxa
+%exclude %{_libdir}/ocaml/camlp5/*.cmx
+%endif
+%exclude %{_libdir}/ocaml/camlp5/*.mli
+
+%files devel
+%doc CHANGES ICHANGES DEVEL UPGRADING doc/html
+%if %opt
+%{_libdir}/ocaml/camlp5/*.a
+%{_libdir}/ocaml/camlp5/*.cmxa
+%{_libdir}/ocaml/camlp5/*.cmx
+%endif
+%{_libdir}/ocaml/camlp5/*.mli
+%{_bindir}/camlp5*
+%{_bindir}/mkcamlp5*
+%{_bindir}/ocpp5
+%{_mandir}/man1/*
+
+%changelog
+* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 6.12-1
+- changed package name
+- updated to 6.12
+- built with ocaml 4.02.1
+- split development files into devel subpackage
+
+* Thu Dec 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 6.11-1
+- new upstream release
+
+* Fri Apr 16 2010 Shu KONNO <owa@bg.wakwak.com> - 5.11-2
+- rebuilt with new tool chain and ocaml 3.11.0-2
+
+* Sat May  9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.11-1
+- new upstream release
+- built with ocaml 3.11.0
+- added Packager tag
+
+* Sun Aug  3 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.08-1
+- new upstream release
+- built with ocaml 3.10.2
+
+* Wed Feb  6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-0vl2
+- rebuilt for VineSeed
+
+* Wed Feb  6 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.07-0vl1
+- new upstream release
+- rebuilt with Ocaml 3.10.1
+
+* Sun Dec 30 2007 Shu KONNO <owa@bg.wakwak.com> - 5.00-0vl2
+- added option libdir to configure
+
+* Sun Sep 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 5.00-0vl1
+- initial package for Vine Linux

+ 154 - 0
o/ocaml-facile/ocaml-facile-vl.spec

@@ -0,0 +1,154 @@
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global debug_package %{nil}
+%global _default_patch_fuzz 2
+
+Name:          ocaml-facile
+Version:       1.1
+Release:       31%{?_dist_release}
+Summary:       OCaml library for constraint programming
+Summary(ja):   制約プログラミング向けの OCaml ライブラリ
+Summary(fr):   Librairie OCaml de programmation par contraintes
+
+License:       LGPLv2+
+Group:         System Environment/Libraries
+URL:           http://www.recherche.enac.fr/log/facile/
+
+Source0:       http://www.recherche.enac.fr/log/facile/distrib/facile-%{version}.tar.gz
+
+# makefile fixes by Steffen Joeris <white@debian.org>:
+# * only build and install native binaries if ocamlopt is available
+# * install .mli files
+Patch0:        facile-1.1-makefile-fixes.patch
+
+# Fix for OCaml 4.00.0.
+Patch1:        ocaml-facile-ocaml-4.patch
+
+BuildRoot:     %{_tmppath}/%{name}-%{version}-root
+BuildRequires: ocaml >= 3.02
+BuildRequires: ocaml-findlib-devel
+Obsoletes:     facile < %{version}-%{release}
+Provides:      facile = %{version}-%{release}
+
+Vendor:        Project Vine
+Distribution:  Vine Linux
+Packager:      inagaki
+
+%description
+FaCiLe is a constraint programming library on integer and integer set finite
+domains written in OCaml. It offers all usual facilities to create and
+manipulate finite domain variables, arithmetic expressions and constraints
+(possibly non-linear), built-in global constraints (difference, cardinality,
+sorting etc.) and search and optimization goals. FaCiLe allows as well to build
+easily user-defined constraints and goals (including recursive ones), making
+pervasive use of OCaml higher-order functionals to provide a simple and flexible
+interface for the user. As FaCiLe is an OCaml library and not "yet another
+language", the user benefits from type inference and strong typing discipline,
+high level of abstraction, modules and objects system, as well as native code
+compilation efficiency, garbage collection and replay debugger, all features of
+OCaml (among many others) that allow to prototype and experiment quickly:
+modeling, data processing and interface are implemented with the same powerful
+and efficient language.
+
+%package        devel
+Summary:        Development files for %{name}
+Summary(ja):    %{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}.
+
+
+%prep
+%setup -q -n facile-%{version}
+%patch0 -p1 -b .makefile-fixes
+%patch1 -p1 -b .ocaml4
+
+%build
+# This is not autoconf, but a simple custom configure script.
+# The --faciledir directory is only used for "make install".
+./configure --faciledir $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/facile
+make install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%check
+make check
+
+%files
+%defattr(-,root,root)
+%doc LICENSE README
+%{_libdir}/ocaml/facile/
+%if %opt
+%exclude %{_libdir}/ocaml/facile/*.a
+%exclude %{_libdir}/ocaml/facile/*.cmxa
+%endif
+%exclude %{_libdir}/ocaml/facile/*.mli
+
+%files devel
+%if %opt
+%{_libdir}/ocaml/facile/*.a
+%{_libdir}/ocaml/facile/*.cmxa
+%endif
+%{_libdir}/ocaml/facile/*.mli
+
+
+%changelog
+* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.1-31
+- changed package name
+- rebuilt with ocaml 4.02.1
+- split development files into devel subpackage
+
+* Tue May 15 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-13
+- rebuilt with ocaml-3.12.1
+
+* Sat Jun 25 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1-12
+- rebuild with ocaml-3.12.0
+
+* Wed Apr 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-11
+- rebuilt with ocaml-3.12.0
+- added Japanese summary
+- added Vendor and Distribution tag
+
+* Sun Sep 13 2009 NAKAMURA Kenta <kenta@vinelinux.org> 1.1-10
+- rebuilt with ocaml-3.11.0 (x86_64 has not built with ocaml-3.11.0)
+
+* Sat May  9 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-9
+- rebuilt with ocaml-3.11.0
+
+* Sat Jul 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-8
+- rebuild with ocaml-3.10.2
+
+* Thu Feb  7 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl5.2
+- rebuild with ocaml-3.10.1 on Vine4.2
+
+* Thu Feb  7 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl7
+- rebuild with ocaml-3.10.1
+
+* Tue Oct 23 2007 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl5.1
+- rebuild with ocaml-3.10.0 on Vine4.1
+
+* Sun Sep 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1-0vl6
+- rebuild with ocaml-3.10.0
+
+* Thu Jun 15 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 1.1-0vl5
+- rebuild with ocaml-3.09.2 on VineSeed
+
+* Thu Mar 23 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl4
+- rebuild with ocaml-3.09.1 on VineSeed
+
+* Thu Mar 23 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl3
+- rebuild with ocaml-3.09.1 on Vine3.2
+
+* Mon Feb  6 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl2
+- rebuild for VineSeed
+
+* Mon Feb  6 2006 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl1
+- initial release

+ 82 - 41
o/ocaml-findlib/ocaml-findlib-vl.spec

@@ -1,75 +1,116 @@
-Summary:	O'Caml package manager
-Summary(ja):	O'Caml パッケージ管理ツール
+Summary:        OCaml package manager and build helper
+Summary(ja):	OCaml パッケージ管理ツール及びビルド補助ツール
 Name:		ocaml-findlib
 Name:		ocaml-findlib
-Version:	1.2.7
+Version:	1.5.2
 Release:	1%{?_dist_release}
 Release:	1%{?_dist_release}
 
 
-License:	MIT/X11
+License:	BSD
 Group:		Development/Tools
 Group:		Development/Tools
-URL:		http://www.ocaml-programming.de/packages/
+URL:            http://projects.camlcity.org/projects/findlib.html
 
 
-Source:		http://www.ocaml-programming.de/packages/findlib-%{version}.tar.gz
+Source0:        http://download.camlcity.org/download/findlib-%{version}.tar.gz
+
+# Use ocamlopt -g patch to include debug information.
+Patch1:         findlib-1.4-add-debug.patch
 
 
 # Vine Patch
 # Vine Patch
-# Patch100:       ocaml-findlib-installpath.patch
+# Patch100:     ocaml-findlib-installpath.patch
 
 
 Buildroot:	%{_tmppath}/%{name}-%{version}-root
 Buildroot:	%{_tmppath}/%{name}-%{version}-root
-BuildRequires:	ocaml
-BuildRequires:  ocaml-camlp4
-BuildRequires:  ocaml-labltk
+BuildRequires:	ocaml >= 4.02.0
+BuildRequires:  ocaml-camlp4-devel
 BuildRequires:  ncurses-devel
 BuildRequires:  ncurses-devel
+BuildRequires:  m4
+BuildRequires:  gawk
 Requires:	ocaml
 Requires:	ocaml
 
 
 Vendor:		Project Vine
 Vendor:		Project Vine
 Distribution:	Vine Linux
 Distribution:	Vine Linux
 
 
-%define srcname findlib
+%global __ocaml_requires_opts -i Asttypes -i Parsetree
 
 
 %description
 %description
-The "findlib" software provides a scheme to manage reusable software
-components in the form of libraries, and includes tools that support this
-scheme. A library installed as a findlib component is also called a
-package. The point is that the findlib scheme allows it to store
-metainformation about the library, especially how it can be used in
-programs. The packages are kept in the filesystem hierarchy, but the
-directory structure is defined by findlib, and there is no way to deviate
-from this standard. The library contains functions to look the directory
-up that stores a package, to query metainformation about a package, and
-to retrieve dependency information about multiple packages. There is also
-a tool that allows the user to enter queries on the command-line. In
-order to simplify compilation and linkage, there are new frontends of the
-various OCaml compilers that can directly deal with packages.
+Objective CAML package manager and build helper.
+
+
+%package        devel
+Summary:        Development files for %{name}
+Summary(ja):    %{name} の開発用ファイル
+Group:		Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
 
 
 %prep
 %prep
-%setup -q -n %{srcname}-%{version}
-#patch100 -p1 -b .install
+%setup -q -n findlib-%{version}
+%patch1 -p2
 
 
 %build
 %build
-./configure \
-	-bindir %{_bindir} \
-	-mandir %{_mandir} \
-	-sitelib $(ocamlc -where) \
-	-config %{_sysconfdir}/ocamlfind.conf \
-	-with-toolbox
+ocamlc -version
+ocamlc -where
+(cd tools/extract_args && make)
+tools/extract_args/extract_args -o src/findlib/ocaml_args.ml ocamlc ocamlcp ocamlmktop ocamlopt ocamldep ocamldoc ||:
+cat src/findlib/ocaml_args.ml
+./configure -config %{_sysconfdir}/ocamlfind.conf \
+  -bindir %{_bindir} \
+  -sitelib `ocamlc -where` \
+  -mandir %{_mandir} \
+  -with-toolbox
 make all opt
 make all opt
+#%if %opt
+#make opt
+#%endif
+rm doc/guide-html/TIMESTAMP
+
 
 
 %install
 %install
-%__rm -rf %{buildroot}
-make prefix=$RPM_BUILD_ROOT install
+rm -rf $RPM_BUILD_ROOT
+# Grrr destdir grrrr
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
+mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
 
 
 %clean
 %clean
-%__rm -rf %{buildroot}
+rm -rf $RPM_BUILD_ROOT
 
 
 %files
 %files
 %defattr(-,root,root)
 %defattr(-,root,root)
-%doc LICENSE doc/*
-%config %{_sysconfdir}/ocamlfind.conf
-%{_bindir}/ocamlfind
-%{_bindir}/safe_camlp4
-%{_libdir}/ocaml/*
-%{_mandir}/man*/*
+%doc LICENSE doc/README
+%config(noreplace) %{_sysconfdir}/ocamlfind.conf
+%{_bindir}/*
+%{_mandir}/man1/*
+%{_mandir}/man5/*
+%{_libdir}/ocaml/*/META
+%{_libdir}/ocaml/topfind
+%{_libdir}/ocaml/findlib
+#if %opt
+%exclude %{_libdir}/ocaml/findlib/*.a
+%exclude %{_libdir}/ocaml/findlib/*.cmxa
+#endif
+%exclude %{_libdir}/ocaml/findlib/*.mli
+%exclude %{_libdir}/ocaml/findlib/Makefile.config
+#exclude %{_libdir}/ocaml/findlib/make_wizard
+#exclude %{_libdir}/ocaml/findlib/make_wizard.pattern
+%{_libdir}/ocaml/num-top
+
+%files devel
+%doc LICENSE doc/README doc/guide-html
+#if %opt
+%{_libdir}/ocaml/findlib/*.a
+%{_libdir}/ocaml/findlib/*.cmxa
+#endif
+%{_libdir}/ocaml/findlib/*.mli
+%{_libdir}/ocaml/findlib/Makefile.config
+
 
 
 %changelog
 %changelog
+* Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 1.5.3-1
+- updated to 1.5.2
+- built with ocaml 4.02.1
+
 * Sun May 22 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.7-1
 * Sun May 22 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.2.7-1
 - updated to 1.2.7
 - updated to 1.2.7
 - added BR: ncurses-devel
 - added BR: ncurses-devel

+ 127 - 0
o/ocaml-labltk/ocaml-labltk-vl.spec

@@ -0,0 +1,127 @@
+#%ifarch %{ocaml_native_compiler}
+#%global native_compiler 1
+#%else
+#%global native_compiler 0
+#%endif
+
+Name:          ocaml-labltk
+Version:       8.06.0
+Release:       1%{?_dist_release}
+Summary:       Tcl/Tk interface for OCaml
+Summary(ja):   OCaml の Tk インターフェース
+
+License:       LGPLv2+ with exceptions
+Group:	       Development/Languages
+URL:           https://forge.ocamlcore.org/projects/labltk/
+
+Source0:       https://forge.ocamlcore.org/frs/download.php/1455/labltk-%{version}.tar.gz
+
+Buildroot:     %{_tmppath}/%{name}-%{version}-root
+BuildRequires: ocaml
+BuildRequires: tcl-devel
+BuildRequires: tk-devel
+
+
+%description
+labltk or mlTk is a library for interfacing OCaml with the scripting
+language Tcl/Tk (all versions since 8.0.3, but no betas).
+
+
+%package devel
+Summary:       Development files for %{name}
+Summary(ja):   %{name} の開発用ファイル
+Group:	       Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+labltk or mlTk is a library for interfacing OCaml with the scripting
+language Tcl/Tk (all versions since 8.0.3, but no betas).
+
+This package contains the development files.
+
+
+%prep
+%setup -q -n labltk-%{version}
+
+#patch1 -p1
+
+# Remove version control files which might get copied into documentation.
+find -name .gitignore -delete
+
+
+%build
+./configure
+#%if !%{native_compiler}
+#make %{?_smp_mflags} byte
+#%else
+make %{?_smp_mflags} all
+make %{?_smp_mflags} opt
+#%endif
+
+
+%install
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+make install \
+    BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+    INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/labltk \
+    STUBLIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
+# The *.o files are not installed by the Makefile.  AIUI
+# that prevents linking with native code programs.
+install -m 0644 camltk/*.o $RPM_BUILD_ROOT%{_libdir}/ocaml/labltk
+
+
+%files
+%doc Changes README.mlTk
+%dir %{_libdir}/ocaml/labltk
+%{_libdir}/ocaml/labltk/*.cmi
+%{_libdir}/ocaml/labltk/*.cma
+%{_libdir}/ocaml/labltk/*.cmo
+%{_libdir}/ocaml/stublibs/dlllabltk.so
+
+
+%files devel
+%doc README.mlTk
+%doc examples_camltk
+%doc examples_labltk
+%{_bindir}/labltk
+%{_bindir}/ocamlbrowser
+%{_libdir}/ocaml/labltk/labltktop
+%{_libdir}/ocaml/labltk/pp
+%{_libdir}/ocaml/labltk/tkcompiler
+%{_libdir}/ocaml/labltk/*.a
+#if %{native_compiler}
+%{_libdir}/ocaml/labltk/*.cmxa
+%{_libdir}/ocaml/labltk/*.cmx
+%{_libdir}/ocaml/labltk/*.o
+#endif
+%{_libdir}/ocaml/labltk/*.mli
+
+
+%changelog
+* Mon Jan 26 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 8.06.0-1
+- Initial build for Vine Linux (splitted from ocaml package)
+
+* Sat Aug 30 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.7.beta1
+- ocaml-4.02.0 final rebuild.
+
+* Fri Aug 22 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.6.beta1
+- ocaml-4.02.0+rc1 rebuild.
+
+* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.02-0.5.beta1
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Fri Aug 01 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.4.beta1
+- ocaml-4.02.0-0.8.git10e45753.fc22 rebuild.
+
+* Tue Jul 22 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.3.beta1
+- OCaml 4.02.0 beta rebuild.
+
+* Tue Jul 22 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.2.beta1
+- Enable debugging.
+- Move labltk to -devel package.
+- Enable _smp_flags.
+
+* Tue Jul 22 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02-0.1.beta1
+- Initial packaging of new out-of-tree ocaml-labltk.

+ 202 - 104
o/ocaml/ocaml-vl.spec

@@ -1,125 +1,190 @@
 Name: ocaml
 Name: ocaml
-Summary: The Objective Caml compiler and programming environment
-Summary(ja): Objective Caml コンパイラとプログラミング環境
-Version: 3.12.1
+Summary: OCaml compiler and programming environment
+Summary(ja): OCaml コンパイラとプログラミング環境
+Version: 4.02.1
 Release: 1%{?_dist_release}
 Release: 1%{?_dist_release}
-Source0: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-%{version}.tar.bz2
-Source1: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.html.tar.gz
-Source2: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.ps.gz
-Source3: http://caml.inria.fr/distrib/ocaml-3.10/ocaml-3.12-refman.info.tar.gz
-Source4: ocaml-info-entry
+Source0: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-%{version}.tar.xz
+Source1: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman-html.tar.gz
+Source2: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.pdf
+Source3: http://caml.inria.fr/distrib/ocaml-4.02/ocaml-4.02-refman.info.tar.gz
+Source4: ocamlbyteinfo.ml
 
 
 # Vine Source(s)
 # Vine Source(s)
 Source10: caml-mode-install.sh
 Source10: caml-mode-install.sh
 Source11: caml-mode-remove.sh
 Source11: caml-mode-remove.sh
 
 
-License: QPL/LGPL
+License: QPL and (LGPLv2+ with exceptions)
 Group: Development/Languages
 Group: Development/Languages
 URL: http://caml.inria.fr/
 URL: http://caml.inria.fr/
 
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
-BuildRequires: ncurses-devel gdbm-devel emacsen
-BuildRequires: libX11-devel
-BuildRequires: tk tcl expect thread 
-Provides: ocaml(runtime) = %{version}
-Requires(post): install-info
-Requires(preun): install-info
+# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
+BuildRequires:  binutils-devel
+BuildRequires:  ncurses-devel
+BuildRequires:  gdbm-devel
+BuildRequires:  emacs
+BuildRequires:  gawk
+BuildRequires:  perl
+BuildRequires:  util-linux
+BuildRequires:  libICE-devel
+BuildRequires:  libSM-devel
+BuildRequires:  libX11-devel
+BuildRequires:  libXaw-devel
+BuildRequires:  libXext-devel
+BuildRequires:  libXft-devel
+BuildRequires:  libXmu-devel
+BuildRequires:  libXrender-devel
+BuildRequires:  libXt-devel
+BuildRequires:  mesa-libGL-devel
+BuildRequires:  mesa-libGLU-devel
+BuildRequires:  chrpath
+
+Requires:       gcc
+Requires:       rpm-build >= 4.8.0
+Requires:       util-linux
+
+Provides:       ocaml(runtime) = %{version}
+Provides:       ocaml(compiler) = %{version}
 
 
 Vendor: Project Vine
 Vendor: Project Vine
 Distribution: Vine Linux
 Distribution: Vine Linux
-
 Packager: inagaki, kenta
 Packager: inagaki, kenta
 
 
 %define debug_package %{nil}
 %define debug_package %{nil}
 
 
-%global __ocaml_requires_opts -c -f %{buildroot}%{_bindir}/ocamlobjinfo
-%global __ocaml_provides_opts -f %{buildroot}%{_bindir}/ocamlobjinfo
+%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
+%global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo'
 
 
 %description
 %description
-Objective Caml is a high-level, strongly-typed, functional and
-object-oriented programming language from the ML family of languages.
+OCaml is a high-level, strongly-typed, functional and object-oriented
+programming language from the ML family of languages.
 
 
 This package comprises two batch compilers (a fast bytecode compiler
 This package comprises two batch compilers (a fast bytecode compiler
 and an optimizing native-code compiler), an interactive toplevel system,
 and an optimizing native-code compiler), an interactive toplevel system,
-parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
+parsing tools (Lex,Yacc), a replay debugger, a documentation generator,
 and a comprehensive library.
 and a comprehensive library.
 
 
 %description -l ja
 %description -l ja
-Object Caml は ML 系言語の方言で、高水準で強い型付けを備えた関数型と
+OCaml は ML 系言語の方言で、高水準で強い型付けを備えた関数型と
 オブジェクト指向を併せ持ったプログラミング言語です。
 オブジェクト指向を併せ持ったプログラミング言語です。
 このパッケージには、2 つのバッチコンパイラ (コンパイル速度が高速な
 このパッケージには、2 つのバッチコンパイラ (コンパイル速度が高速な
 バイトコードコンパイラと最適化を行なうネイティブコードコンパイラ)、
 バイトコードコンパイラと最適化を行なうネイティブコードコンパイラ)、
-トップレベル対話環境、構文解析ツール (Lex, Yac, Camlp4)、リプレイ
-デバッガ、ドキュメント生成ツール、そして広範囲に渡るライブラリが含まれて
-います。
-
-%package labltk
-Summary: Tk bindings for Objective Caml
-Summary(ja): Objective Caml の Tk バインディング
-Group: Development/Languages
+トップレベル対話環境、構文解析ツール (Lex, Yacc)、リプレイデバッガ、
+ドキュメント生成ツール、そして広範囲に渡るライブラリが含まれています。
+
+#%package labltk
+#Summary: Tk bindings for Objective Caml
+#Summary(ja): Objective Caml の Tk バインディング
+#Group: Development/Languages
+#Requires: ocaml = %{version}-%{release}
+#Requires: tk tcl
+#Obsoletes: labltk <= %{version}
+#
+#%description labltk
+#A library for interfacing Objective Caml with the scripting language
+#Tcl/Tk. It include the OCamlBrowser code editor / library browser.
+#
+#%package camlp4
+#Summary: Pre-Processor-Pretty-Printer for OCaml
+#Group: Development/Languages
+#Requires: ocaml = %{version}-%{release}
+#Obsoletes: camlp4 <= %{version}
+#
+#%description camlp4
+#Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
+#file and printing some result on standard output.
+
+%package docs
+Summary: Documentation for OCaml
+Summary(ja): OCaml のドキュメント
+Group: Documentation
 Requires: ocaml = %{version}-%{release}
 Requires: ocaml = %{version}-%{release}
-Requires: tk tcl
-Obsoletes: labltk <= %{version}
+Requires(post): /sbin/install-info
+Requires(preun): /sbin/install-info
 
 
-%description labltk
-A library for interfacing Objective Caml with the scripting language
-Tcl/Tk. It include the OCamlBrowser code editor / library browser.
+%description docs
+OCaml is a high-level, strongly-typed, functional and object-oriented
+programming language from the ML family of languages.
 
 
-%package camlp4
-Summary: Pre-Processor-Pretty-Printer for OCaml
-Group: Development/Languages
-Requires: ocaml = %{version}-%{release}
-Obsoletes: camlp4 <= %{version}
+This package contains documentation in PDF and HTML format as well as
+man pages and info files.
+
+
+%package source
+Summary:        Source code for OCaml libraries
+Summary(ja):    OCaml ライブラリのソースコード
+Group:          Development/Libraries
+Requires:       ocaml = %{version}-%{release}
+
+%description source
+Source code for OCaml libraries.
 
 
-%description camlp4
-Camlp4 is a Pre-Processor-Pretty-Printer for OCaml, parsing a source
-file and printing some result on standard output.
 
 
 %package mode
 %package mode
-Summary: Emacs mode for Objective Caml
-Summary(ja): Objective Caml の Emacs mode
-Group: Applications/Editors/Emacs
-Requires: ocaml = %{version}-%{release}
-Requires(post): emacs, emacsen-common
-Requires(preun): emacs, emacsen-common
-Obsoletes: ocaml-emacs <= %{version}
+Summary:        Emacs mode for OCaml
+Summary(ja):    OCaml 用 Emacs mode
+Group:          Applications/Editors/Emacs
+Requires:       ocaml = %{version}-%{release}
+Requires:       emacsen-common
+Requires:       emacs
+Obsoletes:      ocaml-emacs <= %{version}
 
 
 %description mode
 %description mode
-Emacs mode for Objective Caml.
+Emacs mode for OCaml.
 
 
 %description -l ja mode
 %description -l ja mode
-Objective Caml 用の Emacs mode です.
+OCaml 用の Emacs mode です.
 
 
 
 
 %prep
 %prep
-%setup -q -T -b 0
-%setup -q -T -D -a 1
-%setup -q -T -D -a 3
-cp %{SOURCE2} refman.ps.gz
-cp %{SOURCE4} infoman/ocaml-info-entry
+%setup -q -T -b 0 -n %{name}-%{version}
+%setup -q -T -D -a 1 -n %{name}-%{version}
+%setup -q -T -D -a 3 -n %{name}-%{version}
+cp %{SOURCE2} refman.pdf
 
 
 %build
 %build
-./configure -cc "%{__cc} %{optflags}" -with-pthread \
+# make -jN (N > 1) breaks the build.  Therefore we cannot use
+# %{?_smp_mflags} nor MAKEFLAGS.
+unset MAKEFLAGS
+
+CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
+./configure \
     -bindir %{_bindir} \
     -bindir %{_bindir} \
     -libdir %{_libdir}/ocaml \
     -libdir %{_libdir}/ocaml \
-    -mandir %{_mandir} \
-    -prefix %{_prefix}
+    -x11lib %{_libdir} \
+    -x11include %{_includedir} \
+    -mandir %{_mandir}/man1 \
+    -no-curses
 make world opt opt.opt
 make world opt opt.opt
-(cd infoman; gzip -cd ocaml.info.gz >> ocaml-info-entry; mv ocaml-info-entry  ocaml.info; gzip -f ocaml.info)
+make -C emacs ocamltags
+#(cd infoman; gzip -cd ocaml.info.gz >> ocaml-info-entry; mv ocaml-info-entry  ocaml.info; gzip -f ocaml.info)
 # for dumpobj, objinfo
 # for dumpobj, objinfo
-(cd tools; make dumpobj; make objinfo; cd ..)
+#(cd tools; make dumpobj; make objinfo; cd ..)
+
+# Currently these tools are supplied by Debian, but are expected
+# to go upstream at some point.
+includes="-nostdlib -I stdlib -I utils -I parsing -I typing -I bytecomp -I asmcomp -I driver -I otherlibs/unix -I otherlibs/str -I otherlibs/dynlink"
+boot/ocamlrun ./ocamlc $includes dynlinkaux.cmo %{SOURCE4} -o ocamlbyteinfo
 
 
 %install
 %install
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 
 
-make install BINDIR=$RPM_BUILD_ROOT%{_bindir} LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml MANDIR=$RPM_BUILD_ROOT%{_mandir}
-
-mv $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig
-sed -e "s|^%{buildroot}||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig > $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
-rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf.orig
-(mkdir -p $RPM_BUILD_ROOT%{_infodir}; cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir})
-# for dumpobj, objinfo
-(cd tools; install dumpobj objinfo $RPM_BUILD_ROOT%{_bindir}) 
+make install \
+     BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+     LIBDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml \
+     MANDIR=$RPM_BUILD_ROOT%{_mandir}
+perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
+
+(
+    # install info files
+    mkdir -p $RPM_BUILD_ROOT%{_infodir};
+    cd infoman; cp ocaml*.gz $RPM_BUILD_ROOT%{_infodir}
+)
+(
+    # for dumpobj, objinfo
+    cd tools;
+    install dumpobj objinfo $RPM_BUILD_ROOT%{_bindir}
+) 
 
 
 # for Emacs Lisp
 # for Emacs Lisp
 make -C emacs install install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir} \
 make -C emacs install install-ocamltags BINDIR=$RPM_BUILD_ROOT%{_bindir} \
@@ -132,6 +197,12 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/remove
 
 
 %_removeemacsenscript  caml-mode %{SOURCE11}
 %_removeemacsenscript  caml-mode %{SOURCE11}
 
 
+# Remove rpaths from stublibs .so files.
+chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
+
+install -m 0755 ocamlbyteinfo $RPM_BUILD_ROOT%{_bindir}
+
+find $RPM_BUILD_ROOT -name .ignore -delete
 
 
 # Disable build root strip policy:
 # Disable build root strip policy:
 # executables generated by ocamlc -custom MUST NOT BE STRIPPED
 # executables generated by ocamlc -custom MUST NOT BE STRIPPED
@@ -139,11 +210,23 @@ mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/emacsen-common/packages/remove
 # in the distribution is generated by ocamlc -custom, so leave default.
 # in the distribution is generated by ocamlc -custom, so leave default.
 # %define __spec_install_post /usr/lib/rpm/brp-compress
 # %define __spec_install_post /usr/lib/rpm/brp-compress
 
 
+
 %clean
 %clean
 rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 
 
-%post
-/sbin/install-info %{_infodir}/ocaml.info %{_infodir}/dir
+
+%post docs
+/sbin/install-info \
+    --entry="* ocaml: (ocaml).   The OCaml compiler and programming environment" \
+    --section="Programming Languages" \
+    %{_infodir}/%{name}.info \
+    %{_infodir}/dir 2>/dev/null || :
+
+
+%preun docs
+if [ $1 -eq 0 ]; then
+    /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir 2>/dev/null || :
+fi
 
 
 %post mode
 %post mode
 if [ "$1" = 2 ]; then
 if [ "$1" = 2 ]; then
@@ -155,10 +238,6 @@ fi
 
 
 %_emacsenPackageInstall caml-mode
 %_emacsenPackageInstall caml-mode
 
 
-%preun
-if [ $1 = 0 ]; then
-    /sbin/install-info --delete %{_infodir}/ocaml.info %{_infodir}/dir
-fi
 
 
 %preun mode
 %preun mode
 if [ "$1" = 0 ]; then
 if [ "$1" = 0 ]; then
@@ -171,40 +250,49 @@ fi
 
 
 %files
 %files
 %defattr(-, root, root)
 %defattr(-, root, root)
-%doc README LICENSE refman.ps.gz htmlman
+%doc README LICENSE 
 %{_bindir}/*
 %{_bindir}/*
-%{_mandir}/man1/*
-%{_mandir}/man3/*
 %{_libdir}/ocaml
 %{_libdir}/ocaml
-%{_infodir}/*
 ### in ocaml-camlp4
 ### in ocaml-camlp4
-%exclude %{_bindir}/camlp4*
-%exclude %{_bindir}/mkcamlp4
-%exclude %{_libdir}/ocaml/camlp4/
+#%exclude %{_bindir}/camlp4*
+#%exclude %{_bindir}/mkcamlp4
+#%exclude %{_libdir}/ocaml/camlp4/
 ### in ocaml-labltk
 ### in ocaml-labltk
-%exclude %{_bindir}/labltk
-%exclude %{_bindir}/ocamlbrowser
-%exclude %{_libdir}/ocaml/labltk/
-%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
+#%exclude %{_bindir}/labltk
+#%exclude %{_bindir}/ocamlbrowser
+#%exclude %{_libdir}/ocaml/labltk/
+#%exclude %{_libdir}/ocaml/stublibs/dlllabltk.so
 ### in ocaml-mode
 ### in ocaml-mode
 %exclude %{_bindir}/ocamltags
 %exclude %{_bindir}/ocamltags
+### in ocaml-source
+%exclude %{_libdir}/ocaml/*.ml
+
+#%files camlp4
+#%defattr(-, root, root, 0755)
+#%{_bindir}/camlp4*
+#%{_bindir}/mkcamlp4
+#%dir %{_libdir}/ocaml/
+#%{_libdir}/ocaml/camlp4/
+
+#%files labltk
+#%defattr(-, root, root, 0755)
+#%doc otherlibs/labltk/examples_*tk
+#%{_bindir}/labltk
+#%{_bindir}/ocamlbrowser
+#%dir %{_libdir}/ocaml/
+#%dir %{_libdir}/ocaml/stublibs/
+#%{_libdir}/ocaml/labltk/
+#%{_libdir}/ocaml/stublibs/dlllabltk.so
+
+%files docs
+%doc refman.pdf htmlman
+%{_infodir}/*
+%{_mandir}/man1/*
+%{_mandir}/man3/*
 
 
-%files camlp4
-%defattr(-, root, root, 0755)
-%{_bindir}/camlp4*
-%{_bindir}/mkcamlp4
-%dir %{_libdir}/ocaml/
-%{_libdir}/ocaml/camlp4/
-
-%files labltk
-%defattr(-, root, root, 0755)
-%doc otherlibs/labltk/examples_*tk
-%{_bindir}/labltk
-%{_bindir}/ocamlbrowser
-%dir %{_libdir}/ocaml/
-%dir %{_libdir}/ocaml/stublibs/
-%{_libdir}/ocaml/labltk/
-%{_libdir}/ocaml/stublibs/dlllabltk.so
+%files source
+%doc LICENSE
+%{_libdir}/ocaml/*.ml
 
 
 %files mode
 %files mode
 %defattr(-, root, root, 0755)
 %defattr(-, root, root, 0755)
@@ -213,12 +301,22 @@ fi
 %dir %{_datadir}/emacs/
 %dir %{_datadir}/emacs/
 %dir %{_datadir}/emacs/site-lisp/caml-mode
 %dir %{_datadir}/emacs/site-lisp/caml-mode
 %{_datadir}/emacs/site-lisp/caml-mode/*.el
 %{_datadir}/emacs/site-lisp/caml-mode/*.el
-#{_datadir}/emacs/site-lisp/caml-mode/*.elc
+%{_datadir}/emacs/site-lisp/caml-mode/*.elc
 %{_prefix}/lib/emacsen-common/packages/install/caml-mode
 %{_prefix}/lib/emacsen-common/packages/install/caml-mode
 %{_prefix}/lib/emacsen-common/packages/remove/caml-mode
 %{_prefix}/lib/emacsen-common/packages/remove/caml-mode
 
 
 
 
 %changelog
 %changelog
+* Sun Jan 25 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.02.1-1
+- new upstream relase
+- spilt documents to docs subpackage
+- spilt *.ml to source subpackage
+- added SOURCE4
+
+* Tue May 15 2012 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 3.12.1-2
+- fixed SOURCEs URL typo
+- updated SOURCE1
+
 * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.12.1-1
 * Sun Jan 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.12.1-1
 - new upstream version 3.12.1
 - new upstream version 3.12.1
 - rebuild with rpm-4.9.1.2
 - rebuild with rpm-4.9.1.2