3 %bcond_without prof # profiling library
5 %define pkgname hxt-unicode
6 Summary: Unicode en-/decoding functions for utf8, iso-latin-* and other encodings
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/hxt-unicode
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: e4f61cef60736dca5778641e791f66c8
15 URL: http://hackage.haskell.org/package/hxt-unicode
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-hxt-charproperties
19 BuildRequires: ghc-prof
20 BuildRequires: ghc-hxt-charproperties-prof
22 BuildRequires: rpmbuild(macros) >= 1.608
24 Requires(post,postun): /usr/bin/ghc-pkg
25 Requires: ghc-hxt-charproperties
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 # debuginfo is not useful for ghc
29 %define _enable_debug_packages 0
31 # don't compress haddock files
32 %define _noautocompressdoc *.haddock
35 Unicode encoding and decoding functions for utf8, iso-latin-* and
36 somes other encodings, used in the Haskell XML Toolbox.
37 ISO Latin 1 - 16, utf8, utf16, ASCII are supported. Decoding is done
38 with lazy functions, errors may be detected or ignored.
41 Summary: Profiling %{pkgname} library for GHC
42 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
43 Group: Development/Libraries
44 Requires: %{name} = %{version}-%{release}
45 Requires: ghc-hxt-charproperties-prof
48 Profiling %{pkgname} library for GHC. Should be installed when
49 GHC's profiling subsystem is needed.
51 %description prof -l pl.UTF-8
52 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
53 kiedy potrzebujemy systemu profilującego z GHC.
56 %setup -q -n %{pkgname}-%{version}
59 runhaskell Setup.hs configure -v2 \
60 %{?with_prof:--enable-library-profiling} \
63 --libexecdir=%{_libexecdir} \
64 --docdir=%{_docdir}/%{name}-%{version}
66 runhaskell Setup.hs build
67 runhaskell Setup.hs haddock --executables
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
73 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
75 # work around automatic haddock docs installation
76 %{__rm} -rf %{name}-%{version}-doc
77 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
78 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
80 runhaskell Setup.hs register \
81 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
84 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
94 %doc %{name}-%{version}-doc/*
95 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
96 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
98 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
99 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/*.hi
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/*.dyn_hi
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/String
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/String/*.hi
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/String/*.dyn_hi
111 %defattr(644,root,root,755)
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Char/*.p_hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/String/*.p_hi