3 %bcond_without prof # profiling library
5 %define pkgname regex-posix
6 Summary: Replaces/Enhances Text.Regex
7 Summary(pl.UTF-8): Podmiana/rozszerzenie Text.Regex
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/regex-posix
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 1bd179e9b1804171f8a2797ea399c1b9
16 Patch0: ghc-8.10.patch
17 URL: http://hackage.haskell.org/package/regex-posix
18 BuildRequires: ghc >= 6.12.3
19 BuildRequires: ghc-array
20 BuildRequires: ghc-base >= 3
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
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
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 posix regex backend for regex-base.
51 %description -l pl.UTF-8
52 Backend wyrażeń regularnych zgodnych z POSIX dla regex-base.
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 BuildRequires: ghc-array-prof
60 BuildRequires: ghc-base-prof >= 3
61 BuildRequires: ghc-bytestring-prof
62 BuildRequires: ghc-containers-prof
63 BuildRequires: ghc-regex-base-prof >= 0.93
66 Profiling %{pkgname} library for GHC. Should be installed when GHC's
67 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 Summary: HTML documentation for ghc %{pkgname} package
75 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
79 HTML documentation for ghc %{pkgname} package.
81 %description doc -l pl.UTF-8
82 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
85 %setup -q -n %{pkgname}-%{version}
89 runhaskell Setup.hs configure -v2 \
90 %{?with_prof:--enable-library-profiling} \
93 --libexecdir=%{_libexecdir} \
94 --docdir=%{_docdir}/%{name}-%{version}
96 runhaskell Setup.hs build
97 runhaskell Setup.hs haddock --executables
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
103 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
105 # work around automatic haddock docs installation
106 %{__rm} -rf %{name}-%{version}-doc
107 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
108 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
110 runhaskell Setup.hs register \
111 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
114 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
125 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-posix-%{version}-*.so
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-posix-%{version}-*.a
129 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-posix-%{version}-*_p.a
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
133 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.dyn_hi
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/*.hi
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/*.dyn_hi
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/ByteString
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/ByteString/*.hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/ByteString/*.dyn_hi
145 %defattr(644,root,root,755)
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-posix-%{version}-*_p.a
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.p_hi
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/*.p_hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/Posix/ByteString/*.p_hi
154 %defattr(644,root,root,755)
155 %doc %{name}-%{version}-doc/*