3 %bcond_without prof # profiling library
6 Summary: Specify refactorings to perform with apply-refact
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/refact
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 4947b12687e0b759cc7f318c79468484
15 URL: http://hackage.haskell.org/package/refact
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 4
18 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-prof >= 6.12.3
21 BuildRequires: ghc-base-prof >= 4
22 BuildRequires: ghc-base-prof < 5
24 BuildRequires: rpmbuild(macros) >= 1.608
25 Requires(post,postun): /usr/bin/ghc-pkg
27 Requires: ghc-base >= 4
28 Requires: ghc-base < 5
29 Requires: ghc-bytestring
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 # debuginfo is not useful for ghc
34 %define _enable_debug_packages 0
36 # don't compress haddock files
37 %define _noautocompressdoc *.haddock
40 This library provides a datatype which can be interpreted by
41 apply-refact. It exists as a seperate library so that applications can
42 specify refactorings without depending on GHC.
45 Summary: Profiling %{pkgname} library for GHC
46 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
47 Group: Development/Libraries
48 Requires: %{name} = %{version}-%{release}
49 Requires: ghc-base-prof >= 4
50 Requires: ghc-base-prof < 5
51 Requires: ghc-bytestring-prof
52 Requires: ghc-text-prof
55 Profiling %{pkgname} library for GHC. Should be installed when
56 GHC's profiling subsystem is needed.
58 %description prof -l pl.UTF-8
59 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
60 kiedy potrzebujemy systemu profilującego z GHC.
63 %setup -q -n %{pkgname}-%{version}
66 runhaskell Setup.hs configure -v2 \
67 %{?with_prof:--enable-library-profiling} \
70 --libexecdir=%{_libexecdir} \
71 --docdir=%{_docdir}/%{name}-%{version}
73 runhaskell Setup.hs build
74 runhaskell Setup.hs haddock --executables
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
80 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
82 # work around automatic haddock docs installation
83 %{__rm} -rf %{name}-%{version}-doc
84 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
85 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
87 runhaskell Setup.hs register \
88 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
91 rm -rf $RPM_BUILD_ROOT
100 %defattr(644,root,root,755)
101 %doc %{name}-%{version}-doc/*
102 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrefact-%{version}-*.so
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrefact-%{version}-*.a
106 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrefact-%{version}-*_p.a
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.hi
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.dyn_hi
113 %defattr(644,root,root,755)
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrefact-%{version}-*_p.a
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.p_hi