]>
Commit | Line | Data |
---|---|---|
08c4e1c1 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
d5519cbe JR |
5 | %define pkgname th-lift |
6 | Summary: Derive Template Haskell's Lift class for datatypes | |
08c4e1c1 | 7 | Summary(pl.UTF-8): Wywodzenie klasy Lift z Template Haskella dla typów danych |
d5519cbe | 8 | Name: ghc-%{pkgname} |
08c4e1c1 | 9 | Version: 0.6 |
d5519cbe | 10 | Release: 1 |
08c4e1c1 | 11 | License: GPL v2 or BSD |
d5519cbe | 12 | Group: Development/Languages |
08c4e1c1 JB |
13 | #Source0Download: http://hackage.haskell.org/package/th-lift |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: 01da599a0961d684620f2ddf43f0560e | |
16 | URL: http://hackage.haskell.org/package/th-lift | |
d5519cbe | 17 | BuildRequires: ghc >= 6.12.3 |
08c4e1c1 JB |
18 | BuildRequires: ghc-base >= 3 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-template-haskell >= 2.4 | |
21 | BuildRequires: ghc-template-haskell < 2.10 | |
22 | %if %{with prof} | |
23 | BuildRequires: ghc-prof >= 6.12.3 | |
24 | BuildRequires: ghc-base-prof >= 3 | |
25 | BuildRequires: ghc-base-prof < 5 | |
26 | BuildRequires: ghc-template-haskell-prof >= 2.4 | |
27 | BuildRequires: ghc-template-haskell-prof < 2.10 | |
28 | %endif | |
d5519cbe | 29 | BuildRequires: rpmbuild(macros) >= 1.608 |
08c4e1c1 | 30 | Requires(post,postun): /usr/bin/ghc-pkg |
d5519cbe | 31 | %requires_releq ghc |
08c4e1c1 JB |
32 | Requires: ghc-base >= 3 |
33 | Requires: ghc-base < 5 | |
34 | Requires: ghc-template-haskell >= 2.4 | |
35 | Requires: ghc-template-haskell < 2.10 | |
d5519cbe JR |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | # debuginfo is not useful for ghc | |
39 | %define _enable_debug_packages 0 | |
40 | ||
08c4e1c1 | 41 | # don't compress haddock files |
d5519cbe JR |
42 | %define _noautocompressdoc *.haddock |
43 | ||
44 | %description | |
45 | Derive Template Haskell's Lift class for datatypes. | |
46 | ||
08c4e1c1 JB |
47 | %description -l pl.UTF-8 |
48 | Wywodzenie klasy Lift z Template Haskella dla typów danych. | |
49 | ||
d5519cbe JR |
50 | %package prof |
51 | Summary: Profiling %{pkgname} library for GHC | |
52 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
08c4e1c1 JB |
55 | Requires: ghc-base-prof >= 3 |
56 | Requires: ghc-base-prof < 5 | |
57 | Requires: ghc-template-haskell-prof >= 2.4 | |
58 | Requires: ghc-template-haskell-prof < 2.10 | |
d5519cbe JR |
59 | |
60 | %description prof | |
08c4e1c1 JB |
61 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
62 | profiling subsystem is needed. | |
d5519cbe JR |
63 | |
64 | %description prof -l pl.UTF-8 | |
65 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
66 | kiedy potrzebujemy systemu profilującego z GHC. | |
67 | ||
68 | %prep | |
69 | %setup -q -n %{pkgname}-%{version} | |
70 | ||
71 | %build | |
08c4e1c1 JB |
72 | runhaskell Setup.hs configure -v2 \ |
73 | %{?with_prof:--enable-library-profiling} \ | |
d5519cbe JR |
74 | --prefix=%{_prefix} \ |
75 | --libdir=%{_libdir} \ | |
76 | --libexecdir=%{_libexecdir} \ | |
77 | --docdir=%{_docdir}/%{name}-%{version} | |
78 | ||
79 | runhaskell Setup.hs build | |
80 | runhaskell Setup.hs haddock --executables | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
85 | ||
86 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
87 | ||
88 | # work around automatic haddock docs installation | |
84ed27e7 | 89 | %{__rm} -rf %{name}-%{version}-doc |
d5519cbe | 90 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
84ed27e7 | 91 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
d5519cbe JR |
92 | |
93 | runhaskell Setup.hs register \ | |
08c4e1c1 | 94 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
d5519cbe JR |
95 | |
96 | %clean | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %post | |
100 | %ghc_pkg_recache | |
101 | ||
102 | %postun | |
103 | %ghc_pkg_recache | |
104 | ||
105 | %files | |
106 | %defattr(644,root,root,755) | |
08c4e1c1 | 107 | %doc BSD3 Changelog %{name}-%{version}-doc/* |
d5519cbe JR |
108 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
109 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
08c4e1c1 JB |
110 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSth-lift-%{version}.o |
111 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-lift-%{version}.a | |
d5519cbe JR |
112 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language |
113 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell | |
114 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH | |
115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.hi | |
116 | ||
117 | %files prof | |
118 | %defattr(644,root,root,755) | |
08c4e1c1 | 119 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-lift-%{version}_p.a |
d5519cbe | 120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.p_hi |