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