]> git.pld-linux.org Git - packages/ghc-hxt-unicode.git/blob - ghc-hxt-unicode.spec
a210c24950a4cbb3915979bc1966c95444747612
[packages/ghc-hxt-unicode.git] / ghc-hxt-unicode.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname hxt-unicode
6 Summary:        Unicode en-/decoding functions for utf8, iso-latin-* and other encodings
7 Name:           ghc-%{pkgname}
8 Version:        9.0.2.4
9 Release:        1
10 License:        MIT
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
18 %if %{with prof}
19 BuildRequires:  ghc-prof
20 BuildRequires:  ghc-hxt-charproperties-prof
21 %endif
22 BuildRequires:  rpmbuild(macros) >= 1.608
23 %requires_eq    ghc
24 Requires(post,postun):  /usr/bin/ghc-pkg
25 Requires:       ghc-hxt-charproperties
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 # debuginfo is not useful for ghc
29 %define         _enable_debug_packages  0
30
31 # don't compress haddock files
32 %define         _noautocompressdoc      *.haddock
33
34 %description
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.
39
40 %package prof
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
46
47 %description prof
48 Profiling %{pkgname} library for GHC.  Should be installed when
49 GHC's profiling subsystem is needed.
50
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.
54
55 %prep
56 %setup -q -n %{pkgname}-%{version}
57
58 %build
59 runhaskell Setup.hs configure -v2 \
60         %{?with_prof:--enable-library-profiling} \
61         --prefix=%{_prefix} \
62         --libdir=%{_libdir} \
63         --libexecdir=%{_libexecdir} \
64         --docdir=%{_docdir}/%{name}-%{version}
65
66 runhaskell Setup.hs build
67 runhaskell Setup.hs haddock --executables
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
72
73 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
74
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}
79
80 runhaskell Setup.hs register \
81         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 %ghc_pkg_recache
88
89 %postun
90 %ghc_pkg_recache
91
92 %files
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
100
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
108
109 %if %{with prof}
110 %files prof
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
115 %endif
This page took 0.067897 seconds and 2 git commands to generate.