]> git.pld-linux.org Git - packages/ghc-refact.git/blame - ghc-refact.spec
- rel 2. rebuild with ghc 8.10.1
[packages/ghc-refact.git] / ghc-refact.spec
CommitLineData
f5ba723d
JP
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname refact
6Summary: Specify refactorings to perform with apply-refact
7Name: ghc-%{pkgname}
8Version: 0.3.0.2
92ed17e0 9Release: 2
f5ba723d
JP
10License: BSD
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/refact
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: 4947b12687e0b759cc7f318c79468484
15URL: http://hackage.haskell.org/package/refact
16BuildRequires: ghc >= 6.12.3
17BuildRequires: ghc-base >= 4
18BuildRequires: ghc-base < 5
19%if %{with prof}
20BuildRequires: ghc-prof >= 6.12.3
21BuildRequires: ghc-base-prof >= 4
22BuildRequires: ghc-base-prof < 5
23%endif
24BuildRequires: rpmbuild(macros) >= 1.608
25Requires(post,postun): /usr/bin/ghc-pkg
26%requires_eq ghc
27Requires: ghc-base >= 4
28Requires: ghc-base < 5
29Requires: ghc-bytestring
30Requires: ghc-text
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33# debuginfo is not useful for ghc
34%define _enable_debug_packages 0
35
36# don't compress haddock files
37%define _noautocompressdoc *.haddock
38
39%description
40This library provides a datatype which can be interpreted by
41apply-refact. It exists as a seperate library so that applications can
42specify refactorings without depending on GHC.
43
44%package prof
45Summary: Profiling %{pkgname} library for GHC
46Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
47Group: Development/Libraries
48Requires: %{name} = %{version}-%{release}
49Requires: ghc-base-prof >= 4
50Requires: ghc-base-prof < 5
51Requires: ghc-bytestring-prof
52Requires: ghc-text-prof
53
54%description prof
55Profiling %{pkgname} library for GHC. Should be installed when
56GHC's profiling subsystem is needed.
57
58%description prof -l pl.UTF-8
59Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
60kiedy potrzebujemy systemu profilującego z GHC.
61
62%prep
63%setup -q -n %{pkgname}-%{version}
64
65%build
66runhaskell Setup.hs configure -v2 \
67 %{?with_prof:--enable-library-profiling} \
68 --prefix=%{_prefix} \
69 --libdir=%{_libdir} \
70 --libexecdir=%{_libexecdir} \
71 --docdir=%{_docdir}/%{name}-%{version}
72
73runhaskell Setup.hs build
74runhaskell Setup.hs haddock --executables
75
76%install
77rm -rf $RPM_BUILD_ROOT
78install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
79
80runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
81
82# work around automatic haddock docs installation
83%{__rm} -rf %{name}-%{version}-doc
84cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
85%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
86
87runhaskell Setup.hs register \
88 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%post
94%ghc_pkg_recache
95
96%postun
97%ghc_pkg_recache
98
99%files
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}
92ed17e0
JR
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
f5ba723d
JP
107%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact
108%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.hi
92ed17e0 109%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.dyn_hi
f5ba723d
JP
110
111%if %{with prof}
112%files prof
113%defattr(644,root,root,755)
92ed17e0 114%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSrefact-%{version}-*_p.a
f5ba723d
JP
115%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Refact/*.p_hi
116%endif
This page took 0.081099 seconds and 4 git commands to generate.