rpms/ocaml-lablgl/EL-5 ocaml-lablgl.spec,1.1,1.2

Michel Alexandre Salim (salimma) fedora-extras-commits at redhat.com
Mon Feb 25 07:21:50 UTC 2008


Author: salimma

Update of /cvs/pkgs/rpms/ocaml-lablgl/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29372

Modified Files:
	ocaml-lablgl.spec 
Log Message:
Rebase EPEL build to F-8



Index: ocaml-lablgl.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ocaml-lablgl/EL-5/ocaml-lablgl.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ocaml-lablgl.spec	25 Feb 2008 07:09:06 -0000	1.1
+++ ocaml-lablgl.spec	25 Feb 2008 07:21:09 -0000	1.2
@@ -1,21 +1,24 @@
-%define ocaml_version 3.09.3
+%define debug_package %{nil}
 
 Name:           ocaml-lablgl
 Version:        1.02
-Release:	10%{?dist}
+Release:	15%{?dist}
 
 Summary:        LablGL is an OpenGL interface for Objective Caml
 
 Group:          System Environment/Libraries
 License:        BSD
 URL:            http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html
-Source:         http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-1.02.tar.gz
+Source0:        http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgl-1.02.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Obsoletes:      lablgl <= 1.02-9
+Provides:       lablgl = 1.02-9
 BuildRequires:  freeglut-devel 
-BuildRequires:	ocaml = %ocaml_version
-BuildRequires:  labltk = %ocaml_version
-BuildRequires:  camlp4 = %ocaml_version
-BuildRequires:	tcl-devel
+BuildRequires:  ocaml
+BuildRequires:  labltk
+BuildRequires:  camlp4
+BuildRequires:  tcl-devel
 BuildRequires:  tk-devel
 BuildRequires:  libX11-devel
 BuildRequires:  libXext-devel
@@ -23,8 +26,13 @@
 BuildRequires:  libXxf86vm-devel
 BuildRequires:  mesa-libGL-devel
 BuildRequires:  mesa-libGLU-devel
-Requires:       ocaml = %ocaml_version
-Requires:	labltk = %ocaml_version
+BuildRequires:	ocaml-labltk-devel
+BuildRequires:  ocaml-camlp4-devel
+ExcludeArch:    ppc64
+
+%define _use_internal_dependency_generator 0
+%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
+%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
 
 %description
 LablGL is is an Objective Caml interface to OpenGL. Support is
@@ -34,17 +42,25 @@
 extension, or with open-source Mesa.
 
 
-%prep
-%setup -q
+%package        devel
+Summary:        Development files for %{name}
+Group:          Development/Libraries
+Requires:       %{name} = %{version}-%{release}
+Requires:       ocaml-labltk-devel
+
+%description    devel
+The %{name}-devel package contains libraries and signature files for
+developing applications that use %{name}.
 
 
-%build
+%prep
+%setup -q -n lablgl-%{version}
 cat > Makefile.config <<EOF
 CAMLC = ocamlc.opt
 CAMLOPT = ocamlopt.opt
 BINDIR = %{_bindir}
 XINCLUDES = -I%{_prefix}/X11R6/include
-XLIBS = -L%{_prefix}/X11R6/%{_lib} -lXext -lXmu -lX11
+XLIBS = -lXext -lXmu -lX11
 TKINCLUDES = -I%{_includedir}
 GLINCLUDES =
 GLLIBS = -lGL -lGLU
@@ -56,6 +72,9 @@
 TOGLDIR=Togl
 COPTS = $RPM_OPT_FLAGS
 EOF
+
+
+%build
 make all opt
 
 
@@ -65,9 +84,40 @@
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
 make INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL \
-        DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
-        BINDIR=$RPM_BUILD_ROOT%{_bindir} \
-        install
+    DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs \
+    BINDIR=$RPM_BUILD_ROOT%{_bindir} \
+    install
+
+# Make and install a META file.
+cat <<EOM >META
+version="%{version}"
+directory="+lablgl"
+archive(byte) = "lablgl.cma"
+archive(native) = "lablgl.cmxa"
+
+package "togl" (
+  requires = "labltk lablgl"
+  archive(byte) = "togl.cma"
+  archive(native) = "togl.cmxa"
+)
+
+package "glut" (
+  requires = "lablgl"
+  archive(byte) = "lablglut.cma"
+  archive(native) = "lablglut.cmxa"
+)
+EOM
+cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
+
+# Remove unnecessary *.ml files (ones which have a *.mli).
+pushd $RPM_BUILD_ROOT%{_libdir}/ocaml/lablGL
+for f in *.ml; do \
+  b=`basename $f .ml`; \
+  if [ -f "$b.mli" ]; then \
+    rm $f; \
+  fi; \
+done
+popd
 
 
 %clean
@@ -76,15 +126,41 @@
 
 %files
 %defattr(-,root,root,-)
-%doc CHANGES COPYRIGHT README Togl/examples LablGlut/examples
-%{_bindir}/*
-%{_libdir}/ocaml/lablGL
+%doc README
+%dir %{_libdir}/ocaml/lablGL
+%{_libdir}/ocaml/lablGL/*.cma
+%{_libdir}/ocaml/lablGL/*.cmi
 %{_libdir}/ocaml/stublibs/*.so
+%{_bindir}/lablgl
+%{_bindir}/lablglut
+
+
+%files devel
+%defattr(-,root,root,-)
+%doc CHANGES COPYRIGHT README LablGlut/examples Togl/examples
+%{_libdir}/ocaml/lablGL/META
+%{_libdir}/ocaml/lablGL/*.a
+%{_libdir}/ocaml/lablGL/*.cmxa
+%{_libdir}/ocaml/lablGL/*.cmx
+%{_libdir}/ocaml/lablGL/*.mli
+%{_libdir}/ocaml/lablGL/build.ml
 
 
 %changelog
-* Mon Feb 25 2008 Michel Salim <michel.sylvan at gmail.com> - 1.02-10
-- Rename to ocaml-lablgl
+* Fri Sep  7 2007 Gerard Milmeister <gemi at bluewin.ch> - 1.02-15
+- Rebuild
+
+* Thu Aug 30 2007 Gerard Milmeister <gemi at bluewin.ch> - 1.02-13
+- Rebuild
+
+* Sat Jul  7 2007 Gerard Milmeister <gemi at bluewin.ch> - 1.02-12
+- exclude arch ppc64
+
+* Sat Jul  7 2007 Gerard Milmeister <gemi at bluewin.ch> - 1.02-11
+- added buildreq ocaml-camlp4-devel
+
+* Fri Jul  6 2007 Gerard Milmeister <gemi at bluewin.ch> - 1.02-10
+- renamed package from lablgl to ocaml-lablgl
 
 * Sat Dec  2 2006 Gerard Milmeister <gemi at bluewin.ch> - 1.02-9
 - Rebuild for ocaml 3.09.3




More information about the fedora-extras-commits mailing list