]> git.pld-linux.org Git - packages/ghc-digest.git/blob - ghc-digest.spec
rebuild with ghc 8.10.7
[packages/ghc-digest.git] / ghc-digest.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname digest
6 Summary:        Various cryptographic hashes for bytestrings; CRC32 and Adler32 for now
7 Summary(pl.UTF-8):      Różne kryptograficzne skróty łańcuchów bajtów: CRC32 i Adler32
8 Name:           ghc-%{pkgname}
9 Version:        0.0.1.2
10 Release:        3
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/digest
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  83ed3d8c10d24c88d5ddf4f3914507ac
16 URL:            http://hackage.haskell.org/package/digest
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 2.2
19 BuildRequires:  ghc-base < 5
20 BuildRequires:  ghc-bytestring >= 0.9
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 2.2
24 BuildRequires:  ghc-base-prof < 5
25 BuildRequires:  ghc-bytestring-prof >= 0.9
26 %endif
27 BuildRequires:  rpmbuild(macros) >= 1.608
28 BuildRequires:  zlib-devel
29 Requires(post,postun):  /usr/bin/ghc-pkg
30 %requires_eq    ghc
31 Requires:       ghc-base >= 2.2
32 Requires:       ghc-base < 5
33 Requires:       ghc-bytestring >= 0.9
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 # debuginfo is not useful for ghc
37 %define         _enable_debug_packages  0
38
39 # don't compress haddock files
40 %define         _noautocompressdoc      *.haddock
41
42 %description
43 This package provides efficient cryptographic hash implementations for
44 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported;
45 they are implemented as FFI bindings to efficient code from zlib.
46
47 %description -l pl.UTF-8
48 Ten pakiet dostarcza wydajne implementacje skrótów kryptograficznych
49 dla łańcuchów bajtów (bytestringów) ścisłych i leniwych. Na razie
50 obsługiwane są CRC32 i Adler32; są zaimplementowane jako wiązania FFI
51 do wydajnego kodu z biblioteki zlib.
52
53 %package prof
54 Summary:        Profiling %{pkgname} library for GHC
55 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58 Requires:       ghc-base-prof >= 2.2
59 Requires:       ghc-base-prof < 5
60 Requires:       ghc-bytestring-prof >= 0.9
61
62 %description prof
63 Profiling %{pkgname} library for GHC. Should be installed when
64 GHC's profiling subsystem is needed.
65
66 %description prof -l pl.UTF-8
67 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
68 kiedy potrzebujemy systemu profilującego z GHC.
69
70 %package doc
71 Summary:        HTML documentation for ghc %{pkgname} package
72 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
73 Group:          Documentation
74
75 %description doc
76 HTML documentation for ghc %{pkgname} package.
77
78 %description doc -l pl.UTF-8
79 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
80
81 %prep
82 %setup -q -n %{pkgname}-%{version}
83
84 %build
85 runhaskell Setup.hs configure -v2 \
86         %{?with_prof:--enable-library-profiling} \
87         --prefix=%{_prefix} \
88         --libdir=%{_libdir} \
89         --libexecdir=%{_libexecdir} \
90         --docdir=%{_docdir}/%{name}-%{version}
91
92 runhaskell Setup.hs build
93 runhaskell Setup.hs haddock --executables
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
98
99 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
100
101 # work around automatic haddock docs installation
102 %{__rm} -rf %{name}-%{version}-doc
103 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
104 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
105
106 runhaskell Setup.hs register \
107         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post
113 %ghc_pkg_recache
114
115 %postun
116 %ghc_pkg_recache
117
118 %files
119 %defattr(644,root,root,755)
120 %doc LICENSE
121 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
122 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*.so
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*.a
125 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*_p.a
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.dyn_hi
130
131 %if %{with prof}
132 %files prof
133 %defattr(644,root,root,755)
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*_p.a
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.p_hi
136 %endif
137
138 %files doc
139 %defattr(644,root,root,755)
140 %doc %{name}-%{version}-doc/*
This page took 0.086042 seconds and 3 git commands to generate.