]>
Commit | Line | Data |
---|---|---|
4df2c3a8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
ac3bc890 JR |
5 | %define pkgname th-orphans |
6 | Summary: Orphan instances for TH datatypes | |
4df2c3a8 | 7 | Summary(pl.UTF-8): Osierocone instancje typów danych TH |
ac3bc890 | 8 | Name: ghc-%{pkgname} |
9e50c71e | 9 | Version: 0.13.3 |
49142561 | 10 | Release: 0.1 |
ac3bc890 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
4df2c3a8 JB |
13 | #Source0Download: http://hackage.haskell.org/package/th-orphans |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
9e50c71e | 15 | # Source0-md5: d56c8222885e82e47076a27224fd4ced |
4df2c3a8 | 16 | URL: http://hackage.haskell.org/package/th-orphans |
ac3bc890 | 17 | BuildRequires: ghc >= 6.12.3 |
9e50c71e JR |
18 | BuildRequires: ghc-base >= 4.3 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-generic-deriving >= 1.9 | |
21 | BuildRequires: ghc-template-haskell | |
22 | BuildRequires: ghc-th-lift >= 0.7.1 | |
23 | BuildRequires: ghc-th-lift-instances | |
24 | BuildRequires: ghc-th-reify-many >= 0.1 | |
25 | BuildRequires: ghc-th-reify-many < 0.2 | |
4df2c3a8 | 26 | %if %{with prof} |
9e50c71e JR |
27 | BuildRequires: ghc-base-prof >= 4.3 |
28 | BuildRequires: ghc-base-prof < 5 | |
29 | BuildRequires: ghc-generic-deriving-prof >= 1.9 | |
4df2c3a8 | 30 | BuildRequires: ghc-prof >= 6.12.3 |
9e50c71e JR |
31 | BuildRequires: ghc-template-haskell-prof |
32 | BuildRequires: ghc-th-lift-instances-prof | |
33 | BuildRequires: ghc-th-lift-prof >= 0.7.1 | |
34 | BuildRequires: ghc-th-reify-many-prof >= 0.1 | |
35 | BuildRequires: ghc-th-reify-many-prof < 0.2 | |
4df2c3a8 | 36 | %endif |
ac3bc890 | 37 | BuildRequires: rpmbuild(macros) >= 1.608 |
7137bbe5 | 38 | %requires_eq ghc |
ac3bc890 | 39 | Requires(post,postun): /usr/bin/ghc-pkg |
9e50c71e JR |
40 | Requires: ghc-base >= 4.3 |
41 | Requires: ghc-base < 5 | |
42 | Requires: ghc-generic-deriving >= 1.9 | |
43 | Requires: ghc-template-haskell | |
44 | Requires: ghc-th-lift >= 0.7.1 | |
45 | Requires: ghc-th-lift-instances | |
46 | Requires: ghc-th-reify-many >= 0.1 | |
47 | Requires: ghc-th-reify-many < 0.2 | |
ac3bc890 JR |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
50 | # debuginfo is not useful for ghc | |
51 | %define _enable_debug_packages 0 | |
52 | ||
4df2c3a8 | 53 | # don't compress haddock files |
ac3bc890 JR |
54 | %define _noautocompressdoc *.haddock |
55 | ||
56 | %description | |
57 | Orphan instances for TH datatypes. In particular, instances for Ord | |
58 | and Lift, as well as a few missing Show / Eq. These instances used to | |
59 | live in haskell-src-meta, and that's where the version number started. | |
60 | ||
4df2c3a8 JB |
61 | %description -l pl.UTF-8 |
62 | Osierocone instancje typów danych TH - w szczególności instancje Ord i | |
63 | Lift, a także kilka brakujących Show / Eq. Instancje te były wcześniej | |
64 | w haskell-src-meta, i w tym pakiecie zaczęła się numeracja wersji. | |
65 | ||
ac3bc890 JR |
66 | %package prof |
67 | Summary: Profiling %{pkgname} library for GHC | |
68 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
69 | Group: Development/Libraries | |
70 | Requires: %{name} = %{version}-%{release} | |
9e50c71e JR |
71 | Requires: ghc-base-prof >= 4.3 |
72 | Requires: ghc-base-prof < 5 | |
73 | Requires: ghc-generic-deriving-prof >= 1.9 | |
74 | Requires: ghc-template-haskell-prof | |
75 | Requires: ghc-th-lift-instances-prof | |
76 | Requires: ghc-th-lift-prof >= 0.7.1 | |
77 | Requires: ghc-th-reify-many-prof >= 0.1 | |
78 | Requires: ghc-th-reify-many-prof < 0.2 | |
ac3bc890 JR |
79 | |
80 | %description prof | |
81 | Profiling %{pkgname} library for GHC. Should be installed when | |
82 | GHC's profiling subsystem is needed. | |
83 | ||
84 | %description prof -l pl.UTF-8 | |
85 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
86 | kiedy potrzebujemy systemu profilującego z GHC. | |
87 | ||
88 | %prep | |
89 | %setup -q -n %{pkgname}-%{version} | |
ac3bc890 JR |
90 | |
91 | %build | |
4df2c3a8 JB |
92 | runhaskell Setup.hs configure -v2 \ |
93 | %{?with_prof:--enable-library-profiling} \ | |
ac3bc890 JR |
94 | --prefix=%{_prefix} \ |
95 | --libdir=%{_libdir} \ | |
96 | --libexecdir=%{_libexecdir} \ | |
97 | --docdir=%{_docdir}/%{name}-%{version} | |
98 | ||
99 | runhaskell Setup.hs build | |
100 | runhaskell Setup.hs haddock --executables | |
101 | ||
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
105 | ||
106 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
107 | ||
108 | # work around automatic haddock docs installation | |
109 | %{__rm} -rf %{name}-%{version}-doc | |
110 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
111 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
112 | ||
113 | runhaskell Setup.hs register \ | |
4df2c3a8 | 114 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
ac3bc890 JR |
115 | |
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %post | |
120 | %ghc_pkg_recache | |
121 | ||
122 | %postun | |
123 | %ghc_pkg_recache | |
124 | ||
125 | %files | |
126 | %defattr(644,root,root,755) | |
127 | %doc %{name}-%{version}-doc/* | |
128 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
129 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
4df2c3a8 JB |
130 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSth-orphans-%{version}.o |
131 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-orphans-%{version}.a | |
ac3bc890 JR |
132 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language |
133 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell | |
134 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH | |
135 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.hi | |
136 | ||
137 | %files prof | |
138 | %defattr(644,root,root,755) | |
4df2c3a8 | 139 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-orphans-%{version}_p.a |
ac3bc890 | 140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.p_hi |