]> git.pld-linux.org Git - packages/ghc-skylighting-core.git/blob - ghc-skylighting-core.spec
rebuild with ghc 8.10.7
[packages/ghc-skylighting-core.git] / ghc-skylighting-core.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname skylighting-core
6 Summary:        Syntax highlighting library
7 Name:           ghc-%{pkgname}
8 Version:        0.8.4
9 Release:        2
10 License:        BSD
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
29 %if %{with prof}
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
43 %endif
44 BuildRequires:  rpmbuild(macros) >= 1.608
45 %requires_eq    ghc
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
54 Requires:       ghc-hxt
55 Requires:       ghc-regex-pcre
56 Requires:       ghc-safe
57 Requires:       ghc-transformers
58 Requires:       ghc-utf8-string
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60
61 # debuginfo is not useful for ghc
62 %define         _enable_debug_packages  0
63
64 # don't compress haddock files
65 %define         _noautocompressdoc      *.haddock
66
67 %description
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.
71
72 %package prof
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
89
90 %description prof
91 Profiling %{pkgname} library for GHC.  Should be installed when
92 GHC's profiling subsystem is needed.
93
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.
97
98 %prep
99 %setup -q -n %{pkgname}-%{version}
100
101 %build
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}
109
110 runhaskell Setup.hs build
111 runhaskell Setup.hs haddock --executables
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
116
117 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
118
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}
123
124 runhaskell Setup.hs register \
125         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %post
131 %ghc_pkg_recache
132
133 %postun
134 %ghc_pkg_recache
135
136 %files
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
144
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
151
152 %if %{with prof}
153 %files prof
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
158 %endif
This page took 0.089582 seconds and 3 git commands to generate.