]> git.pld-linux.org Git - packages/ghc-hslua.git/blob - ghc-hslua.spec
c38986c6c9a8241a2566be22dfd5b254a2163245
[packages/ghc-hslua.git] / ghc-hslua.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname hslua
6 Summary:        A Lua language interpreter embedding in Haskell
7 Summary(pl.UTF-8):      Osadzanie interpretera języka Lua w Haskellu
8 Name:           ghc-%{pkgname}
9 Version:        0.3.9
10 Release:        1
11 License:        MIT
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/hslua
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  20db7a460496c29b293af647e50da520
16 URL:            http://hackage.haskell.org/package/hslua
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 4
19 BuildRequires:  ghc-base < 5
20 BuildRequires:  ghc-mtl >= 2.1
21 %if %{with prof}
22 BuildRequires:  ghc-prof >= 6.12.3
23 BuildRequires:  ghc-base-prof >= 4
24 BuildRequires:  ghc-base-prof < 5
25 BuildRequires:  ghc-mtl-prof >= 2.1
26 %endif
27 BuildRequires:  lua51-devel >= 5.1.4
28 BuildRequires:  pkgconfig
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 BuildRequires:  sed >= 4.0
31 Requires(post,postun):  /usr/bin/ghc-pkg
32 %requires_eq    ghc
33 Requires:       ghc-base >= 4
34 Requires:       ghc-base < 5
35 Requires:       ghc-mtl >= 2.1
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # debuginfo is not useful for ghc
39 %define         _enable_debug_packages  0
40
41 # don't compress haddock files
42 %define         _noautocompressdoc      *.haddock
43
44 %description
45 The Scripting.Lua module is a wrapper of Lua language interpreter as
46 described in <http://www.lua.org/>.
47
48 %description -l pl.UTF-8
49 Moduł Scripting.Lua to obudowanie interpretera języka Lua, opisanego
50 na <http://www.lua.org/>.
51
52 %package prof
53 Summary:        Profiling %{pkgname} library for GHC
54 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
55 Group:          Development/Libraries
56 Requires:       %{name} = %{version}-%{release}
57 Requires:       ghc-base-prof >= 4
58 Requires:       ghc-base-prof < 5
59 Requires:       ghc-mtl-prof >= 2.1
60
61 %description prof
62 Profiling %{pkgname} library for GHC. Should be installed when
63 GHC's profiling subsystem is needed.
64
65 %description prof -l pl.UTF-8
66 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
67 kiedy potrzebujemy systemu profilującego z GHC.
68
69 %package doc
70 Summary:        HTML documentation for ghc %{pkgname} package
71 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
72 Group:          Documentation
73
74 %description doc
75 HTML documentation for ghc %{pkgname} package.
76
77 %description doc -l pl.UTF-8
78 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
79
80 %prep
81 %setup -q -n %{pkgname}-%{version}
82
83 %{__sed} -i -e '/Pkgconfig-depends/s/lua/lua51/' hslua.cabal
84
85 %build
86 runhaskell Setup.hs configure -v2 \
87         %{?with_prof:--enable-library-profiling} \
88         --flags=system-lua \
89         --prefix=%{_prefix} \
90         --libdir=%{_libdir} \
91         --libexecdir=%{_libexecdir} \
92         --docdir=%{_docdir}/%{name}-%{version} \
93
94 runhaskell Setup.hs build
95 runhaskell Setup.hs haddock --executables
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
100
101 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
102
103 # work around automatic haddock docs installation
104 %{__rm} -rf %{name}-%{version}-doc
105 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
106 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
107
108 runhaskell Setup.hs register \
109         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %post
115 %ghc_pkg_recache
116
117 %postun
118 %ghc_pkg_recache
119
120 %files
121 %defattr(644,root,root,755)
122 %doc COPYRIGHT
123 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HShslua-%{version}.o
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShslua-%{version}.a
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting/Lua.hi
129 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting/Lua
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting/Lua/*.hi
131
132 %if %{with prof}
133 %files prof
134 %defattr(644,root,root,755)
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShslua-%{version}_p.a
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting/Lua.p_hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Scripting/Lua/*.p_hi
138 %endif
139
140 %files doc
141 %defattr(644,root,root,755)
142 %doc %{name}-%{version}-doc/*
This page took 0.05297 seconds and 2 git commands to generate.