3 %bcond_without prof # profiling library
5 %define pkgname hxt-charproperties
6 Summary: Character properties and classes for XML and Unicode
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/hxt-charproperties
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 63b8718c14bdb9eb8ea0717e484eef0b
15 URL: http://hackage.haskell.org/package/hxt-charproperties
16 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-prof
20 BuildRequires: rpmbuild(macros) >= 1.608
22 Requires(post,postun): /usr/bin/ghc-pkg
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # debuginfo is not useful for ghc
26 %define _enable_debug_packages 0
28 # don't compress haddock files
29 %define _noautocompressdoc *.haddock
32 Character properties defined by XML and Unicode standards. These
33 modules contain predicates for Unicode blocks and char proprties and
34 character predicates defined by XML. Supported Unicode version is
38 Summary: Profiling %{pkgname} library for GHC
39 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
44 Profiling %{pkgname} library for GHC. Should be installed when
45 GHC's profiling subsystem is needed.
47 %description prof -l pl.UTF-8
48 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
49 kiedy potrzebujemy systemu profilującego z GHC.
52 %setup -q -n %{pkgname}-%{version}
55 runhaskell Setup.hs configure -v2 \
56 %{?with_prof:--enable-library-profiling} \
59 --libexecdir=%{_libexecdir} \
60 --docdir=%{_docdir}/%{name}-%{version}
62 runhaskell Setup.hs build
63 runhaskell Setup.hs haddock --executables
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
69 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
71 # work around automatic haddock docs installation
72 %{__rm} -rf %{name}-%{version}-doc
73 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
74 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
76 runhaskell Setup.hs register \
77 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
80 rm -rf $RPM_BUILD_ROOT
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}
93 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
94 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
95 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
97 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
98 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/Properties
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/Properties/*.hi
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/Properties/*.dyn_hi
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Set
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Set/*.hi
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Set/*.dyn_hi
108 %defattr(644,root,root,755)
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/Properties/*.p_hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Set/*.p_hi