2 Summary: A liberalised re-implementation of cpp, the C pre-processor
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/cpphs/%{version}/%{name}-%{version}.tar.gz
9 # Source0-md5: 4fe8b5c71068e97602b0f45facd76be3
10 URL: http://haskell.org/cpphs/
11 BuildRequires: ghc >= 6.12.3
12 BuildRequires: rpmbuild(macros) >= 1.608
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 # debuginfo is not useful for ghc
18 %define _enable_debug_packages 0
20 # don't compress haddoc files
21 %define _noautocompressdoc *.haddock
24 Cpphs is a re-implementation of the C pre-processor that is both more
25 compatible with Haskell, and itself written in Haskell so that it can
26 be distributed with compilers.
28 This version of the C pre-processor is pretty-much feature-complete
29 and compatible with traditional (K&R) pre-processors. Additional
30 features include: a plain-text mode; an option to unlit literate code
31 files; and an option to turn off macro-expansion.
37 runhaskell Setup.hs configure -v2 \
40 --libexecdir=%{_libexecdir} \
41 --docdir=%{_docdir}/%{name}-%{version}
43 runhaskell Setup.hs build
44 runhaskell Setup.hs haddock --executables
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
50 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
52 # work around automatic haddock docs installation
53 rm -rf %{name}-%{version}-doc
54 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
56 runhaskell Setup.hs register \
57 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
60 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
70 %doc %{name}-%{version}-doc/*
71 %attr(755,root,root) %{_bindir}/cpphs
72 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
73 %{_libdir}/%{ghcdir}/%{name}-%{version}