1 %define pkgname regex-pcre
2 Summary: Replaces/Enhances Text.Regex
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: be3794c67959f2b3b840bd026ef0b9ea
10 URL: http://hackage.haskell.org/package/regex-pcre/
11 BuildRequires: ghc >= 6.12.3
12 BuildRequires: ghc-prof
13 BuildRequires: rpmbuild(macros) >= 1.608
15 Requires(post,postun): /usr/bin/ghc-pkg
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 # debuginfo is not useful for ghc
19 %define _enable_debug_packages 0
21 # don't compress haddoc files
22 %define _noautocompressdoc *.haddock
25 The PCRE backend to accompany regex-base, see www.pcre.org.
28 Summary: Profiling %{pkgname} library for GHC
29 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
30 Group: Development/Libraries
31 Requires: %{name} = %{version}-%{release}
34 Profiling %{pkgname} library for GHC. Should be installed when
35 GHC's profiling subsystem is needed.
37 %description prof -l pl.UTF-8
38 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
39 kiedy potrzebujemy systemu profilującego z GHC.
42 %setup -q -n %{pkgname}-%{version}
45 runhaskell Setup.hs configure -v2 --enable-library-profiling \
48 --libexecdir=%{_libexecdir} \
49 --docdir=%{_docdir}/%{name}-%{version}
51 runhaskell Setup.hs build
52 runhaskell Setup.hs haddock --executables
55 rm -rf $RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
58 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
60 # work around automatic haddock docs installation
61 %{__rm} -rf %{name}-%{version}-doc
62 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
63 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
65 runhaskell Setup.hs register \
66 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
69 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
79 %doc %{name}-%{version}-doc/*
80 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
81 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
82 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
83 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
84 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
86 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
87 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
88 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
89 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.hi
92 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.hi
95 %defattr(644,root,root,755)
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.p_hi
98 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.p_hi
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.p_hi