3 %bcond_without prof # profiling library
5 %define pkgname hslua-module-system
6 Summary: Lua module wrapper around Haskell's System module
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/hslua-module-system
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 60a150932bcc9ef65292914ccbbd8fbe
15 URL: http://hackage.haskell.org/package/hslua-module-system
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-hslua
18 BuildRequires: ghc-temporary
20 BuildRequires: ghc-prof
21 BuildRequires: ghc-hslua-prof
22 BuildRequires: ghc-temporary-prof
24 BuildRequires: rpmbuild(macros) >= 1.608
26 Requires(post,postun): /usr/bin/ghc-pkg
28 Requires: ghc-temporary
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # debuginfo is not useful for ghc
32 %define _enable_debug_packages 0
34 # don't compress haddock files
35 %define _noautocompressdoc *.haddock
38 Provides access to system information and functionality to Lua scripts
39 via Haskell's System module.
41 Intended usage for this package is to preload it by adding the loader
42 function to package.preload. Note that the Lua package library must
43 have already been loaded before the loader can be added.
46 Summary: Profiling %{pkgname} library for GHC
47 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
48 Group: Development/Libraries
49 Requires: %{name} = %{version}-%{release}
50 Requires: ghc-hslua-prof
51 Requires: ghc-temporary-prof
54 Profiling %{pkgname} library for GHC. Should be installed when
55 GHC's profiling subsystem is needed.
57 %description prof -l pl.UTF-8
58 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
59 kiedy potrzebujemy systemu profilującego z GHC.
62 %setup -q -n %{pkgname}-%{version}
65 runhaskell Setup.hs configure -v2 \
66 %{?with_prof:--enable-library-profiling} \
69 --libexecdir=%{_libexecdir} \
70 --docdir=%{_docdir}/%{name}-%{version}
72 runhaskell Setup.hs build
73 runhaskell Setup.hs haddock --executables
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
79 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
81 # work around automatic haddock docs installation
82 %{__rm} -rf %{name}-%{version}-doc
83 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
84 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
86 runhaskell Setup.hs register \
87 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
90 rm -rf $RPM_BUILD_ROOT
99 %defattr(644,root,root,755)
100 %doc CHANGELOG.md %{name}-%{version}-doc/*
101 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
102 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
105 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua/Module
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua/Module/*.hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua/Module/*.dyn_hi
115 %defattr(644,root,root,755)
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua/Module/*.p_hi