Author: baggins                      Date: Sat Apr 10 15:58:14 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 1
- template based

---- Files affected:
packages/ghc-binary:
   ghc-binary.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/ghc-binary/ghc-binary.spec
diff -u packages/ghc-binary/ghc-binary.spec:1.2 
packages/ghc-binary/ghc-binary.spec:1.3
--- packages/ghc-binary/ghc-binary.spec:1.2     Thu Apr  8 23:18:18 2010
+++ packages/ghc-binary/ghc-binary.spec Sat Apr 10 17:58:09 2010
@@ -1,17 +1,20 @@
 # $Revision$, $Date$
+%define        pkgname binary
 Summary:       Binary serialisation for Haskell values using lazy ByteStrings
-Name:          ghc-binary
+Name:          ghc-%{pkgname}
 Version:       0.5.0.2
-Release:       0.1
+Release:       1
 License:       BSD
 Group:         Development/Languages
-Source0:       
http://hackage.haskell.org/packages/archive/binary/0.5.0.2/binary-%{version}.tar.gz
+Source0:       
http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5: 6bf8f3d1441602c9ab09a75e3bd6e926
-URL:           http://hackage.haskell.org/package/hashed-storage/
-BuildRequires: ghc
-ExclusiveArch: %{ix86} %{x8664}
+URL:           http://hackage.haskell.org/package/%{pkgname}/
+BuildRequires: ghc >= 6.10
+%requires_eq   ghc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                libsubdir       ghc-%(/usr/bin/ghc 
--numeric-version)/%{pkgname}-%{version}
+
 %description
 Efficient, pure binary serialisation using lazy ByteStrings. Haskell
 values may be encoded to and from binary formats, written to disk as
@@ -20,26 +23,46 @@
 performance scenarios.
 
 %prep
-%setup -q -n binary-%{version}
+%setup -q -n %{pkgname}-%{version}
 
 %build
-runhaskell Setup.lhs configure \
-       --global \
-       --prefix=%{_prefix}
+./Setup.lhs configure -v2 \
+       --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libexecdir} \
+       --libsubdir=%{libsubdir} \
+       --docdir=%{_defaultdocdir}/%{name}-%{version}
 
-runhaskell Setup.lhs build
+./Setup.lhs build
+./Setup.lhs haddock --executables
 
 %install
 rm -rf $RPM_BUILD_ROOT
-runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
+./Setup.lhs 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
+
+./Setup.lhs 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 README
-FIXME
+%doc README todo
+%doc %{name}-%{version}-doc/html
+%{_libdir}/%{libsubdir}
 
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -47,6 +70,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2010/04/10 15:58:09  baggins
+- rel 1
+- template based
+
 Revision 1.2  2010/04/08 21:18:18  baggins
 - renamed to ghc-binary
 
================================================================

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

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

Reply via email to