]> git.pld-linux.org Git - packages/ghc-generic-deriving.git/blob - ghc-generic-deriving.spec
- new
[packages/ghc-generic-deriving.git] / ghc-generic-deriving.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname generic-deriving
6 Summary:        Generic programming library for generalised deriving
7 Name:           ghc-%{pkgname}
8 Version:        1.13.1
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
13 # Source0-md5:  a0cddab953bd4d9fa479b16281a14fc0
14 URL:            http://hackage.haskell.org/package/generic-deriving
15 BuildRequires:  ghc >= 6.12.3
16 BuildRequires:  ghc-base >=4.3
17 BuildRequires:  ghc-containers >=0.1
18 BuildRequires:  ghc-ghc-prim
19 BuildRequires:  ghc-template-haskell >= 2.4
20 BuildRequires:  ghc-th-abstraction >= 0.3
21 %if %{with prof}
22 BuildRequires:  ghc-prof
23 BuildRequires:  ghc-base-prof >=4.3
24 BuildRequires:  ghc-containers-prof >=0.1
25 BuildRequires:  ghc-ghc-prim-prof
26 BuildRequires:  ghc-template-haskell-prof >= 2.4
27 BuildRequires:  ghc-th-abstraction-prof >= 0.3
28 %endif
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 %requires_eq    ghc
31 Requires:       ghc-base >=4.3
32 Requires:       ghc-containers >=0.1
33 Requires:       ghc-ghc-prim
34 Requires:       ghc-template-haskell >= 2.4
35 Requires:       ghc-th-abstraction >= 0.3
36 Requires(post,postun):  /usr/bin/ghc-pkg
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # debuginfo is not useful for ghc
40 %define         _enable_debug_packages  0
41
42 # don't compress haddock files
43 %define         _noautocompressdoc      *.haddock
44
45 %description
46 This package provides functionality for generalising the deriving
47 mechanism in Haskell to arbitrary classes. It was first described in
48 the paper:
49
50     A generic deriving mechanism for Haskell. Jose Pedro Magalhaes,
51     Atze Dijkstra, Johan Jeuring, and Andres Loeh. Haskell'10.
52
53 %package prof
54 Summary:        Profiling %{pkgname} library for GHC
55 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
56 Group:          Development/Libraries
57 Requires:       %{name} = %{version}-%{release}
58 Requires:       ghc-base-prof >=4.3
59 Requires:       ghc-containers-prof >=0.1
60 Requires:       ghc-ghc-prim-prof
61 Requires:       ghc-template-haskell-prof >= 2.4
62 Requires:       ghc-th-abstraction-prof >= 0.3
63
64 %description prof
65 Profiling %{pkgname} library for GHC.  Should be installed when
66 GHC's profiling subsystem is needed.
67
68 %description prof -l pl.UTF-8
69 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
70 kiedy potrzebujemy systemu profilującego z GHC.
71
72 %prep
73 %setup -q -n %{pkgname}-%{version}
74
75 %build
76 runhaskell Setup.hs configure -v2 \
77         %{?with_prof:--enable-library-profiling} \
78         --prefix=%{_prefix} \
79         --libdir=%{_libdir} \
80         --libexecdir=%{_libexecdir} \
81         --docdir=%{_docdir}/%{name}-%{version}
82
83 runhaskell Setup.hs build
84 runhaskell Setup.hs haddock --executables
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
89
90 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
91
92 # work around automatic haddock docs installation
93 %{__rm} -rf %{name}-%{version}-doc
94 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
95 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
96
97 runhaskell Setup.hs register \
98         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %post
104 %ghc_pkg_recache
105
106 %postun
107 %ghc_pkg_recache
108
109 %files
110 %defattr(644,root,root,755)
111 %doc CHANGELOG.md LICENSE README.md
112 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
116 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
117
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/*.hi
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/*.dyn_hi
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/*.hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/*.dyn_hi
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Base
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Base/*.hi
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Base/*.dyn_hi
129 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Monoid
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Monoid/*.hi
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Monoid/*.dyn_hi
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Semigroup
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Semigroup/*.hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Semigroup/*.dyn_hi
135 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/TH
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/TH/*.hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/TH/*.dyn_hi
138
139 %if %{with prof}
140 %files prof
141 %defattr(644,root,root,755)
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/*.p_hi
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/*.p_hi
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Base/*.p_hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Monoid/*.p_hi
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/Semigroup/*.p_hi
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Generics/Deriving/TH/*.p_hi
150 %endif
This page took 0.0737 seconds and 3 git commands to generate.