packages: ghc-haskell-src/ghc-haskell-src.spec (NEW) - initial revision

baggins baggins at pld-linux.org
Wed Dec 15 14:22:17 CET 2010


Author: baggins                      Date: Wed Dec 15 13:22:17 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial revision

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

---- Diffs:

================================================================
Index: packages/ghc-haskell-src/ghc-haskell-src.spec
diff -u /dev/null packages/ghc-haskell-src/ghc-haskell-src.spec:1.1
--- /dev/null	Wed Dec 15 14:22:17 2010
+++ packages/ghc-haskell-src/ghc-haskell-src.spec	Wed Dec 15 14:22:11 2010
@@ -0,0 +1,74 @@
+# $Revision$, $Date$
+%define	pkgname	haskell-src
+Summary:	Support for manipulating Haskell source code
+Name:		ghc-%{pkgname}
+Version:	1.0.1.4
+Release:	0.1
+License:	BSD
+Group:		Development/Languages
+Source0:	http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5:	32d181c082393ab859e72610803bac6e
+URL:		http://hackage.haskell.org/package/%{pkgname}/
+BuildRequires:	ghc >= 6.12.3
+%requires_releq	ghc
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		ghcdir		ghc-%(/usr/bin/ghc --numeric-version)
+
+%description
+The haskell-src package provides support for manipulating Haskell
+source code. The package provides a lexer, parser and pretty-printer,
+and a definition of a Haskell abstract syntax tree (AST).
+Common uses of this package are to parse or generate Haskell 98 code. 
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+runhaskell Setup.hs configure -v2 \
+	--prefix=%{_prefix} \
+	--libdir=%{_libdir} \
+	--libexecdir=%{_libexecdir} \
+	--docdir=%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs build
+runhaskell Setup.hs haddock --executables
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
+
+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}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/usr/bin/ghc-pkg recache
+
+%postun
+/usr/bin/ghc-pkg recache
+
+%files
+%defattr(644,root,root,755)
+%doc NEWS
+%doc %{name}-%{version}-doc/html
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+
+%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/12/15 13:22:11  baggins
+- initial revision
+
================================================================


More information about the pld-cvs-commit mailing list