3 %bcond_without prof # profiling library
5 %define pkgname pcre-light
6 Summary: A library for Perl 5 compatible regular expressions
7 Summary(pl.UTF-8): Biblioteka wyrażeń regularnych zgodnych z Perlem 5
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/pcre-light
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: b2998e2841561c04d93cea443aae6ad1
16 URL: http://hackage.haskell.org/package/pcre-light
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 3
19 BuildRequires: ghc-base <= 5
20 BuildRequires: ghc-bytestring >= 0.9
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 3
24 BuildRequires: ghc-base-prof <= 5
25 BuildRequires: ghc-bytestring-prof >= 0.9
27 BuildRequires: pcre-devel
28 BuildRequires: rpmbuild(macros) >= 1.608
29 Requires(post,postun): /usr/bin/ghc-pkg
31 Requires: ghc-base >= 3
32 Requires: ghc-base <= 5
33 Requires: ghc-bytestring >= 0.9
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 # debuginfo is not useful for ghc
37 %define _enable_debug_packages 0
39 # don't compress haddock files
40 %define _noautocompressdoc *.haddock
43 A small, efficient and portable regex library for Perl 5 compatible
46 %description -l pl.UTF-8
47 Mała, wydajna i przenośna biblioteka wyrażeń regularnych zgodnych z
51 Summary: Profiling %{pkgname} library for GHC
52 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Requires: ghc-base-prof >= 3
56 Requires: ghc-base-prof <= 5
57 Requires: ghc-bytestring-prof >= 0.9
60 Profiling %{pkgname} library for GHC. Should be installed when GHC's
61 profiling subsystem is needed.
63 %description prof -l pl.UTF-8
64 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
65 kiedy potrzebujemy systemu profilującego z GHC.
68 Summary: HTML documentation for ghc %{pkgname} package
69 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
73 HTML documentation for ghc %{pkgname} package.
75 %description doc -l pl.UTF-8
76 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
79 %setup -q -n %{pkgname}-%{version}
82 runhaskell Setup.lhs configure -v2 \
83 %{?with_prof:--enable-library-profiling} \
86 --libexecdir=%{_libexecdir} \
87 --docdir=%{_docdir}/%{name}-%{version}
89 runhaskell Setup.lhs build
90 runhaskell Setup.lhs haddock --executables
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
96 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
98 # work around automatic haddock docs installation
99 %{__rm} -rf %{name}-%{version}-doc
100 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
101 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
103 runhaskell Setup.lhs register \
104 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %doc LICENSE README.md
118 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
119 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}-*.so
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}-*.a
122 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}-*_p.a
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
125 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.hi
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.dyn_hi
128 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.hi
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.dyn_hi
134 %defattr(644,root,root,755)
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}-*_p.a
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.p_hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.p_hi
141 %defattr(644,root,root,755)
142 %doc %{name}-%{version}-doc/*