]>
Commit | Line | Data |
---|---|---|
f588e68b JP |
1 | %define pkgname dbus |
2 | Summary: A Haskell binding to the dbus graphics library | |
3 | Name: ghc-%{pkgname} | |
4 | Version: 0.10.4 | |
aed4cd1e | 5 | Release: 2 |
f588e68b JP |
6 | License: BSD |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
9 | # Source0-md5: 37d7c18abd7a4b397265e90eed035e92 | |
10 | URL: http://hackage.haskell.org/package/dbus/ | |
11 | BuildRequires: ghc >= 6.12.3 | |
12 | BuildRequires: ghc-cereal < 0.4 | |
13 | BuildRequires: ghc-cereal >= 0.3.4 | |
14 | BuildRequires: ghc-libxml-sax >= 0.7 | |
15 | BuildRequires: ghc-network >= 2.2.3 | |
16 | BuildRequires: ghc-parsec < 3.2 | |
17 | BuildRequires: ghc-parsec >= 2.0 | |
18 | BuildRequires: ghc-random >= 1.0 | |
19 | BuildRequires: ghc-text < 0.12 | |
20 | BuildRequires: ghc-text >= 0.11.1.5 | |
21 | BuildRequires: ghc-transformers < 0.4 | |
22 | BuildRequires: ghc-transformers >= 0.2 | |
23 | BuildRequires: ghc-vector < 0.11 | |
24 | BuildRequires: ghc-vector >= 0.7 | |
25 | BuildRequires: ghc-xml-types >= 0.3 | |
26 | BuildRequires: rpmbuild(macros) >= 1.608 | |
27 | %requires_eq ghc | |
28 | Requires: ghc-cereal < 0.4 | |
29 | Requires: ghc-cereal >= 0.3.4 | |
30 | Requires: ghc-libxml-sax >= 0.7 | |
31 | Requires: ghc-network >= 2.2.3 | |
32 | Requires: ghc-parsec < 3.2 | |
33 | Requires: ghc-parsec >= 2.0 | |
34 | Requires: ghc-random >= 1.0 | |
35 | Requires: ghc-text < 0.12 | |
36 | Requires: ghc-text >= 0.11.1.5 | |
37 | Requires: ghc-transformers < 0.4 | |
38 | Requires: ghc-transformers >= 0.2 | |
39 | Requires: ghc-vector < 0.11 | |
40 | Requires: ghc-vector >= 0.7 | |
41 | Requires: ghc-xml-types >= 0.3 | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | # debuginfo is not useful for ghc | |
45 | %define _enable_debug_packages 0 | |
46 | ||
47 | %description | |
48 | A Haskell binding to the dbus graphics library. | |
49 | ||
50 | %package doc | |
51 | Summary: HTML documentation for %{pkgname} | |
52 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname} | |
53 | Group: Documentation | |
54 | ||
55 | %description doc | |
56 | HTML documentation for %{pkgname}. | |
57 | ||
58 | %description doc -l pl.UTF-8 | |
59 | Dokumentacja w formacie HTML dla %{pkgname}. | |
60 | ||
61 | %prep | |
62 | %setup -q -n %{pkgname}-%{version} | |
63 | ||
64 | %build | |
65 | runhaskell Setup.hs configure -v2 \ | |
66 | --prefix=%{_prefix} \ | |
67 | --libdir=%{_libdir} \ | |
68 | --libexecdir=%{_libexecdir} \ | |
69 | --docdir=%{_docdir}/%{name}-%{version} | |
70 | ||
71 | runhaskell Setup.hs build | |
72 | runhaskell Setup.hs haddock --executables | |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
77 | ||
78 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
79 | ||
80 | # work around automatic haddock docs installation | |
81 | rm -rf %{name}-%{version}-doc | |
82 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
83 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
84 | ||
85 | runhaskell Setup.hs register \ | |
86 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
87 | ||
88 | %clean | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %post | |
92 | %ghc_pkg_recache | |
93 | ||
94 | %postun | |
95 | %ghc_pkg_recache | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
100 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
101 | ||
102 | %files doc | |
103 | %defattr(644,root,root,755) | |
104 | %doc %{name}-%{version}-doc/* |