]> git.pld-linux.org Git - packages/ghc-pcre-light.git/blame - ghc-pcre-light.spec
- release 5
[packages/ghc-pcre-light.git] / ghc-pcre-light.spec
CommitLineData
fb89bcdb
JB
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
83c9e572
ER
5%define pkgname pcre-light
6Summary: A library for Perl 5 compatible regular expressions
fb89bcdb 7Summary(pl.UTF-8): Biblioteka wyrażeń regularnych zgodnych z Perlem 5
83c9e572
ER
8Name: ghc-%{pkgname}
9Version: 0.4
4f16d537 10Release: 5
83c9e572
ER
11License: BSD
12Group: Development/Languages
fb89bcdb
JB
13#Source0Download: http://hackage.haskell.org/package/pcre-light
14Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
83c9e572 15# Source0-md5: 4907d8d239d3c41f06855faee340d052
fb89bcdb 16URL: http://hackage.haskell.org/package/pcre-light
83c9e572 17BuildRequires: ghc >= 6.12.3
fb89bcdb
JB
18BuildRequires: ghc-base >= 3
19BuildRequires: ghc-base <= 5
20BuildRequires: ghc-bytestring >= 0.9
21%if %{with prof}
22BuildRequires: ghc-prof >= 6.12.3
23BuildRequires: ghc-base-prof >= 3
24BuildRequires: ghc-base-prof <= 5
25BuildRequires: ghc-bytestring-prof >= 0.9
26%endif
83c9e572
ER
27BuildRequires: pcre-devel
28BuildRequires: rpmbuild(macros) >= 1.608
4f16d537 29Requires(post,postun): /usr/bin/ghc-pkg
ac0421d1 30%requires_eq ghc
fb89bcdb
JB
31Requires: ghc-base >= 3
32Requires: ghc-base <= 5
33Requires: ghc-bytestring >= 0.9
83c9e572
ER
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36# debuginfo is not useful for ghc
37%define _enable_debug_packages 0
38
fb89bcdb
JB
39# don't compress haddock files
40%define _noautocompressdoc *.haddock
41
83c9e572
ER
42%description
43A small, efficient and portable regex library for Perl 5 compatible
fb89bcdb
JB
44regular expressions.
45
46%description -l pl.UTF-8
47Mała, wydajna i przenośna biblioteka wyrażeń regularnych zgodnych z
48Perlem 5.
49
50%package prof
51Summary: Profiling %{pkgname} library for GHC
52Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
53Group: Development/Libraries
54Requires: %{name} = %{version}-%{release}
55Requires: ghc-base-prof >= 3
56Requires: ghc-base-prof <= 5
57Requires: ghc-bytestring-prof >= 0.9
58
59%description prof
4f16d537
JB
60Profiling %{pkgname} library for GHC. Should be installed when GHC's
61profiling subsystem is needed.
fb89bcdb
JB
62
63%description prof -l pl.UTF-8
64Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
65kiedy potrzebujemy systemu profilującego z GHC.
83c9e572
ER
66
67%package doc
fb89bcdb
JB
68Summary: HTML documentation for ghc %{pkgname} package
69Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
83c9e572
ER
70Group: Documentation
71
72%description doc
fb89bcdb 73HTML documentation for ghc %{pkgname} package.
83c9e572
ER
74
75%description doc -l pl.UTF-8
fb89bcdb 76Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
83c9e572
ER
77
78%prep
79%setup -q -n %{pkgname}-%{version}
80
81%build
82runhaskell Setup.lhs configure -v2 \
fb89bcdb 83 %{?with_prof:--enable-library-profiling} \
83c9e572
ER
84 --prefix=%{_prefix} \
85 --libdir=%{_libdir} \
86 --libexecdir=%{_libexecdir} \
87 --docdir=%{_docdir}/%{name}-%{version}
88
89runhaskell Setup.lhs build
90runhaskell Setup.lhs haddock --executables
91
92%install
93rm -rf $RPM_BUILD_ROOT
94install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
95
96runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
97
98# work around automatic haddock docs installation
82247dfd 99%{__rm} -rf %{name}-%{version}-doc
83c9e572 100cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
cf7e5c58 101%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
83c9e572
ER
102
103runhaskell Setup.lhs register \
fb89bcdb 104 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
83c9e572
ER
105
106%clean
107rm -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 TODO
118%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
fb89bcdb
JB
119%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
120%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSpcre-light-%{version}.o
121%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}.a
122%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
123%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
124%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
125%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.hi
126%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light
127%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.hi
128
129%if %{with prof}
130%files prof
131%defattr(644,root,root,755)
132%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}_p.a
133%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.p_hi
134%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.p_hi
135%endif
83c9e572
ER
136
137%files doc
138%defattr(644,root,root,755)
139%doc %{name}-%{version}-doc/*
This page took 0.075726 seconds and 4 git commands to generate.