3 %bcond_without prof # profiling library
5 %define pkgname skylighting
6 Summary: Syntax highlighting library
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/skylighting
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 1894daff506baf4f91c63b3953bdd2da
15 URL: http://hackage.haskell.org/package/skylighting
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-blaze-html
18 BuildRequires: ghc-pretty-show
19 BuildRequires: ghc-skylighting-core
21 BuildRequires: ghc-prof
22 BuildRequires: ghc-blaze-html-prof
23 BuildRequires: ghc-pretty-show-prof
24 BuildRequires: ghc-skylighting-core-prof
26 BuildRequires: rpmbuild(macros) >= 1.608
28 Requires(post,postun): /usr/bin/ghc-pkg
29 Requires: ghc-blaze-html
30 Requires: ghc-pretty-show
31 Requires: ghc-skylighting-core
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 # debuginfo is not useful for ghc
35 %define _enable_debug_packages 0
37 # don't compress haddock files
38 %define _noautocompressdoc *.haddock
41 Skylighting is a syntax highlighting library with support for over one
42 hundred languages. It derives its tokenizers from XML syntax
43 definitions used by KDE's KSyntaxHighlighting framework, so any syntax
44 supported by that framework can be added. An optional command-line
45 program is provided. Skylighting is intended to be the successor to
46 highlighting-kate. This package provides generated syntax modules
47 based on the KDE XML definitions provided by the skylighting-core
48 package. As a result this package is licensed under the GPL.
51 Summary: Profiling %{pkgname} library for GHC
52 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
53 Group: Development/Libraries
54 Requires: %{name} = %{version}-%{release}
55 Requires: ghc-blaze-html-prof
56 Requires: ghc-pretty-show-prof
57 Requires: ghc-skylighting-core-prof
60 Profiling %{pkgname} library for GHC. Should be installed when
61 GHC's profiling subsystem is needed.
63 %description prof -l pl.UTF-8
64 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
65 kiedy potrzebujemy systemu profilującego z GHC.
68 %setup -q -n %{pkgname}-%{version}
71 runhaskell Setup.hs configure -v2 \
72 %{?with_prof:--enable-library-profiling} \
75 --libexecdir=%{_libexecdir} \
76 --docdir=%{_docdir}/%{name}-%{version}
78 runhaskell Setup.hs build
79 runhaskell Setup.hs haddock
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
85 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
87 # work around automatic haddock docs installation
88 %{__rm} -rf %{name}-%{version}-doc
89 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
90 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
92 runhaskell Setup.hs register \
93 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
96 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc README.md changelog.md %{name}-%{version}-doc/*
107 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
111 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.hi
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.dyn_hi
118 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Syntax
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Syntax/*.hi
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Syntax/*.dyn_hi
124 %defattr(644,root,root,755)
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/*.p_hi
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Skylighting/Syntax/*.p_hi