]> git.pld-linux.org Git - SPECS.git/blob - ghc-hslua-module-system.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / ghc-hslua-module-system.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname hslua-module-system
6 Summary:        Lua module wrapper around Haskell's System module
7 Name:           ghc-%{pkgname}
8 Version:        0.2.1
9 Release:        3
10 License:        MIT
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
19 %if %{with prof}
20 BuildRequires:  ghc-prof
21 BuildRequires:  ghc-hslua-prof
22 BuildRequires:  ghc-temporary-prof
23 %endif
24 BuildRequires:  rpmbuild(macros) >= 1.608
25 %requires_eq    ghc
26 Requires(post,postun):  /usr/bin/ghc-pkg
27 Requires:       ghc-hslua
28 Requires:       ghc-temporary
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 # debuginfo is not useful for ghc
32 %define         _enable_debug_packages  0
33
34 # don't compress haddock files
35 %define         _noautocompressdoc      *.haddock
36
37 %description
38 Provides access to system information and functionality to Lua scripts
39 via Haskell's System module.
40
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.
44
45 %package prof
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
52
53 %description prof
54 Profiling %{pkgname} library for GHC.  Should be installed when
55 GHC's profiling subsystem is needed.
56
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.
60
61 %prep
62 %setup -q -n %{pkgname}-%{version}
63
64 %build
65 runhaskell Setup.hs configure -v2 \
66         %{?with_prof:--enable-library-profiling} \
67         --prefix=%{_prefix} \
68         --libdir=%{_libdir} \
69         --libexecdir=%{_libexecdir} \
70         --docdir=%{_docdir}/%{name}-%{version}
71
72 runhaskell Setup.hs build
73 runhaskell Setup.hs haddock --executables
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
78
79 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
80
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}
85
86 runhaskell Setup.hs register \
87         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %post
93 %ghc_pkg_recache
94
95 %postun
96 %ghc_pkg_recache
97
98 %files
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
106
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
112
113 %if %{with prof}
114 %files prof
115 %defattr(644,root,root,755)
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Foreign/Lua/Module/*.p_hi
118 %endif
This page took 0.688977 seconds and 3 git commands to generate.