3 %bcond_without prof # profiling library
6 Summary: A liberalised re-implementation of cpp, the C pre-processor
7 Summary(pl.UTF-8): Swobodniejsza reimplementacja cpp (preprocesora C)
12 Group: Development/Languages
13 # Source0Download: http://hackage.haskell.org/package/cpphs
14 Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5: 8d65834ec7b2905545ff127208a64a41
16 URL: http://haskell.org/cpphs/
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base < 6
19 BuildRequires: ghc-base >= 3
20 BuildRequires: ghc-directory
21 BuildRequires: ghc-old-locale
22 BuildRequires: ghc-old-time
23 BuildRequires: ghc-polyparse >= 1.9
25 BuildRequires: ghc-base-prof < 6
26 BuildRequires: ghc-base-prof >= 3
27 BuildRequires: ghc-directory-prof
28 BuildRequires: ghc-old-locale-prof
29 BuildRequires: ghc-old-time-prof
30 BuildRequires: ghc-polyparse-prof >= 1.9
31 BuildRequires: ghc-prof >= 6.12.3
33 BuildRequires: rpmbuild(macros) >= 1.608
34 Requires(post,postun): /usr/bin/ghc-pkg
36 Requires: ghc-base < 6
37 Requires: ghc-base >= 3
38 Requires: ghc-directory
39 Requires: ghc-old-locale
40 Requires: ghc-old-time
41 Requires: ghc-polyparse >= 1.9
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 # debuginfo is not useful for ghc
46 %define _enable_debug_packages 0
48 # don't compress haddock files
49 %define _noautocompressdoc *.haddock
52 Cpphs is a re-implementation of the C pre-processor that is both more
53 compatible with Haskell, and itself written in Haskell so that it can
54 be distributed with compilers.
56 This version of the C pre-processor is pretty-much feature-complete
57 and compatible with traditional (K&R) pre-processors. Additional
58 features include: a plain-text mode; an option to unlit literate code
59 files; and an option to turn off macro-expansion.
61 %description -l pl.UTF-8
62 Cpphs to reimplementacja preprocesora C, która jest bardziej zgodna z
63 Haskellem, a jednocześnie sama napisana w Haskellu, więc może być
64 rozprowadzania z kompilatorami.
66 Ta wersja preprocesora C jest w większości kompletna pod względem
67 funkcjonalności i zgodna z tradycyjnymi preprocesorami (K&R).
68 Dodatkowe funkcje obejmują m.in.: tryb zwykłego tekstu, opcję do
69 wyłączania rozwijania makr.
72 Summary: Profiling cpphs library for GHC
73 Summary(pl.UTF-8): Biblioteka profilująca cpphs dla GHC
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
76 Requires: ghc-base-prof < 6
77 Requires: ghc-base-prof >= 3
78 Requires: ghc-directory-prof
79 Requires: ghc-old-locale-prof
80 Requires: ghc-old-time-prof
83 Profiling cpphs library for GHC. Should be installed when GHC's
84 profiling subsystem is needed.
86 %description prof -l pl.UTF-8
87 Biblioteka profilująca cpphs dla GHC. Powinna być zainstalowana kiedy
88 potrzebujemy systemu profilującego z GHC.
94 runhaskell Setup.hs configure -v2 \
95 %{?with_prof:--enable-library-profiling} \
98 --libexecdir=%{_libexecdir} \
99 --docdir=%{_docdir}/%{name}-%{version}
101 runhaskell Setup.hs build
102 runhaskell Setup.hs haddock --executables
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
108 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
110 # work around automatic haddock docs installation
111 %{__rm} -rf %{name}-%{version}-doc
112 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
113 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
115 runhaskell Setup.hs register \
116 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
119 rm -rf $RPM_BUILD_ROOT
128 %defattr(644,root,root,755)
129 %doc %{name}-%{version}-doc/*
130 %attr(755,root,root) %{_bindir}/cpphs
131 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
133 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HScpphs-%{version}.o
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}.a
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
137 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.hi
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.hi
144 %defattr(644,root,root,755)
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}_p.a
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.p_hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.p_hi