[darcs] turn on tests; add obsoletes for darcs-beta

Jens Petersen petersen at fedoraproject.org
Wed Jan 25 01:41:13 UTC 2012


commit c8414485be750e52e18dde3e277f7ad731b4abfa
Author: Jens Petersen <petersen at redhat.com>
Date:   Wed Jan 25 10:41:05 2012 +0900

    turn on tests; add obsoletes for darcs-beta

 darcs.spec |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)
---
diff --git a/darcs.spec b/darcs.spec
index 7410e78..6e5e90e 100644
--- a/darcs.spec
+++ b/darcs.spec
@@ -2,9 +2,12 @@
 # https://fedoraproject.org/wiki/Packaging:Haskell
 # https://fedoraproject.org/wiki/PackagingDrafts/Haskell
 
-%global pkg_name darcs-beta
+# for a darcs-beta test release
+%define beta 1
 
-%global common_summary Haskell %{pkg_name} library
+%global pkg_name darcs%{?beta:-beta}
+
+%global common_summary Haskell darcs library
 
 %global common_description Darcs is a revision control system, along the lines of CVS\
 or arch. That means that it keeps track of various revisions\
@@ -16,12 +19,12 @@ revision control systems: 1) each copy of the source is a\
 fully functional branch, and 2) underlying darcs is a\
 consistent and powerful theory of patches.
 
-%bcond_with tests
+%bcond_without tests
 
 # override pkg_name to allow for darcs-beta
 Name:           darcs
 Version:        2.7.98.3
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        David's Advanced Revision Control System
 
 Group:          Development/Tools
@@ -61,11 +64,15 @@ Obsoletes:      darcs-server < 2.2.1-6
 
 
 %build
+%if %{with tests}
+%define cabal_configure_options -ftest
+%endif
 %ghc_lib_build
 
 
 %if %{with tests}
 %check
+dist/build/unit/unit
 %cabal test
 %endif
 
@@ -78,12 +85,14 @@ cp -p contrib/darcs_completion $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/d
 
 
 %ghc_package
+Obsoletes: ghc-darcs%{!?beta:-beta} < %{version}-%{release}
 
 %ghc_description
 
 
 %ghc_devel_package
 Requires:  curl-devel
+Obsoletes: ghc-darcs%{!?beta:-beta}-devel < %{version}-%{release}
 
 %ghc_devel_description
 
@@ -103,6 +112,10 @@ Requires:  curl-devel
 
 
 %changelog
+* Fri Jan 20 2012 Jens Petersen <petersen at redhat.com> - 2.7.98.3-2
+- turn on tests
+- add obsoletes for darcs-beta
+
 * Fri Jan 20 2012 Jens Petersen <petersen at redhat.com> - 2.7.98.3-1
 - update to 2.7.98.3 beta release:
   see http://wiki.darcs.net/changes%20since%202.5


More information about the scm-commits mailing list