]> git.pld-linux.org Git - packages/cpphs.git/blob - cpphs.spec
- rel 2
[packages/cpphs.git] / cpphs.spec
1 %define         pkgname cpphs
2 Summary:        A liberalised re-implementation of cpp, the C pre-processor
3 Name:           cpphs
4 Version:        1.13.1
5 Release:        2
6 License:        LGPL
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/cpphs/%{version}/%{name}-%{version}.tar.gz
9 # Source0-md5:  4fe8b5c71068e97602b0f45facd76be3
10 URL:            http://haskell.org/cpphs/
11 BuildRequires:  ghc >= 6.12.3
12 BuildRequires:  rpmbuild(macros) >= 1.608
13 %requires_eq    ghc
14 Obsoletes:      cpphs-doc
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 # debuginfo is not useful for ghc
18 %define         _enable_debug_packages  0
19
20 # don't compress haddoc files
21 %define         _noautocompressdoc      *.haddock
22
23 %description
24 Cpphs is a re-implementation of the C pre-processor that is both more
25 compatible with Haskell, and itself written in Haskell so that it can
26 be distributed with compilers.
27
28 This version of the C pre-processor is pretty-much feature-complete
29 and compatible with traditional (K&R) pre-processors. Additional
30 features include: a plain-text mode; an option to unlit literate code
31 files; and an option to turn off macro-expansion.
32
33 %prep
34 %setup -q
35
36 %build
37 runhaskell Setup.hs configure -v2 \
38         --prefix=%{_prefix} \
39         --libdir=%{_libdir} \
40         --libexecdir=%{_libexecdir} \
41         --docdir=%{_docdir}/%{name}-%{version}
42
43 runhaskell Setup.hs build
44 runhaskell Setup.hs haddock --executables
45
46 %install
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
49
50 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
51
52 # work around automatic haddock docs installation
53 rm -rf %{name}-%{version}-doc
54 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
55
56 runhaskell Setup.hs register \
57         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
63 %ghc_pkg_recache
64
65 %postun
66 %ghc_pkg_recache
67
68 %files
69 %defattr(644,root,root,755)
70 %doc %{name}-%{version}-doc/*
71 %attr(755,root,root) %{_bindir}/cpphs
72 %{_libdir}/%{ghcdir}/package.conf.d/%{name}.conf
73 %{_libdir}/%{ghcdir}/%{name}-%{version}
This page took 0.128055 seconds and 3 git commands to generate.