]>
Commit | Line | Data |
---|---|---|
728cee8d JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
f9da1d6f JR |
5 | %define pkgname haskell-src-meta |
6 | Summary: Parse source to template-haskell abstract syntax | |
728cee8d | 7 | Summary(pl.UTF-8): Przetwarzanie źródeł do abstrakcyjnej składni biblioteki template-haskell |
f9da1d6f | 8 | Name: ghc-%{pkgname} |
728cee8d JB |
9 | Version: 0.6.0.5 |
10 | Release: 1 | |
f9da1d6f JR |
11 | License: BSD |
12 | Group: Development/Languages | |
728cee8d JB |
13 | #Source0Download: http://hackage.haskell.org/package/haskell-src-meta |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
15 | # Source0-md5: e59e0fedf6985494e82220477c54795c | |
16 | URL: http://hackage.haskell.org/package/haskell-src-meta | |
f9da1d6f | 17 | BuildRequires: ghc >= 6.12.3 |
728cee8d JB |
18 | BuildRequires: ghc-base >= 4.2 |
19 | BuildRequires: ghc-base < 4.8 | |
20 | BuildRequires: ghc-haskell-src-exts >= 1.14 | |
21 | BuildRequires: ghc-haskell-src-exts < 1.15 | |
22 | BuildRequires: ghc-pretty >= 1.0 | |
23 | BuildRequires: ghc-pretty < 1.2 | |
24 | BuildRequires: ghc-syb >= 0.1 | |
25 | BuildRequires: ghc-syb < 0.5 | |
26 | BuildRequires: ghc-template-haskell >= 2.4 | |
27 | BuildRequires: ghc-template-haskell < 2.10 | |
28 | BuildRequires: ghc-th-orphans >= 0.5 | |
29 | BuildRequires: ghc-th-orphans < 0.9 | |
30 | BuildRequires: ghc-uniplate >= 1.3 | |
31 | BuildRequires: ghc-uniplate < 1.7 | |
32 | %if %{with prof} | |
33 | BuildRequires: ghc-prof >= 6.12.3 | |
34 | BuildRequires: ghc-base-prof >= 4.2 | |
35 | BuildRequires: ghc-base-prof < 4.8 | |
36 | BuildRequires: ghc-haskell-src-exts-prof >= 1.14 | |
37 | BuildRequires: ghc-haskell-src-exts-prof < 1.15 | |
38 | BuildRequires: ghc-pretty-prof >= 1.0 | |
39 | BuildRequires: ghc-pretty-prof < 1.2 | |
40 | BuildRequires: ghc-syb-prof >= 0.1 | |
41 | BuildRequires: ghc-syb-prof < 0.5 | |
42 | BuildRequires: ghc-template-haskell-prof >= 2.4 | |
43 | BuildRequires: ghc-template-haskell-prof < 2.10 | |
44 | BuildRequires: ghc-th-orphans-prof >= 0.5 | |
45 | BuildRequires: ghc-th-orphans-prof < 0.9 | |
46 | BuildRequires: ghc-uniplate-prof >= 1.3 | |
47 | BuildRequires: ghc-uniplate-prof < 1.7 | |
48 | %endif | |
f9da1d6f | 49 | BuildRequires: rpmbuild(macros) >= 1.608 |
728cee8d | 50 | Requires(post,postun): /usr/bin/ghc-pkg |
f9da1d6f | 51 | %requires_releq ghc |
728cee8d JB |
52 | Requires: ghc >= 6.12.3 |
53 | Requires: ghc-base >= 4.2 | |
54 | Requires: ghc-base < 4.8 | |
55 | Requires: ghc-haskell-src-exts >= 1.14 | |
56 | Requires: ghc-haskell-src-exts < 1.15 | |
57 | Requires: ghc-pretty >= 1.0 | |
58 | Requires: ghc-pretty < 1.2 | |
59 | Requires: ghc-syb >= 0.1 | |
60 | Requires: ghc-syb < 0.5 | |
61 | Requires: ghc-template-haskell >= 2.4 | |
62 | Requires: ghc-template-haskell < 2.10 | |
63 | Requires: ghc-th-orphans >= 0.5 | |
64 | Requires: ghc-th-orphans < 0.9 | |
65 | Requires: ghc-uniplate >= 1.3 | |
66 | Requires: ghc-uniplate < 1.7 | |
f9da1d6f JR |
67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
68 | ||
69 | # debuginfo is not useful for ghc | |
70 | %define _enable_debug_packages 0 | |
71 | ||
728cee8d | 72 | # don't compress haddock files |
f9da1d6f JR |
73 | %define _noautocompressdoc *.haddock |
74 | ||
75 | %description | |
76 | Parse source to template-haskell abstract syntax. | |
77 | ||
728cee8d JB |
78 | %description -l pl.UTF-8 |
79 | Przetwarzanie źródeł do abstrakcyjnej składni biblioteki | |
80 | template-haskell. | |
81 | ||
f9da1d6f JR |
82 | %package prof |
83 | Summary: Profiling %{pkgname} library for GHC | |
84 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
85 | Group: Development/Libraries | |
86 | Requires: %{name} = %{version}-%{release} | |
728cee8d JB |
87 | Requires: ghc-base-prof >= 4.2 |
88 | Requires: ghc-base-prof < 4.8 | |
89 | Requires: ghc-haskell-src-exts-prof >= 1.14 | |
90 | Requires: ghc-haskell-src-exts-prof < 1.15 | |
91 | Requires: ghc-pretty-prof >= 1.0 | |
92 | Requires: ghc-pretty-prof < 1.2 | |
93 | Requires: ghc-syb-prof >= 0.1 | |
94 | Requires: ghc-syb-prof < 0.5 | |
95 | Requires: ghc-template-haskell-prof >= 2.4 | |
96 | Requires: ghc-template-haskell-prof < 2.10 | |
97 | Requires: ghc-th-orphans-prof >= 0.5 | |
98 | Requires: ghc-th-orphans-prof < 0.9 | |
99 | Requires: ghc-uniplate-prof >= 1.3 | |
100 | Requires: ghc-uniplate-prof < 1.7 | |
f9da1d6f JR |
101 | |
102 | %description prof | |
728cee8d JB |
103 | Profiling %{pkgname} library for GHC. Should be installed when GHC's |
104 | profiling subsystem is needed. | |
f9da1d6f JR |
105 | |
106 | %description prof -l pl.UTF-8 | |
107 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
108 | kiedy potrzebujemy systemu profilującego z GHC. | |
109 | ||
110 | %prep | |
111 | %setup -q -n %{pkgname}-%{version} | |
112 | ||
113 | %build | |
728cee8d JB |
114 | runhaskell Setup.lhs configure -v2 \ |
115 | %{?with_prof:--enable-library-profiling} \ | |
f9da1d6f JR |
116 | --prefix=%{_prefix} \ |
117 | --libdir=%{_libdir} \ | |
118 | --libexecdir=%{_libexecdir} \ | |
119 | --docdir=%{_docdir}/%{name}-%{version} | |
120 | ||
121 | runhaskell Setup.lhs build | |
122 | runhaskell Setup.lhs haddock --executables | |
123 | ||
124 | %install | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
127 | ||
128 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
129 | ||
130 | # work around automatic haddock docs installation | |
abf6b1b2 | 131 | %{__rm} -rf %{name}-%{version}-doc |
f9da1d6f | 132 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc |
702194b5 | 133 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
f9da1d6f JR |
134 | |
135 | runhaskell Setup.lhs register \ | |
728cee8d | 136 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
f9da1d6f JR |
137 | |
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post | |
142 | %ghc_pkg_recache | |
143 | ||
144 | %postun | |
145 | %ghc_pkg_recache | |
146 | ||
147 | %files | |
148 | %defattr(644,root,root,755) | |
728cee8d | 149 | %doc README examples %{name}-%{version}-doc/* |
f9da1d6f JR |
150 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
151 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
728cee8d JB |
152 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HShaskell-src-meta-%{version}.o |
153 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShaskell-src-meta-%{version}.a | |
f9da1d6f | 154 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language |
728cee8d | 155 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.hi |
f9da1d6f JR |
156 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell |
157 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta | |
728cee8d | 158 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/*.hi |
79b7ce6d | 159 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Parse |
728cee8d | 160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Parse/*.hi |
f9da1d6f | 161 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Syntax |
728cee8d | 162 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Syntax/*.hi |
f9da1d6f JR |
163 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH |
164 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Instances | |
f9da1d6f JR |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Instances/*.hi |
166 | ||
728cee8d | 167 | %if %{with prof} |
f9da1d6f JR |
168 | %files prof |
169 | %defattr(644,root,root,755) | |
728cee8d | 170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShaskell-src-meta-%{version}_p.a |
f9da1d6f JR |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.p_hi |
172 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/*.p_hi | |
79b7ce6d | 173 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Parse/*.p_hi |
f9da1d6f JR |
174 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Meta/Syntax/*.p_hi |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Instances/*.p_hi | |
728cee8d | 176 | %endif |