]> git.pld-linux.org Git - SPECS.git/blob - ghc-syb.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / ghc-syb.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname syb
6 Summary:        Scrab Your Boilerplate generics system
7 Summary(pl.UTF-8):      System generyczny Scrab Your Boilerplate
8 Name:           ghc-%{pkgname}
9 Version:        0.7.1
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/syb
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  8b4330cc60f6f61efc2a937e4658d0f5
16 URL:            http://hackage.haskell.org/package/syb
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 4.0
19 %if %{with prof}
20 BuildRequires:  ghc-prof >= 6.12.3}
21 BuildRequires:  ghc-base-prof >= 4.0
22 %endif
23 BuildRequires:  rpmbuild(macros) >= 1.608
24 %requires_eq    ghc
25 Requires:       ghc >= 6.12.3
26 Requires:       ghc-base >= 4.0
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 # debuginfo is not useful for ghc
30 %define         _enable_debug_packages  0
31
32 # don't compress haddock files
33 %define         _noautocompressdoc      *.haddock
34
35 %description
36 This package contains the generics system described in the Scrap Your
37 Boilerplate papers (see
38 <http://www.cs.uu.nl/wiki/GenericProgramming/SYB>). It defines the
39 Data class of types permitting folding and unfolding of constructor
40 applications, instances of this class for primitive types, and a
41 variety of traversals.
42
43 %description -l pl.UTF-8
44 Ten pakiet zawiera system generyczny opisany w dokumencie "Scrap Your
45 Boilerplate" (p. <http://www.cs.uu.nl/wiki/GenericProgramming/SYB>).
46 Definiuje on klasę Data typów pozwalających na zwijanie i rozwijanie
47 aplikacji konstruktorów, instancje tej klasy dla typów prostych oraz
48 różne przejścia.
49
50 %package prof
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-base-prof >= 4.0
56
57 %description prof
58 Profiling %{pkgname} library for GHC. Should be installed when
59 GHC's profiling subsystem is needed.
60
61 %description prof -l pl.UTF-8
62 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
63 kiedy potrzebujemy systemu profilującego z GHC.
64
65 %package doc
66 Summary:        HTML documentation for ghc %{pkgname} package
67 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
68 Group:          Documentation
69
70 %description doc
71 HTML documentation for ghc %{pkgname} package.
72
73 %description doc -l pl.UTF-8
74 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
75
76 %prep
77 %setup -q -n %{pkgname}-%{version}
78
79 %build
80 runhaskell Setup.lhs configure -v2 \
81         %{?with_prof:--enable-library-profiling} \
82         --prefix=%{_prefix} \
83         --libdir=%{_libdir} \
84         --libexecdir=%{_libexecdir} \
85         --docdir=%{_docdir}/%{name}-%{version}
86
87 runhaskell Setup.lhs build
88 runhaskell Setup.lhs haddock --executables
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
93
94 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
95
96 # work around automatic haddock docs installation
97 %{__rm} -rf %{name}-%{version}-doc
98 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
99 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
100
101 runhaskell Setup.lhs register \
102         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post
108 %ghc_pkg_recache
109
110 %postun
111 %ghc_pkg_recache
112
113 %files
114 %defattr(644,root,root,755)
115 %doc ChangeLog LICENSE README.md
116 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsyb-%{version}-*.so
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsyb-%{version}-*.a
120 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsyb-%{version}-*_p.a
121 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics.hi
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics.dyn_hi
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/*.hi
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/*.dyn_hi
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB.dyn_hi
130 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB/*.hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB/*.dyn_hi
133
134 %if %{with prof}
135 %files prof
136 %defattr(644,root,root,755)
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsyb-%{version}-*_p.a
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics.p_hi
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/*.p_hi
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB.p_hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/SYB/*.p_hi
142 %endif
143
144 %files doc
145 %defattr(644,root,root,755)
146 %doc %{name}-%{version}-doc/*
This page took 0.394512 seconds and 3 git commands to generate.