Author: baggins                      Date: Sat Apr 10 16:09:58 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial revision

---- Files affected:
packages/ghc-mmap:
   ghc-mmap.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/ghc-mmap/ghc-mmap.spec
diff -u /dev/null packages/ghc-mmap/ghc-mmap.spec:1.1
--- /dev/null   Sat Apr 10 18:09:58 2010
+++ packages/ghc-mmap/ghc-mmap.spec     Sat Apr 10 18:09:49 2010
@@ -0,0 +1,74 @@
+# $Revision$, $Date$
+%define        pkgname mmap
+Summary:       Memory mapped files for POSIX and Windows
+Name:          ghc-%{pkgname}
+Version:       0.5.4
+Release:       1
+License:       BSD
+Group:         Development/Languages
+Source0:       
http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: 10b7f62d96e7f1b83dac4dfc66cb4f97
+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
+This library provides a wrapper to mmap(2) or MapViewOfFile,
+allowing files or devices to be lazily loaded into memory
+as strict or lazy ByteStrings, ForeignPtrs or plain Ptrs,
+using the virtual memory subsystem to do on-demand loading.
+Modifications are also supported. 
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+runhaskell Setup.hs configure -v2 \
+       --prefix=%{_prefix} \
+       --libdir=%{_libdir} \
+       --libexecdir=%{_libexecdir} \
+       --libsubdir=%{libsubdir} \
+       --docdir=%{_docdir}/%{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%{_docdir}/%{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 %{name}-%{version}-doc/html
+%{_libdir}/%{libsubdir}
+
+%define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <[email protected]>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/04/10 16:09:49  baggins
+- initial revision
+
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to