3 %bcond_without prof # profiling library
5 %define pkgname regex-pcre
6 Summary: Replaces/Enhances Text.Regex
7 Summary(pl.UTF-8): Rozszerzenie Text.Regex
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/regex-pcre
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: be3794c67959f2b3b840bd026ef0b9ea
16 URL: http://hackage.haskell.org/package/regex-pcre
17 BuildRequires: ghc >= 6.12.3
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
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
31 BuildRequires: rpmbuild(macros) >= 1.608
32 Requires(post,postun): /usr/bin/ghc-pkg
35 Requires: ghc-base >= 3.0
36 Requires: ghc-bytestring
37 Requires: ghc-containers
38 Requires: ghc-regex-base >= 0.93
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 # debuginfo is not useful for ghc
42 %define _enable_debug_packages 0
44 # don't compress haddock files
45 %define _noautocompressdoc *.haddock
48 The PCRE backend to accompany regex-base, see <http://www.pcre.org/>.
50 %description -l pl.UTF-8
51 Backend PCRE towarzyszący regex-base wykorzystujący bibliotekę PCRE
52 (<http://www.pcre.org/>).
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}
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
66 Profiling %{pkgname} library for GHC. Should be installed when
67 GHC's profiling subsystem is needed.
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.
74 %setup -q -n %{pkgname}-%{version}
77 runhaskell Setup.hs configure -v2 \
78 %{?with_prof:--enable-library-profiling} \
81 --libexecdir=%{_libexecdir} \
82 --docdir=%{_docdir}/%{name}-%{version}
84 runhaskell Setup.hs build
85 runhaskell Setup.hs haddock --executables
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
91 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
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}
98 runhaskell Setup.hs register \
99 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
102 rm -rf $RPM_BUILD_ROOT
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}
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSregex-pcre-%{version}.o
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}.a
118 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
119 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi
121 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.hi
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.hi
128 %defattr(644,root,root,755)
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}_p.a
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