3 %bcond_without prof # profiling library
5 %define pkgname hashable
6 Summary: A class for types that can be converted to a hash value
7 Summary(pl.UTF-8): Klasa dla typów, które można przekształcić do wartości hasza
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/hashable
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 72b9550b7f56dae4cfdd45ff5d1746a6
16 Patch0: ghc-8.10.patch
17 URL: http://hackage.haskell.org/package/hashable
18 BuildRequires: ghc >= 6.12.3
19 BuildRequires: ghc-base >= 4.0
20 BuildRequires: ghc-bytestring >= 0.9
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 4.0
24 BuildRequires: ghc-bytestring-prof >= 0.9
26 BuildRequires: rpmbuild(macros) >= 1.608
27 Requires(post,postun): /usr/bin/ghc-pkg
29 Requires: ghc-base >= 4.0
30 Requires: ghc-bytestring >= 0.9
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 # debuginfo is not useful for ghc
34 %define _enable_debug_packages 0
36 # don't compress haddock files
37 %define _noautocompressdoc *.haddock
40 This package defines a class, Hashable, for types that can be
41 converted to a hash value. This class exists for the benefit of
42 hashing-based data structures. The package provides instances for
43 basic types and a way to combine hash values.
45 %description -l pl.UTF-8
46 Ten pakiet definiuje klasę Hashable, przeznaczoną dla typów, które
47 można przekształcić na wartość hasza. Klasa jest przeznaczona dla
48 struktur danych opartych na haszowaniu. Pakiet dostarcza instancje
49 dla typów podstawowych oraz sposób łączenia wartości haszy.
52 Summary: Profiling %{pkgname} library for GHC
53 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
54 Group: Development/Libraries
55 Requires: %{name} = %{version}-%{release}
56 Requires: ghc-base-prof >= 4.0
57 Requires: ghc-bytestring-prof >= 0.9
60 Profiling %{pkgname} library for GHC. Should be installed when
61 GHC's profiling subsystem is needed.
63 %description prof -l pl.UTF-8
64 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
65 kiedy potrzebujemy systemu profilującego z GHC.
68 Summary: HTML documentation for %{pkgname} ghc package
69 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
73 HTML documentation for %{pkgname} ghc package.
75 %description doc -l pl.UTF-8
76 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
79 %setup -q -n %{pkgname}-%{version}
83 runhaskell Setup.hs configure -v2 \
84 %{?with_prof:--enable-library-profiling} \
87 --libexecdir=%{_libexecdir} \
88 --docdir=%{_docdir}/%{name}-%{version}
90 runhaskell Setup.hs build
91 runhaskell Setup.hs haddock --executables
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
97 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
99 # work around automatic haddock docs installation
100 %{__rm} -rf %{name}-%{version}-doc
101 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
102 %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
104 runhaskell Setup.hs register \
105 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGES.md LICENSE README.md
119 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShashable-%{version}-*.so
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShashable-%{version}-*.a
123 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShashable-%{version}-*_p.a
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable.hi
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable.dyn_hi
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/*.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/*.dyn_hi
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/Generic
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/Generic/*.hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/Generic/*.dyn_hi
136 %defattr(644,root,root,755)
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShashable-%{version}-*_p.a
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable.p_hi
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/*.p_hi
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hashable/Generic/*.p_hi
144 %defattr(644,root,root,755)
145 %doc %{name}-%{version}-doc/*