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: a3a9902c2de8820e9aa022fd632645fb
16 URL: http://haskell.org/cpphs/
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base < 5
19 BuildRequires: ghc-base >= 4.3
20 BuildRequires: ghc-directory
21 BuildRequires: ghc-time
22 BuildRequires: ghc-polyparse >= 1.13
24 BuildRequires: ghc-base-prof < 5
25 BuildRequires: ghc-base-prof >= 4.3
26 BuildRequires: ghc-directory-prof
27 BuildRequires: ghc-time-prof
28 BuildRequires: ghc-polyparse-prof >= 1.13
29 BuildRequires: ghc-prof >= 6.12.3
31 BuildRequires: rpmbuild(macros) >= 1.608
32 Requires(post,postun): /usr/bin/ghc-pkg
34 Requires: ghc-base < 5
35 Requires: ghc-base >= 3
36 Requires: ghc-directory
38 Requires: ghc-polyparse >= 1.9
39 Obsoletes: cpphs-doc < 1.13.1-2
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 # debuginfo is not useful for ghc
43 %define _enable_debug_packages 0
45 # don't compress haddock files
46 %define _noautocompressdoc *.haddock
49 Cpphs is a re-implementation of the C pre-processor that is both more
50 compatible with Haskell, and itself written in Haskell so that it can
51 be distributed with compilers.
53 This version of the C pre-processor is pretty-much feature-complete
54 and compatible with traditional (K&R) pre-processors. Additional
55 features include: a plain-text mode; an option to unlit literate code
56 files; and an option to turn off macro-expansion.
58 %description -l pl.UTF-8
59 Cpphs to reimplementacja preprocesora C, która jest bardziej zgodna z
60 Haskellem, a jednocześnie sama napisana w Haskellu, więc może być
61 rozprowadzania z kompilatorami.
63 Ta wersja preprocesora C jest w większości kompletna pod względem
64 funkcjonalności i zgodna z tradycyjnymi preprocesorami (K&R).
65 Dodatkowe funkcje obejmują m.in.: tryb zwykłego tekstu, opcję do
66 wyłączania rozwijania makr.
69 Summary: Profiling cpphs library for GHC
70 Summary(pl.UTF-8): Biblioteka profilująca cpphs dla GHC
71 Group: Development/Libraries
72 Requires: %{name} = %{version}-%{release}
73 Requires: ghc-base-prof < 5
74 Requires: ghc-base-prof >= 4.3
75 Requires: ghc-directory-prof
76 Requires: ghc-time-prof
77 Requires: ghc-polyparse-prof >= 1.13
80 Profiling cpphs library for GHC. Should be installed when GHC's
81 profiling subsystem is needed.
83 %description prof -l pl.UTF-8
84 Biblioteka profilująca cpphs dla GHC. Powinna być zainstalowana kiedy
85 potrzebujemy systemu profilującego z GHC.
91 runhaskell Setup.hs configure -v2 \
92 %{?with_prof:--enable-library-profiling} \
95 --libexecdir=%{_libexecdir} \
96 --docdir=%{_docdir}/%{name}-%{version}
98 runhaskell Setup.hs build
99 runhaskell Setup.hs haddock --executables
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
105 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
107 # work around automatic haddock docs installation
108 %{__rm} -rf %{name}-%{version}-doc
109 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
110 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
112 runhaskell Setup.hs register \
113 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
116 rm -rf $RPM_BUILD_ROOT
125 %defattr(644,root,root,755)
126 %doc %{name}-%{version}-doc/*
127 %attr(755,root,root) %{_bindir}/cpphs
128 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}-*.so
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}-*.a
133 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}-*_p.a
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
137 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.hi
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.dyn_hi
140 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.hi
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.dyn_hi
146 %defattr(644,root,root,755)
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}-*_p.a
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.p_hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.p_hi