]> git.pld-linux.org Git - SPECS.git/blob - ghc-hashable.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / ghc-hashable.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
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
8 Name:           ghc-%{pkgname}
9 Version:        1.3.0.0
10 Release:        2
11 License:        BSD
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
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 4.0
24 BuildRequires:  ghc-bytestring-prof >= 0.9
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.608
27 Requires(post,postun):  /usr/bin/ghc-pkg
28 %requires_eq    ghc
29 Requires:       ghc-base >= 4.0
30 Requires:       ghc-bytestring >= 0.9
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 # debuginfo is not useful for ghc
34 %define         _enable_debug_packages  0
35
36 # don't compress haddock files
37 %define         _noautocompressdoc      *.haddock
38
39 %description
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.
44
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.
50
51 %package prof
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
58
59 %description prof
60 Profiling %{pkgname} library for GHC. Should be installed when
61 GHC's profiling subsystem is needed.
62
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.
66
67 %package doc
68 Summary:        HTML documentation for %{pkgname} ghc package
69 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
70 Group:          Documentation
71
72 %description doc
73 HTML documentation for %{pkgname} ghc package.
74
75 %description doc -l pl.UTF-8
76 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
77
78 %prep
79 %setup -q -n %{pkgname}-%{version}
80 %patch0 -p1
81
82 %build
83 runhaskell Setup.hs configure -v2 \
84         %{?with_prof:--enable-library-profiling} \
85         --prefix=%{_prefix} \
86         --libdir=%{_libdir} \
87         --libexecdir=%{_libexecdir} \
88         --docdir=%{_docdir}/%{name}-%{version}
89
90 runhaskell Setup.hs build
91 runhaskell Setup.hs haddock --executables
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
96
97 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
98
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}
103
104 runhaskell Setup.hs register \
105         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post
111 %ghc_pkg_recache
112
113 %postun
114 %ghc_pkg_recache
115
116 %files
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
133
134 %if %{with prof}
135 %files prof
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
141 %endif
142
143 %files doc
144 %defattr(644,root,root,755)
145 %doc %{name}-%{version}-doc/*
This page took 0.814492 seconds and 3 git commands to generate.