rpms/ghc-paths/devel ghc-paths.spec,1.1,1.2

Jens Petersen petersen at fedoraproject.org
Fri Feb 13 04:08:07 UTC 2009


Author: petersen

Update of /cvs/pkgs/rpms/ghc-paths/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24105

Modified Files:
	ghc-paths.spec 
Log Message:
update to latest packaging template: use bcond and add doc subpackage



Index: ghc-paths.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghc-paths/devel/ghc-paths.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ghc-paths.spec	23 Dec 2008 01:44:20 -0000	1.1
+++ ghc-paths.spec	13 Feb 2009 04:07:37 -0000	1.2
@@ -4,34 +4,56 @@
 %define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
 %define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}-%{version}
 
-# Haskell compilers do not emit debug information
+%bcond_without prof
+%bcond_without doc
+
+# ghc does not emit debug information
 %define debug_package %{nil}
 
-Name:		%{pkg_name}
-Version:	0.1.0.5
-Release:	2%{?dist}
-Summary:	Interface to GHC's installation directories
-
-Group:		Development/Libraries
-License:	BSD
-URL:		http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
-Source0:	http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Name:           %{pkg_name}
+Version:        0.1.0.5
+Release:        3%{?dist}
+Summary:        Interface to GHC's installation directories
+
+Group:          Development/Libraries
+License:        BSD
+URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
+Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Provides:       %{name}-devel = %{version}-%{release}
 # ghc has only been bootstrapped on the following archs:
 ExclusiveArch:  i386 x86_64 ppc
-BuildRequires:	ghc = %{ghc_version}, ghc-prof = %{ghc_version}
-Requires:	ghc = %{ghc_version}
+BuildRequires:  ghc = %{ghc_version}
+%if %{with doc}
+BuildRequires:  ghc-doc = %{ghc_version}
+%endif
+%if %{with prof}
+BuildRequires:  ghc-prof = %{ghc_version}
+%endif
+Requires:       ghc = %{ghc_version}
 Requires(post): ghc = %{ghc_version}
 Requires(preun): ghc = %{ghc_version}
-Requires(postun): ghc = %{ghc_version}
 
 %description
 This library provides an interface to reading the install directories
 of the ghc compiler.
 
 
+%if %{with doc}
+%package doc
+Summary: Documentation for %{name}
+Group: Development/Libraries
+Requires: ghc-doc = %{ghc_version}
+Requires(post): ghc-doc = %{ghc_version}
+Requires(postun): ghc-doc = %{ghc_version}
+
+%description doc
+This package contains development documentation files for the %{name} library.
+%endif
+
+
+%if %{with prof}
 %package prof
 Summary: Profiling libraries for %{name}
 Group: Development/Libraries
@@ -40,6 +62,7 @@
 
 %description prof
 This package contains profiling libraries for %{name}.
+%endif
 
 
 %prep
@@ -47,9 +70,11 @@
 
 
 %build
-%cabal_configure --ghc -p
+%cabal_configure --ghc %{!?without_prof:-p}
 %cabal build
+%if %{with doc}
 %cabal haddock
+%endif
 %ghc_gen_scripts
 
 
@@ -64,9 +89,14 @@
 rm -rf $RPM_BUILD_ROOT
 
 
-%post 
+%post
 %ghc_register_pkg
+
+
+%if %{with doc}
+%post doc
 %ghc_reindex_haddock
+%endif
 
 
 %preun 
@@ -75,23 +105,36 @@
 fi
 
 
-%postun
+%if %{with doc}
+%postun doc
 if [ "$1" -eq 0 ] ; then
   %ghc_reindex_haddock
 fi
+%endif
 
 
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
+
+
+%if %{with doc}
+%files doc
+%defattr(-,root,root,-)
 %{pkg_docdir}
+%endif
 
 
+%if %{with prof}
 %files prof -f %{name}-prof.files
 %defattr(-,root,root,-)
+%endif
 
 
 %changelog
+* Fri Feb 13 2009 Jens Petersen <petersen at redhat.com> - 0.1.0.5-3
+- update to latest packaging template: use bcond and add doc subpackage
+
 * Tue Dec 23 2008 Jens Petersen <petersen at redhat.com> - 0.1.0.5-2
 - improve summary and description (#476483)
 




More information about the scm-commits mailing list