]>
Commit | Line | Data |
---|---|---|
6b97c135 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
12441fb6 JR |
5 | %define pkgname regex-pcre |
6 | Summary: Replaces/Enhances Text.Regex | |
6b97c135 | 7 | Summary(pl.UTF-8): Rozszerzenie Text.Regex |
12441fb6 JR |
8 | Name: ghc-%{pkgname} |
9 | Version: 0.94.4 | |
b23927af | 10 | Release: 2 |
12441fb6 JR |
11 | License: BSD |
12 | Group: Development/Languages | |
6b97c135 JB |
13 | #Source0Download: http://hackage.haskell.org/package/regex-pcre |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
12441fb6 | 15 | # Source0-md5: be3794c67959f2b3b840bd026ef0b9ea |
6b97c135 | 16 | URL: http://hackage.haskell.org/package/regex-pcre |
12441fb6 | 17 | BuildRequires: ghc >= 6.12.3 |
6b97c135 JB |
18 | BuildRequires: ghc-array |
19 | BuildRequires: ghc-base >= 3.0 | |
20 | BuildRequires: ghc-bytestring | |
21 | BuildRequires: ghc-containers | |
22 | BuildRequires: ghc-regex-base >= 0.93 | |
23 | %if %{with prof} | |
24 | BuildRequires: ghc-prof >= 6.12.3 | |
25 | BuildRequires: ghc-array-prof | |
26 | BuildRequires: ghc-base-prof >= 3.0 | |
27 | BuildRequires: ghc-bytestring-prof | |
28 | BuildRequires: ghc-containers-prof | |
29 | BuildRequires: ghc-regex-base-prof >= 0.93 | |
30 | %endif | |
12441fb6 | 31 | BuildRequires: rpmbuild(macros) >= 1.608 |
12441fb6 | 32 | Requires(post,postun): /usr/bin/ghc-pkg |
4cbeff40 | 33 | %requires_eq ghc |
6b97c135 JB |
34 | Requires: ghc-array |
35 | Requires: ghc-base >= 3.0 | |
36 | Requires: ghc-bytestring | |
37 | Requires: ghc-containers | |
38 | Requires: ghc-regex-base >= 0.93 | |
12441fb6 JR |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | # debuginfo is not useful for ghc | |
42 | %define _enable_debug_packages 0 | |
43 | ||
6b97c135 | 44 | # don't compress haddock files |
12441fb6 JR |
45 | %define _noautocompressdoc *.haddock |
46 | ||
47 | %description | |
6b97c135 JB |
48 | The PCRE backend to accompany regex-base, see <http://www.pcre.org/>. |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Backend PCRE towarzyszący regex-base wykorzystujący bibliotekę PCRE | |
52 | (<http://www.pcre.org/>). | |
12441fb6 JR |
53 | |
54 | %package prof | |
55 | Summary: Profiling %{pkgname} library for GHC | |
56 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC. | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
6b97c135 JB |
59 | Requires: ghc-array-prof |
60 | Requires: ghc-base-prof >= 3.0 | |
61 | Requires: ghc-bytestring-prof | |
62 | Requires: ghc-containers-prof | |
63 | Requires: ghc-regex-base-prof >= 0.93 | |
12441fb6 JR |
64 | |
65 | %description prof | |
6b97c135 | 66 | Profiling %{pkgname} library for GHC. Should be installed when |
12441fb6 JR |
67 | GHC's profiling subsystem is needed. |
68 | ||
69 | %description prof -l pl.UTF-8 | |
70 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
71 | kiedy potrzebujemy systemu profilującego z GHC. | |
72 | ||
73 | %prep | |
74 | %setup -q -n %{pkgname}-%{version} | |
75 | ||
76 | %build | |
6b97c135 JB |
77 | runhaskell Setup.hs configure -v2 \ |
78 | %{?with_prof:--enable-library-profiling} \ | |
12441fb6 JR |
79 | --prefix=%{_prefix} \ |
80 | --libdir=%{_libdir} \ | |
81 | --libexecdir=%{_libexecdir} \ | |
82 | --docdir=%{_docdir}/%{name}-%{version} | |
83 | ||
84 | runhaskell Setup.hs build | |
85 | runhaskell Setup.hs haddock --executables | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
90 | ||
91 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
92 | ||
93 | # work around automatic haddock docs installation | |
94 | %{__rm} -rf %{name}-%{version}-doc | |
95 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
96 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
97 | ||
98 | runhaskell Setup.hs register \ | |
6b97c135 | 99 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
12441fb6 JR |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
105 | %ghc_pkg_recache | |
106 | ||
107 | %postun | |
108 | %ghc_pkg_recache | |
109 | ||
110 | %files | |
111 | %defattr(644,root,root,755) | |
112 | %doc %{name}-%{version}-doc/* | |
113 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
114 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
6b97c135 JB |
115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSregex-pcre-%{version}.o |
116 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}.a | |
12441fb6 JR |
117 | |
118 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text | |
119 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex | |
12441fb6 | 120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi |
6b97c135 | 121 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE |
12441fb6 | 122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.hi |
6b97c135 | 123 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString |
12441fb6 JR |
124 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.hi |
125 | ||
6b97c135 | 126 | %if %{with prof} |
12441fb6 JR |
127 | %files prof |
128 | %defattr(644,root,root,755) | |
6b97c135 | 129 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}_p.a |
12441fb6 JR |
130 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.p_hi |
131 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.p_hi | |
132 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.p_hi | |
6b97c135 | 133 | %endif |