]> git.pld-linux.org Git - packages/cpphs.git/blame - cpphs.spec
- release 3
[packages/cpphs.git] / cpphs.spec
CommitLineData
3ce3459f
JB
1#
2# Conditional build:
3%bcond_without prof # profiling library
ada44d30 4
b23725ea 5%define pkgname cpphs
1badba1d 6Summary: A liberalised re-implementation of cpp, the C pre-processor
3ce3459f 7Summary(pl.UTF-8): Swobodniejsza reimplementacja cpp (preprocesora C)
13404ae7 8Name: cpphs
6710341c 9Version: 1.20.9.1
2fbe2d3b 10Release: 3
13404ae7
JR
11License: LGPL
12Group: Development/Languages
ada44d30
ER
13# Source0Download: http://hackage.haskell.org/package/cpphs
14Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
6710341c 15# Source0-md5: a3a9902c2de8820e9aa022fd632645fb
13404ae7
JR
16URL: http://haskell.org/cpphs/
17BuildRequires: ghc >= 6.12.3
6710341c
JR
18BuildRequires: ghc-base < 5
19BuildRequires: ghc-base >= 4.3
3ce3459f 20BuildRequires: ghc-directory
6710341c
JR
21BuildRequires: ghc-time
22BuildRequires: ghc-polyparse >= 1.13
3ce3459f 23%if %{with prof}
6710341c
JR
24BuildRequires: ghc-base-prof < 5
25BuildRequires: ghc-base-prof >= 4.3
3ce3459f 26BuildRequires: ghc-directory-prof
6710341c
JR
27BuildRequires: ghc-time-prof
28BuildRequires: ghc-polyparse-prof >= 1.13
ada44d30 29BuildRequires: ghc-prof >= 6.12.3
3ce3459f 30%endif
a5caf914 31BuildRequires: rpmbuild(macros) >= 1.608
3ce3459f 32Requires(post,postun): /usr/bin/ghc-pkg
a5caf914 33%requires_eq ghc
6710341c 34Requires: ghc-base < 5
ada44d30 35Requires: ghc-base >= 3
3ce3459f 36Requires: ghc-directory
6710341c 37Requires: ghc-time
dfd65f20 38Requires: ghc-polyparse >= 1.9
92cf49e9 39Obsoletes: cpphs-doc < 1.13.1-2
13404ae7
JR
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
a5caf914
ER
42# debuginfo is not useful for ghc
43%define _enable_debug_packages 0
13404ae7 44
3ce3459f 45# don't compress haddock files
4f7e6876
JR
46%define _noautocompressdoc *.haddock
47
13404ae7 48%description
a5caf914
ER
49Cpphs is a re-implementation of the C pre-processor that is both more
50compatible with Haskell, and itself written in Haskell so that it can
51be distributed with compilers.
1badba1d 52
a5caf914
ER
53This version of the C pre-processor is pretty-much feature-complete
54and compatible with traditional (K&R) pre-processors. Additional
55features include: a plain-text mode; an option to unlit literate code
56files; and an option to turn off macro-expansion.
57
3ce3459f
JB
58%description -l pl.UTF-8
59Cpphs to reimplementacja preprocesora C, która jest bardziej zgodna z
60Haskellem, a jednocześnie sama napisana w Haskellu, więc może być
61rozprowadzania z kompilatorami.
62
63Ta wersja preprocesora C jest w większości kompletna pod względem
64funkcjonalności i zgodna z tradycyjnymi preprocesorami (K&R).
65Dodatkowe funkcje obejmują m.in.: tryb zwykłego tekstu, opcję do
66wyłączania rozwijania makr.
67
160cb52d
JR
68%package prof
69Summary: Profiling cpphs library for GHC
3ce3459f 70Summary(pl.UTF-8): Biblioteka profilująca cpphs dla GHC
160cb52d
JR
71Group: Development/Libraries
72Requires: %{name} = %{version}-%{release}
6710341c
JR
73Requires: ghc-base-prof < 5
74Requires: ghc-base-prof >= 4.3
3ce3459f 75Requires: ghc-directory-prof
6710341c
JR
76Requires: ghc-time-prof
77Requires: ghc-polyparse-prof >= 1.13
160cb52d
JR
78
79%description prof
3ce3459f
JB
80Profiling cpphs library for GHC. Should be installed when GHC's
81profiling subsystem is needed.
160cb52d
JR
82
83%description prof -l pl.UTF-8
ada44d30
ER
84Biblioteka profilująca cpphs dla GHC. Powinna być zainstalowana kiedy
85potrzebujemy systemu profilującego z GHC.
160cb52d 86
13404ae7
JR
87%prep
88%setup -q
89
90%build
3ce3459f
JB
91runhaskell Setup.hs configure -v2 \
92 %{?with_prof:--enable-library-profiling} \
13404ae7
JR
93 --prefix=%{_prefix} \
94 --libdir=%{_libdir} \
95 --libexecdir=%{_libexecdir} \
96 --docdir=%{_docdir}/%{name}-%{version}
97
98runhaskell Setup.hs build
99runhaskell Setup.hs haddock --executables
100
101%install
102rm -rf $RPM_BUILD_ROOT
103install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
104
105runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
106
107# work around automatic haddock docs installation
2460f3a8 108%{__rm} -rf %{name}-%{version}-doc
4f7e6876 109cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
2460f3a8 110%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
13404ae7
JR
111
112runhaskell Setup.hs register \
3ce3459f 113 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
13404ae7
JR
114
115%clean
116rm -rf $RPM_BUILD_ROOT
117
118%post
a5caf914 119%ghc_pkg_recache
13404ae7
JR
120
121%postun
a5caf914 122%ghc_pkg_recache
13404ae7
JR
123
124%files
125%defattr(644,root,root,755)
4f7e6876 126%doc %{name}-%{version}-doc/*
e389f860 127%attr(755,root,root) %{_bindir}/cpphs
1badba1d 128%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
160cb52d
JR
129
130%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
6710341c
JR
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
160cb52d
JR
136%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
137%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor
3ce3459f 138%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.hi
6710341c 139%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.dyn_hi
160cb52d 140%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs
3ce3459f 141%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.hi
6710341c 142%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.dyn_hi
160cb52d 143
dfd65f20 144%if %{with prof}
160cb52d
JR
145%files prof
146%defattr(644,root,root,755)
6710341c
JR
147%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScpphs-%{version}-*_p.a
148%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
160cb52d
JR
149%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/*.p_hi
150%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Preprocessor/Cpphs/*.p_hi
dfd65f20 151%endif
This page took 0.089006 seconds and 4 git commands to generate.