]> git.pld-linux.org Git - SPECS.git/blob - ghc-pcre-light.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ghc-pcre-light.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
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
8 Name:           ghc-%{pkgname}
9 Version:        0.4.1.0
10 Release:        1
11 License:        BSD
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
21 %if %{with prof}
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
26 %endif
27 BuildRequires:  pcre-devel
28 BuildRequires:  rpmbuild(macros) >= 1.608
29 Requires(post,postun):  /usr/bin/ghc-pkg
30 %requires_eq    ghc
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)
35
36 # debuginfo is not useful for ghc
37 %define         _enable_debug_packages  0
38
39 # don't compress haddock files
40 %define         _noautocompressdoc      *.haddock
41
42 %description
43 A small, efficient and portable regex library for Perl 5 compatible
44 regular expressions.
45
46 %description -l pl.UTF-8
47 Mała, wydajna i przenośna biblioteka wyrażeń regularnych zgodnych z
48 Perlem 5.
49
50 %package prof
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
58
59 %description prof
60 Profiling %{pkgname} library for GHC. Should be installed when GHC's
61 profiling subsystem is needed.
62
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.
66
67 %package doc
68 Summary:        HTML documentation for ghc %{pkgname} package
69 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
70 Group:          Documentation
71
72 %description doc
73 HTML documentation for ghc %{pkgname} package.
74
75 %description doc -l pl.UTF-8
76 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
77
78 %prep
79 %setup -q -n %{pkgname}-%{version}
80
81 %build
82 runhaskell Setup.lhs configure -v2 \
83         %{?with_prof:--enable-library-profiling} \
84         --prefix=%{_prefix} \
85         --libdir=%{_libdir} \
86         --libexecdir=%{_libexecdir} \
87         --docdir=%{_docdir}/%{name}-%{version}
88
89 runhaskell Setup.lhs build
90 runhaskell Setup.lhs haddock --executables
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
95
96 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
97
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}
102
103 runhaskell Setup.lhs register \
104         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %post
110 %ghc_pkg_recache
111
112 %postun
113 %ghc_pkg_recache
114
115 %files
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
131
132 %if %{with prof}
133 %files prof
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
138 %endif
139
140 %files doc
141 %defattr(644,root,root,755)
142 %doc %{name}-%{version}-doc/*
This page took 0.649481 seconds and 3 git commands to generate.