rpms/ghc-zlib/devel ghc-zlib.spec,1.2,1.3

Jens Petersen petersen at fedoraproject.org
Wed Dec 17 05:42:29 UTC 2008


Author: petersen

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

Modified Files:
	ghc-zlib.spec 
Log Message:
- no longer hard code ghc_version (Till Maas, #426751)
- use bcond for doc and prof build flags (Till Maas, #426751)




Index: ghc-zlib.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ghc-zlib/devel/ghc-zlib.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ghc-zlib.spec	1 Dec 2008 08:06:59 -0000	1.2
+++ ghc-zlib.spec	17 Dec 2008 05:41:58 -0000	1.3
@@ -1,18 +1,18 @@
 %define pkg_name zlib
-%define ghc_version 6.10.1
+%define ghc_version %(ghc --numeric-version)
 
 %define pkg_libdir %{_libdir}/ghc-%{ghc_version}/%{pkg_name}-%{version}
 %define pkg_docdir %{_docdir}/ghc/libraries/%{pkg_name}
 
-%define build_prof 1
-%define build_doc 1
+%bcond_without prof
+%bcond_without doc
 
 # ghc does not emit debug information
 %define debug_package %{nil}
 
 Name: ghc-%{pkg_name}
 Version: 0.5.0.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: BSD
 Group: Development/Libraries
 URL: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
@@ -42,7 +42,7 @@
 full zlib feature set.
 
 
-%if %{build_prof}
+%if %{with prof}
 %package prof
 Summary: Profiling libraries for %{name}
 Group: Development/Libraries
@@ -59,14 +59,9 @@
 
 
 %build
-%cabal_configure --ghc \
-%if %{build_prof}
-  -p
-%else
-%{nil}
-%endif
+%cabal_configure --ghc %{!?without_prof:-p}
 %cabal build
-%if %{build_doc}
+%if %{with doc}
 %cabal haddock
 %endif
 %ghc_gen_scripts
@@ -85,7 +80,7 @@
 
 %post 
 %ghc_register_pkg
-%if %{build_doc}
+%if %{with doc}
 %ghc_reindex_haddock
 %endif
 
@@ -98,7 +93,7 @@
 
 %postun
 if [ "$1" -eq 0 ] ; then
-%if %{build_doc}
+%if %{with doc}
   %ghc_reindex_haddock
 %endif
 fi
@@ -107,18 +102,22 @@
 %files -f %{name}.files
 %defattr(-,root,root,-)
 %doc LICENSE
-%if %{build_doc}
+%if %{with doc}
 %{pkg_docdir}
 %endif
 
 
-%if %{build_prof}
+%if %{with prof}
 %files prof -f %{name}-prof.files
 %defattr(-,root,root,-)
 %endif
 
 
 %changelog
+* Wed Dec 17 2008 Jens Petersen <petersen at redhat.com> - 0.5.0.0-4
+- no longer hard code ghc_version (Till Maas, #426751)
+- use bcond for doc and prof build flags (Till Maas, #426751)
+
 * Mon Dec  1 2008 Jens Petersen <petersen at redhat.com> - 0.5.0.0-3
 - sync with lib template:
   - add build_prof and build_doc




More information about the fedora-extras-commits mailing list