]> git.pld-linux.org Git - packages/ghc-regex-pcre.git/blame - ghc-regex-pcre.spec
- sane deps
[packages/ghc-regex-pcre.git] / ghc-regex-pcre.spec
CommitLineData
6b97c135
JB
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
12441fb6
JR
5%define pkgname regex-pcre
6Summary: Replaces/Enhances Text.Regex
6b97c135 7Summary(pl.UTF-8): Rozszerzenie Text.Regex
12441fb6
JR
8Name: ghc-%{pkgname}
9Version: 0.94.4
b23927af 10Release: 2
12441fb6
JR
11License: BSD
12Group: Development/Languages
6b97c135
JB
13#Source0Download: http://hackage.haskell.org/package/regex-pcre
14Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
12441fb6 15# Source0-md5: be3794c67959f2b3b840bd026ef0b9ea
6b97c135 16URL: http://hackage.haskell.org/package/regex-pcre
12441fb6 17BuildRequires: ghc >= 6.12.3
6b97c135
JB
18BuildRequires: ghc-array
19BuildRequires: ghc-base >= 3.0
20BuildRequires: ghc-bytestring
21BuildRequires: ghc-containers
22BuildRequires: ghc-regex-base >= 0.93
23%if %{with prof}
24BuildRequires: ghc-prof >= 6.12.3
25BuildRequires: ghc-array-prof
26BuildRequires: ghc-base-prof >= 3.0
27BuildRequires: ghc-bytestring-prof
28BuildRequires: ghc-containers-prof
29BuildRequires: ghc-regex-base-prof >= 0.93
30%endif
12441fb6 31BuildRequires: rpmbuild(macros) >= 1.608
12441fb6 32Requires(post,postun): /usr/bin/ghc-pkg
4cbeff40 33%requires_eq ghc
6b97c135
JB
34Requires: ghc-array
35Requires: ghc-base >= 3.0
36Requires: ghc-bytestring
37Requires: ghc-containers
38Requires: ghc-regex-base >= 0.93
12441fb6
JR
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41# debuginfo is not useful for ghc
42%define _enable_debug_packages 0
43
6b97c135 44# don't compress haddock files
12441fb6
JR
45%define _noautocompressdoc *.haddock
46
47%description
6b97c135
JB
48The PCRE backend to accompany regex-base, see <http://www.pcre.org/>.
49
50%description -l pl.UTF-8
51Backend PCRE towarzyszący regex-base wykorzystujący bibliotekę PCRE
52(<http://www.pcre.org/>).
12441fb6
JR
53
54%package prof
55Summary: Profiling %{pkgname} library for GHC
56Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
57Group: Development/Libraries
58Requires: %{name} = %{version}-%{release}
6b97c135
JB
59Requires: ghc-array-prof
60Requires: ghc-base-prof >= 3.0
61Requires: ghc-bytestring-prof
62Requires: ghc-containers-prof
63Requires: ghc-regex-base-prof >= 0.93
12441fb6
JR
64
65%description prof
6b97c135 66Profiling %{pkgname} library for GHC. Should be installed when
12441fb6
JR
67GHC's profiling subsystem is needed.
68
69%description prof -l pl.UTF-8
70Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
71kiedy potrzebujemy systemu profilującego z GHC.
72
73%prep
74%setup -q -n %{pkgname}-%{version}
75
76%build
6b97c135
JB
77runhaskell Setup.hs configure -v2 \
78 %{?with_prof:--enable-library-profiling} \
12441fb6
JR
79 --prefix=%{_prefix} \
80 --libdir=%{_libdir} \
81 --libexecdir=%{_libexecdir} \
82 --docdir=%{_docdir}/%{name}-%{version}
83
84runhaskell Setup.hs build
85runhaskell Setup.hs haddock --executables
86
87%install
88rm -rf $RPM_BUILD_ROOT
89install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
90
91runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
92
93# work around automatic haddock docs installation
94%{__rm} -rf %{name}-%{version}-doc
95cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
96%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
97
98runhaskell Setup.hs register \
6b97c135 99 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
12441fb6
JR
100
101%clean
102rm -rf $RPM_BUILD_ROOT
103
104%post
105%ghc_pkg_recache
106
107%postun
108%ghc_pkg_recache
109
110%files
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}
6b97c135
JB
115%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSregex-pcre-%{version}.o
116%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}.a
12441fb6
JR
117
118%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
119%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
12441fb6 120%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/*.hi
6b97c135 121%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
12441fb6 122%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/*.hi
6b97c135 123%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString
12441fb6
JR
124%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/ByteString/*.hi
125
6b97c135 126%if %{with prof}
12441fb6
JR
127%files prof
128%defattr(644,root,root,755)
6b97c135 129%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSregex-pcre-%{version}_p.a
12441fb6
JR
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
6b97c135 133%endif
This page took 0.078149 seconds and 4 git commands to generate.