]> git.pld-linux.org Git - packages/cpphs.git/blob - cpphs.spec
- release 3
[packages/cpphs.git] / cpphs.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4
5 %define         pkgname cpphs
6 Summary:        A liberalised re-implementation of cpp, the C pre-processor
7 Summary(pl.UTF-8):      Swobodniejsza reimplementacja cpp (preprocesora C)
8 Name:           cpphs
9 Version:        1.20.1
10 Release:        1
11 License:        LGPL
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
24 %if %{with prof}
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
32 %endif
33 BuildRequires:  rpmbuild(macros) >= 1.608
34 Requires(post,postun):  /usr/bin/ghc-pkg
35 %requires_eq    ghc
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
42 Obsoletes:      cpphs-doc
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 # debuginfo is not useful for ghc
46 %define         _enable_debug_packages  0
47
48 # don't compress haddock files
49 %define         _noautocompressdoc      *.haddock
50
51 %description
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.
55
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.
60
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.
65
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.
70
71 %package prof
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
81
82 %description prof
83 Profiling cpphs library for GHC. Should be installed when GHC's
84 profiling subsystem is needed.
85
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.
89
90 %prep
91 %setup -q
92
93 %build
94 runhaskell Setup.hs configure -v2 \
95         %{?with_prof:--enable-library-profiling} \
96         --prefix=%{_prefix} \
97         --libdir=%{_libdir} \
98         --libexecdir=%{_libexecdir} \
99         --docdir=%{_docdir}/%{name}-%{version}
100
101 runhaskell Setup.hs build
102 runhaskell Setup.hs haddock --executables
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
107
108 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
109
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}
114
115 runhaskell Setup.hs register \
116         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %post
122 %ghc_pkg_recache
123
124 %postun
125 %ghc_pkg_recache
126
127 %files
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
132
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
141
142 %if %{with prof}
143 %files prof
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
148 %endif
This page took 0.126167 seconds and 3 git commands to generate.