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