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: a9dcdff506937df7fadb563a030b508b
16 Patch0: ghc-8.10.patch
17 URL: http://hackage.haskell.org/package/regex-pcre
18 BuildRequires: ghc >= 6.12.3
19 BuildRequires: ghc-array
20 BuildRequires: ghc-base >= 3.0
21 BuildRequires: ghc-bytestring
22 BuildRequires: ghc-containers
23 BuildRequires: ghc-regex-base >= 0.93
25 BuildRequires: ghc-prof >= 6.12.3
26 BuildRequires: ghc-array-prof
27 BuildRequires: ghc-base-prof >= 3.0
28 BuildRequires: ghc-bytestring-prof
29 BuildRequires: ghc-containers-prof
30 BuildRequires: ghc-regex-base-prof >= 0.93
32 BuildRequires: rpmbuild(macros) >= 1.608
33 Requires(post,postun): /usr/bin/ghc-pkg
36 Requires: ghc-base >= 3.0
37 Requires: ghc-bytestring
38 Requires: ghc-containers
39 Requires: ghc-regex-base >= 0.93
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 # debuginfo is not useful for ghc
43 %define _enable_debug_packages 0
45 # don't compress haddock files
46 %define _noautocompressdoc *.haddock
49 The PCRE backend to accompany regex-base, see <http://www.pcre.org/>.
51 %description -l pl.UTF-8
52 Backend PCRE towarzyszący regex-base wykorzystujący bibliotekę PCRE
53 (<http://www.pcre.org/>).
56 Summary: Profiling %{pkgname} library for GHC
57 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
58 Group: Development/Libraries
59 Requires: %{name} = %{version}-%{release}
60 Requires: ghc-array-prof
61 Requires: ghc-base-prof >= 3.0
62 Requires: ghc-bytestring-prof
63 Requires: ghc-containers-prof
64 Requires: ghc-regex-base-prof >= 0.93
67 Profiling %{pkgname} library for GHC. Should be installed when
68 GHC's profiling subsystem is needed.
70 %description prof -l pl.UTF-8
71 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
72 kiedy potrzebujemy systemu profilującego z GHC.
75 %setup -q -n %{pkgname}-%{version}
79 runhaskell Setup.hs configure -v2 \
80 %{?with_prof:--enable-library-profiling} \
83 --libexecdir=%{_libexecdir} \
84 --docdir=%{_docdir}/%{name}-%{version}
86 runhaskell Setup.hs build
87 runhaskell Setup.hs haddock --executables
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
93 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
95 # work around automatic haddock docs installation
96 %{__rm} -rf %{name}-%{version}-doc
97 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
98 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
100 runhaskell Setup.hs register \
101 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
104 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc %{name}-%{version}-doc/*
115 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
116 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}-*.so
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}-*.a
119 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}-*_p.a
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.dyn_hi
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.dyn_hi
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.dyn_hi
136 %defattr(644,root,root,755)
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}-*_p.a
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.p_hi
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.p_hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.p_hi