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