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