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