3 %bcond_without prof # profiling library
5 %define pkgname th-abstraction
6 Summary: Nicer interface for reified information about data types
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/th-abstraction
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 3625dd90af376cb3fedb8acc3feaf02d
15 URL: http://hackage.haskell.org/package/th-abstraction
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 3
18 BuildRequires: ghc-containers >= 0.4
19 BuildRequires: ghc-ghc-prim
20 BuildRequires: ghc-template-haskell >= 2.5
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 3
24 BuildRequires: ghc-containers-prof >= 0.4
25 BuildRequires: ghc-ghc-prim-prof
26 BuildRequires: ghc-template-haskell-prof >= 2.4
28 BuildRequires: rpmbuild(macros) >= 1.608
29 Requires(post,postun): /usr/bin/ghc-pkg
31 Requires: ghc-base >= 3
32 Requires: ghc-containers >= 0.4
33 Requires: ghc-ghc-prim
34 Requires: ghc-template-haskell >= 2.4
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 # debuginfo is not useful for ghc
38 %define _enable_debug_packages 0
40 # don't compress haddock files
41 %define _noautocompressdoc *.haddock
44 This package normalizes variations in the interface for inspecting
45 datatype information via Template Haskell so that packages and support
46 a single, easier to use informational datatype while supporting many
47 versions of Template Haskell.
50 Summary: Profiling %{pkgname} library for GHC
51 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
54 Requires: ghc-base-prof >= 3
55 Requires: ghc-containers-prof >= 0.4
56 Requires: ghc-ghc-prim-prof
57 Requires: ghc-template-haskell-prof >= 2.4
60 Profiling %{pkgname} library for GHC. Should be installed when GHC's
61 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 --executables
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 ChangeLog.md LICENSE README.md
107 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-abstraction-%{version}-*.so
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-abstraction-%{version}-*.a
111 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-abstraction-%{version}-*_p.a
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell
114 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.hi
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.dyn_hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Datatype
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Datatype/*.hi
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Datatype/*.dyn_hi
122 %defattr(644,root,root,755)
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-abstraction-%{version}-*_p.a
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.p_hi
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/Datatype/*.p_hi