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