]> git.pld-linux.org Git - packages/ghc-cereal.git/blob - ghc-cereal.spec
rebuild with ghc 8.10.7
[packages/ghc-cereal.git] / ghc-cereal.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname cereal
6 Summary:        A Haskell binding to the cereal graphics library
7 Name:           ghc-%{pkgname}
8 Version:        0.5.8.1
9 Release:        3
10 License:        BSD
11 Group:          Development/Languages
12 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
13 # Source0-md5:  4f5e41ee3371272daa12a2d073d2fd4f
14 URL:            http://hackage.haskell.org/package/cereal/
15 BuildRequires:  ghc >= 6.12.3
16 %if %{with prof}
17 BuildRequires:  ghc-prof
18 %endif
19 BuildRequires:  rpmbuild(macros) >= 1.608
20 %requires_eq    ghc
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 # debuginfo is not useful for ghc
24 %define         _enable_debug_packages  0
25
26 %description
27 A Haskell binding to the cereal graphics library.
28
29 %package prof
30 Summary:        Profiling %{pkgname} library for GHC
31 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
32 Group:          Development/Libraries
33 Requires:       %{name} = %{version}-%{release}
34
35 %description prof
36 Profiling %{pkgname} library for GHC.  Should be installed when
37 GHC's profiling subsystem is needed.
38
39 %description prof -l pl.UTF-8
40 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
41 kiedy potrzebujemy systemu profilującego z GHC.
42
43 %package doc
44 Summary:        HTML documentation for %{pkgname}
45 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
46 Group:          Documentation
47
48 %description doc
49 HTML documentation for %{pkgname}.
50
51 %description doc -l pl.UTF-8
52 Dokumentacja w formacie HTML dla %{pkgname}.
53
54 %prep
55 %setup -q -n %{pkgname}-%{version}
56
57 %build
58 runhaskell Setup.lhs configure -v2 \
59         %{?with_prof:--enable-library-profiling} \
60         --prefix=%{_prefix} \
61         --libdir=%{_libdir} \
62         --libexecdir=%{_libexecdir} \
63         --docdir=%{_docdir}/%{name}-%{version}
64
65 runhaskell Setup.lhs build
66 runhaskell Setup.lhs haddock --executables
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
71
72 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
73
74 # work around automatic haddock docs installation
75 rm -rf %{name}-%{version}-doc
76 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
77 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
78
79 runhaskell Setup.lhs register \
80         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 %ghc_pkg_recache
87
88 %postun
89 %ghc_pkg_recache
90
91 %files
92 %defattr(644,root,root,755)
93 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
97 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
98
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.hi
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.dyn_hi
105
106 %if %{with prof}
107 %files prof
108 %defattr(644,root,root,755)
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Serialize/*.p_hi
112 %endif
113
114 %files doc
115 %defattr(644,root,root,755)
116 %doc %{name}-%{version}-doc/*
This page took 0.036708 seconds and 3 git commands to generate.