rpms/ghc-OpenGL/devel ghc-OpenGL.spec,1.5,1.6

Jens Petersen petersen at fedoraproject.org
Fri Dec 25 16:24:32 UTC 2009


Author: petersen

Update of /cvs/extras/rpms/ghc-OpenGL/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21423

Modified Files:
	ghc-OpenGL.spec 
Log Message:
- update for ghc-6.12.1: add shared library support
- use new ghc*_requires macros: needs ghc-rpm-macros 0.4.0
- add common_summary and common_description




Index: ghc-OpenGL.spec
===================================================================
RCS file: /cvs/extras/rpms/ghc-OpenGL/devel/ghc-OpenGL.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- ghc-OpenGL.spec	16 Sep 2009 09:30:12 -0000	1.5
+++ ghc-OpenGL.spec	25 Dec 2009 16:24:32 -0000	1.6
@@ -1,75 +1,79 @@
 %global pkg_name OpenGL
 
+%global common_summary Haskell %{pkg_name} library
+
+%global common_description Haskell bindings to the OpenGL graphics library.
+
 %bcond_without doc
 %bcond_without prof
+%bcond_without shared
 
 # ghc does not emit debug information
-%global debug_package %{nil}
+#%%global debug_package %{nil}
 
 Name:           ghc-%{pkg_name}
 # part of haskell-platform-2009.2.0.2
 Version:        2.2.1.1
-Release:        1%{?dist}
-Summary:        Haskell %{pkg_name} library
+Release:        2%{?dist}
+Summary:        %{common_summary}
 
-Group:          Development/Libraries
+Group:          System Environment/Libraries
 License:        BSD
 URL:            http://www.haskell.org/haskellwiki/Opengl
 Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 # fedora ghc archs:
 ExclusiveArch:  %{ix86} x86_64 ppc alpha
-BuildRequires:  ghc
-BuildRequires:  ghc-rpm-macros
-BuildRequires:  mesa-libGL-devel, mesa-libGLU-devel
+BuildRequires:  ghc, ghc-rpm-macros >= 0.4.0
 %if %{with doc}
 BuildRequires:  ghc-doc
 %endif
 %if %{with prof}
 BuildRequires:  ghc-prof
 %endif
+BuildRequires:  mesa-libGL-devel, mesa-libGLU-devel
 
 %description
-This package provides the Haskell %{pkg_name} library for ghc.
-These provide bindings to the OpenGL graphics library.
+%{common_description}
+%if %{with shared}
+This package provides the shared library.
+%endif
 
 
 %package devel
-Summary:        Haskell %{pkg_name} library
+Summary:        %{common_summary} development files
 Group:          Development/Libraries
-Requires:       ghc = %{ghc_version}
-Requires(post): ghc = %{ghc_version}
-Requires(preun): ghc = %{ghc_version}
+%{?ghc_requires}
 Requires:       mesa-libGL-devel, mesa-libGLU-devel
 
 %description devel
-This package contains the development files for %{name}
-built for ghc-%{ghc_version}.
+%{common_description}
+
+This package contains the development files.
 
 
 %if %{with doc}
 %package doc
-Summary:        Documentation for %{name}
+Summary:        Documentation for %{common_summary}
 Group:          Development/Libraries
-Requires:       ghc-doc = %{ghc_version}
-Requires(post): ghc-doc = %{ghc_version}
-Requires(postun): ghc-doc = %{ghc_version}
+%{?ghc_doc_requires}
 
 %description doc
-This package contains development documentation files for the %{name} library.
+%{common_description}
+
+This package contains development documentation files.
 %endif
 
 
 %if %{with prof}
 %package prof
-Summary:        Profiling libraries for %{name}
+Summary:        Profiling libraries for %{common_summary}
 Group:          Development/Libraries
-Requires:       %{name}-devel = %{version}-%{release}
-Requires:       ghc-prof = %{ghc_version}
+%{?ghc_prof_requires}
 
 %description prof
-This package contains profiling libraries for %{name}
-built for ghc-%{ghc_version}.
+%{common_description}
+
+This package contains the profiling library.
 %endif
 
 
@@ -83,13 +87,12 @@ built for ghc-%{ghc_version}.
 %if %{with doc}
 %cabal haddock
 %endif
-%ghc_gen_scripts
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 %cabal_install
-%ghc_install_scripts
+%cabal_pkg_conf
+
 %ghc_gen_filelists %{name}
 
 
@@ -98,7 +101,7 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %post devel
-%ghc_register_pkg
+ghc-pkg recache
 
 
 %if %{with doc}
@@ -107,10 +110,8 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 
-%preun devel
-if [ "$1" -eq 0 ] ; then
-  %ghc_unregister_pkg
-fi
+%postun devel
+ghc-pkg recache
 
 
 %if %{with doc}
@@ -121,9 +122,18 @@ fi
 %endif
 
 
+%if %{with shared}
+%files -f %{name}.files
+%defattr(-,root,root,-)
+%{_docdir}/%{name}-%{version}
+%endif
+
+
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
+%if %{without shared}
 %{_docdir}/%{name}-%{version}
+%endif
 
 
 %if %{with doc}
@@ -139,5 +149,10 @@ fi
 
 
 %changelog
+* Sat Dec 26 2009 Jens Petersen <petersen at redhat.com> - 2.2.1.1-2
+- update for ghc-6.12.1: add shared library support
+- use new ghc*_requires macros: needs ghc-rpm-macros 0.4.0
+- add common_summary and common_description
+
 * Wed Aug 12 2009 Bryan O'Sullivan <bos at serpentine.com> - 2.2.1.1-1
 - initial packaging for Fedora created by cabal2spec




More information about the scm-commits mailing list