Author: baggins                      Date: Sat Apr 10 16:28:22 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- 0.4.10
- spec updated according to template

---- Files affected:
packages/ghc-hashed-storage:
   ghc-hashed-storage.spec (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: packages/ghc-hashed-storage/ghc-hashed-storage.spec
diff -u packages/ghc-hashed-storage/ghc-hashed-storage.spec:1.3 
packages/ghc-hashed-storage/ghc-hashed-storage.spec:1.4
--- packages/ghc-hashed-storage/ghc-hashed-storage.spec:1.3     Thu Apr  8 
23:18:56 2010
+++ packages/ghc-hashed-storage/ghc-hashed-storage.spec Sat Apr 10 18:28:17 2010
@@ -1,21 +1,28 @@
 # $Revision$, $Date$
+%define        pkgname hashed-storage
 Summary:       Hashed file storage support code
-Name:          ghc-hashed-storage
-Version:       0.4.3
-Release:       0.1
+Name:          ghc-%{pkgname}
+Version:       0.4.10
+Release:       1
 License:       BSD
 Group:         Development/Languages
-Source0:       
http://hackage.haskell.org/packages/archive/hashed-storage/0.4.3/hashed-storage-%{version}.tar.gz
-# Source0-md5: a8427578dc13006689158cd9f2c90e56
-URL:           http://hackage.haskell.org/package/hashed-storage/
-BuildRequires: ghc
+Source0:       
http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: 12c5b21a74e0ad1d975ba73c247bf77c
+URL:           http://hackage.haskell.org/package/%{pkgname}/
+BuildRequires: ghc >= 6.10
 BuildRequires: ghc-binary
 BuildRequires: ghc-dataenc
-BuildRequires: ghc-mmap
+BuildRequires: ghc-mmap = 0.4.1
 BuildRequires: ghc-zlib
-ExclusiveArch: %{ix86} %{x8664}
+%requires_eq   ghc
+Requires:      ghc-binary
+Requires:      ghc-dataenc
+Requires:      ghc-mmap = 0.4.1
+Requires:      ghc-zlib
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                libsubdir       ghc-%(/usr/bin/ghc 
--numeric-version)/%{pkgname}-%{version}
+
 %description
 Support code for reading and manipulating hashed file storage (where
 each file and directory is associated with a cryptographic hash, for
@@ -26,22 +33,46 @@
 hashes of the plain files and directories).
 
 %prep
-%setup -q -n hashed-storage-%{version}
+%setup -q -n %{pkgname}-%{version}
 
 %build
-runhaskell Setup.hs configure --prefix=%{_prefix}
+runhaskell Setup.hs configure -v2 \
+       --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libexecdir} \
+       --libsubdir=%{libsubdir} \
+       --docdir=%{_defaultdocdir}/%{name}-%{version}
+
 runhaskell Setup.hs build
+runhaskell Setup.hs haddock --executables
 
 %install
 rm -rf $RPM_BUILD_ROOT
 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
 
+# work around automatic haddock docs installation
+rm -rf %{name}-%{version}-doc
+cp -a $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version} 
%{name}-%{version}-doc
+
+runhaskell Setup.hs register \
+       --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{libsubdir}/%{pkgname}.conf
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/usr/bin/ghc-pkg update %{_libdir}/%{libsubdir}/%{pkgname}.conf
+
+%postun
+if [ "$1" = "0" ]; then
+       /usr/bin/ghc-pkg unregister %{pkgname}-%{version}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc NEWS
+%doc %{name}-%{version}-doc/html
+%{_libdir}/%{libsubdir}
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -49,6 +80,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.4  2010/04/10 16:28:17  baggins
+- 0.4.10
+- spec updated according to template
+
 Revision 1.3  2010/04/08 21:18:56  baggins
 - renamed to ghc-hashed-storage
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/ghc-hashed-storage/ghc-hashed-storage.spec?r1=1.3&r2=1.4&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to