]>
Commit | Line | Data |
---|---|---|
c24e9751 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname memory | |
6 | Summary: Memory and related abstraction stuff | |
7 | Name: ghc-%{pkgname} | |
8 | Version: 0.15.0 | |
c61311c9 | 9 | Release: 3 |
c24e9751 JR |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | #Source0Download: http://hackage.haskell.org/package/memory | |
13 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
14 | # Source0-md5: f763e1781a843e53b75f9944dd546cb5 | |
15 | URL: http://hackage.haskell.org/package/memory | |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-basement >= 0.0.7 | |
a175b606 | 18 | BuildRequires: ghc-deepseq >= 1.1 |
c24e9751 JR |
19 | %if %{with prof} |
20 | BuildRequires: ghc-prof | |
21 | BuildRequires: ghc-basement-prof >= 0.0.7 | |
a175b606 | 22 | BuildRequires: ghc-deepseq-prof >= 1.1 |
c24e9751 JR |
23 | %endif |
24 | BuildRequires: rpmbuild(macros) >= 1.608 | |
25 | %requires_eq ghc | |
26 | Requires(post,postun): /usr/bin/ghc-pkg | |
27 | Requires: ghc-basement >= 0.0.7 | |
a175b606 | 28 | Requires: ghc-deepseq >= 1.1 |
c24e9751 JR |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | # debuginfo is not useful for ghc | |
32 | %define _enable_debug_packages 0 | |
33 | ||
34 | # don't compress haddock files | |
35 | %define _noautocompressdoc *.haddock | |
36 | ||
37 | %description | |
38 | Chunk of memory, polymorphic byte array management and manipulation: | |
39 | ||
40 | - A polymorphic byte array abstraction and function similar to strict | |
41 | ByteString. | |
42 | - Different type of byte array abstraction. | |
43 | - Raw memory IO operations (memory set, memory copy, ..) | |
44 | - Aliasing with endianness support. | |
45 | - Encoding : Base16, Base32, Base64. | |
46 | - Hashing : FNV, SipHash | |
47 | ||
48 | %package prof | |
49 | Summary: Profiling %{pkgname} library for GHC | |
50 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
51 | Group: Development/Libraries | |
52 | Requires: %{name} = %{version}-%{release} | |
53 | Requires: ghc-basement-prof >= 0.0.7 | |
a175b606 | 54 | Requires: ghc-deepseq-prof >= 1.1 |
c24e9751 JR |
55 | |
56 | %description prof | |
57 | Profiling %{pkgname} library for GHC. Should be installed when | |
58 | GHC's profiling subsystem is needed. | |
59 | ||
60 | %description prof -l pl.UTF-8 | |
61 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
62 | kiedy potrzebujemy systemu profilującego z GHC. | |
63 | ||
64 | %prep | |
65 | %setup -q -n %{pkgname}-%{version} | |
66 | ||
67 | %build | |
68 | runhaskell Setup.hs configure -v2 \ | |
69 | %{?with_prof:--enable-library-profiling} \ | |
70 | --prefix=%{_prefix} \ | |
71 | --libdir=%{_libdir} \ | |
72 | --libexecdir=%{_libexecdir} \ | |
73 | --docdir=%{_docdir}/%{name}-%{version} | |
74 | ||
75 | runhaskell Setup.hs build | |
76 | runhaskell Setup.hs haddock --executables | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
81 | ||
82 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
83 | ||
84 | # work around automatic haddock docs installation | |
85 | %{__rm} -rf %{name}-%{version}-doc | |
86 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
87 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
88 | ||
89 | runhaskell Setup.hs register \ | |
90 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post | |
96 | %ghc_pkg_recache | |
97 | ||
98 | %postun | |
99 | %ghc_pkg_recache | |
100 | ||
101 | %files | |
102 | %defattr(644,root,root,755) | |
103 | %doc CHANGELOG.md README.md %{name}-%{version}-doc/* | |
104 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
105 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
106 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so | |
107 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a | |
108 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
109 | ||
110 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data | |
111 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi | |
112 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi | |
113 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray | |
114 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/*.hi | |
115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/*.dyn_hi | |
116 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/Pack | |
117 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/Pack/*.hi | |
118 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/Pack/*.dyn_hi | |
119 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory | |
120 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/*.hi | |
121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/*.dyn_hi | |
122 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Encoding | |
123 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Encoding/*.hi | |
124 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Encoding/*.dyn_hi | |
125 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Hash | |
126 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Hash/*.hi | |
127 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Hash/*.dyn_hi | |
128 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Internal | |
129 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Internal/*.hi | |
130 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Internal/*.dyn_hi | |
131 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/MemMap | |
132 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/MemMap/*.hi | |
133 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/MemMap/*.dyn_hi | |
134 | ||
135 | %if %{with prof} | |
136 | %files prof | |
137 | %defattr(644,root,root,755) | |
138 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
139 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi | |
140 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/*.p_hi | |
141 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/ByteArray/Pack/*.p_hi | |
142 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/*.p_hi | |
143 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Encoding/*.p_hi | |
144 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Hash/*.p_hi | |
145 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/Internal/*.p_hi | |
146 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Memory/MemMap/*.p_hi | |
147 | %endif |