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