]> git.pld-linux.org Git - packages/ghc-setlocale.git/blame - ghc-setlocale.spec
rebuild with ghc 8.10.7
[packages/ghc-setlocale.git] / ghc-setlocale.spec
CommitLineData
dd10183b
JR
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname setlocale
6Summary: Haskell bindings to setlocale
7Name: ghc-%{pkgname}
12e5908e 8Version: 1.0.0.9
3ceeba89 9Release: 2
dd10183b
JR
10License: BSD
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/setlocale
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
12e5908e
JR
14# Source0-md5: 4cd39943f5fe5c278fde8bf1157a9383
15Patch0: ghc-8.10.patch
dd10183b
JR
16URL: http://hackage.haskell.org/package/setlocale
17BuildRequires: ghc >= 6.12.3
18%if %{with prof}
19BuildRequires: ghc-prof
20%endif
21BuildRequires: rpmbuild(macros) >= 1.608
f72de0b4 22%requires_eq ghc
dd10183b
JR
23Requires(post,postun): /usr/bin/ghc-pkg
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26# debuginfo is not useful for ghc
27%define _enable_debug_packages 0
28
29# don't compress haddock files
30%define _noautocompressdoc *.haddock
31
32%description
33Haskell bindings to setlocale.
34
35%package prof
36Summary: Profiling %{pkgname} library for GHC
37Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
38Group: Development/Libraries
39Requires: %{name} = %{version}-%{release}
40#Requires: ghc-OTHERMODULE-prof
41
42%description prof
43Profiling %{pkgname} library for GHC. Should be installed when
44GHC's profiling subsystem is needed.
45
46%description prof -l pl.UTF-8
47Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
48kiedy potrzebujemy systemu profilującego z GHC.
49
50%prep
51%setup -q -n %{pkgname}-%{version}
12e5908e 52%patch0 -p1
dd10183b
JR
53
54%build
55runhaskell Setup.hs configure -v2 \
56 %{?with_prof:--enable-library-profiling} \
57 --prefix=%{_prefix} \
58 --libdir=%{_libdir} \
59 --libexecdir=%{_libexecdir} \
60 --docdir=%{_docdir}/%{name}-%{version}
61
62runhaskell Setup.hs build
63runhaskell Setup.hs haddock --executables
64
65%install
66rm -rf $RPM_BUILD_ROOT
67install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
68
69runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
70
71# work around automatic haddock docs installation
72%{__rm} -rf %{name}-%{version}-doc
73cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
74%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
75
76runhaskell Setup.hs register \
77 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
78
79%clean
80rm -rf $RPM_BUILD_ROOT
81
82%post
83%ghc_pkg_recache
84
85%postun
86%ghc_pkg_recache
87
88%files
89%defattr(644,root,root,755)
90%doc %{name}-%{version}-doc/*
91%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
92%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
12e5908e 93%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
dd10183b
JR
94%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
95%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
96
97%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
98%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale
99%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale/*.hi
12e5908e 100%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale/*.dyn_hi
dd10183b
JR
101
102%if %{with prof}
103%files prof
104%defattr(644,root,root,755)
105%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
106%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Locale/*.p_hi
107%endif
This page took 0.071034 seconds and 4 git commands to generate.