template-specs: haskell.spec (NEW) - template for haskell (ghc) packages
baggins
baggins at pld-linux.org
Thu Apr 8 14:03:52 CEST 2010
Author: baggins Date: Thu Apr 8 12:03:52 2010 GMT
Module: template-specs Tag: HEAD
---- Log message:
- template for haskell (ghc) packages
---- Files affected:
template-specs:
haskell.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: template-specs/haskell.spec
diff -u /dev/null template-specs/haskell.spec:1.1
--- /dev/null Thu Apr 8 14:03:52 2010
+++ template-specs/haskell.spec Thu Apr 8 14:03:46 2010
@@ -0,0 +1,66 @@
+# $Revision$, $Date$
+%define pkgname NAME
+Summary: Hashed file storage support code
+Name: haskell-%{pkgname}
+Version: VERSION
+Release: 0.1
+License: BSD
+Group: Development/Languages
+Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: -
+URL: http://hackage.haskell.org/package/%{pkgname}/
+BuildRequires: ghc
+#BuildRequires: haskell-binary
+#BuildRequires: haskell-dataenc
+#BuildRequires: haskell-mmap
+#BuildRequires: haskell-zlib
+ExclusiveArch: %{ix86} %{x8664}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define libsubdir ghc-%(/usr/bin/ghc --numeric-version)/%{pkgname}-%{version}
+
+%description
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+runhaskell Setup.hs configure -v3 \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --libsubdir=%{libsubdir}
+
+runhaskell Setup.hs build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
+
+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}/ghc-%{ghcver}/%{pkgname}-%{version}/%{pkgname}.conf
+
+%postun
+/usr/bin/ghc-pkg unregister %{pkgname}-%{version}
+
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS
+%{_libdir}/%{libsubdir}
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/04/08 12:03:46 baggins
+- template for haskell (ghc) packages
+
================================================================
More information about the pld-cvs-commit
mailing list