3 %bcond_without prof # profiling library
5 %define pkgname haskell-lexer
6 Summary: A fully compliant Haskell 98 lexer
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/haskell-lexer
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 460334be2c67197f5daac0f9b40daf78
15 URL: http://hackage.haskell.org/package/haskell-lexer
16 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-prof
20 BuildRequires: rpmbuild(macros) >= 1.608
22 Requires(post,postun): /usr/bin/ghc-pkg
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # debuginfo is not useful for ghc
26 %define _enable_debug_packages 0
28 # don't compress haddock files
29 %define _noautocompressdoc *.haddock
32 A fully compliant Haskell 98 lexer.
35 Summary: Profiling %{pkgname} library for GHC
36 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
37 Group: Development/Libraries
38 Requires: %{name} = %{version}-%{release}
41 Profiling %{pkgname} library for GHC. Should be installed when
42 GHC's profiling subsystem is needed.
44 %description prof -l pl.UTF-8
45 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
46 kiedy potrzebujemy systemu profilującego z GHC.
49 %setup -q -n %{pkgname}-%{version}
52 runhaskell Setup.hs configure -v2 \
53 %{?with_prof:--enable-library-profiling} \
56 --libexecdir=%{_libexecdir} \
57 --docdir=%{_docdir}/%{name}-%{version}
59 runhaskell Setup.hs build
60 runhaskell Setup.hs haddock --executables
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
66 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
68 # work around automatic haddock docs installation
69 %{__rm} -rf %{name}-%{version}-doc
70 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
71 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
73 runhaskell Setup.hs register \
74 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
77 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
87 %doc %{name}-%{version}-doc/*
88 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
92 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
95 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.hi
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.dyn_hi
98 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Lexer
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Lexer/*.hi
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Lexer/*.dyn_hi
104 %defattr(644,root,root,755)
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/*.p_hi
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/Lexer/*.p_hi