3 %bcond_without prof # profiling library
5 %define pkgname skylighting-core
6 Summary: Syntax highlighting library
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/skylighting-core
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 2db93ad3dda9e34b3b917835c56a0920
15 URL: http://hackage.haskell.org/package/skylighting-core
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-aeson >= 1.0
18 BuildRequires: ghc-ansi-terminal >= 0.7
19 BuildRequires: ghc-attoparsec
20 BuildRequires: ghc-base64-bytestring
21 BuildRequires: ghc-blaze-html >= 0.5
22 BuildRequires: ghc-case-insensitive
23 BuildRequires: ghc-colour >= 2.0
24 BuildRequires: ghc-hxt
25 BuildRequires: ghc-regex-pcre
26 BuildRequires: ghc-safe
27 BuildRequires: ghc-transformers
28 BuildRequires: ghc-utf8-string
30 BuildRequires: ghc-prof
31 BuildRequires: ghc-aeson-prof >= 1.0
32 BuildRequires: ghc-ansi-terminal-prof >= 0.7
33 BuildRequires: ghc-attoparsec-prof
34 BuildRequires: ghc-base64-bytestring-prof
35 BuildRequires: ghc-blaze-html-prof >= 0.5
36 BuildRequires: ghc-case-insensitive-prof
37 BuildRequires: ghc-colour-prof >= 2.0
38 BuildRequires: ghc-hxt-prof
39 BuildRequires: ghc-regex-pcre-prof
40 BuildRequires: ghc-safe-prof
41 BuildRequires: ghc-transformers-prof
42 BuildRequires: ghc-utf8-string-prof
44 BuildRequires: rpmbuild(macros) >= 1.608
46 Requires(post,postun): /usr/bin/ghc-pkg
47 Requires: ghc-aeson >= 1.0
48 Requires: ghc-ansi-terminal >= 0.7
49 Requires: ghc-attoparsec
50 Requires: ghc-base64-bytestring
51 Requires: ghc-blaze-html >= 0.5
52 Requires: ghc-case-insensitive
53 Requires: ghc-colour >= 2.0
55 Requires: ghc-regex-pcre
57 Requires: ghc-transformers
58 Requires: ghc-utf8-string
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 # debuginfo is not useful for ghc
62 %define _enable_debug_packages 0
64 # don't compress haddock files
65 %define _noautocompressdoc *.haddock
68 This package provides the core functionality of the Skylighting
69 project, a Haskell syntax highlighting library with support for KDE
70 XML syntax highlighting descriptions.
73 Summary: Profiling %{pkgname} library for GHC
74 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
75 Group: Development/Libraries
76 Requires: %{name} = %{version}-%{release}
77 Requires: ghc-aeson-prof >= 1.0
78 Requires: ghc-ansi-terminal-prof >= 0.7
79 Requires: ghc-attoparsec-prof
80 Requires: ghc-base64-bytestring-prof
81 Requires: ghc-blaze-html-prof >= 0.5
82 Requires: ghc-case-insensitive-prof
83 Requires: ghc-colour-prof >= 2.0
84 Requires: ghc-hxt-prof
85 Requires: ghc-regex-pcre-prof
86 Requires: ghc-safe-prof
87 Requires: ghc-transformers-prof
88 Requires: ghc-utf8-string-prof
91 Profiling %{pkgname} library for GHC. Should be installed when
92 GHC's profiling subsystem is needed.
94 %description prof -l pl.UTF-8
95 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
96 kiedy potrzebujemy systemu profilującego z GHC.
99 %setup -q -n %{pkgname}-%{version}
102 runhaskell Setup.hs configure -v2 \
103 %{?with_prof:--enable-library-profiling} \
104 --flags="system-pcre" \
105 --prefix=%{_prefix} \
106 --libdir=%{_libdir} \
107 --libexecdir=%{_libexecdir} \
108 --docdir=%{_docdir}/%{name}-%{version}
110 runhaskell Setup.hs build
111 runhaskell Setup.hs haddock --executables
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
117 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
119 # work around automatic haddock docs installation
120 %{__rm} -rf %{name}-%{version}-doc
121 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
122 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
124 runhaskell Setup.hs register \
125 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
128 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc changelog.md README.md %{name}-%{version}-doc/*
139 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
140 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
143 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
145 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.dyn_hi
148 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Format
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Format/*.hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Format/*.dyn_hi
154 %defattr(644,root,root,755)
155 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
156 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.p_hi
157 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Format/*.p_hi