]> git.pld-linux.org Git - projects/template-specs.git/blame_incremental - ghc-package.spec
dokuwiki: add less support info
[projects/template-specs.git] / ghc-package.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without prof # profiling library
4#
5%define pkgname PACKAGE_NAME
6Summary: -
7Name: ghc-%{pkgname}
8Version: -
9Release: 0.1
10License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
11Group: Development/Languages
12#Source0Download: http://hackage.haskell.org/package/PACKAGE_NAME
13Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14# Source0-md5: -
15URL: http://hackage.haskell.org/package/PACKAGE_NAME
16BuildRequires: ghc >= 6.12.3
17#BuildRequires: ghc-OTHERMODULE
18%if %{with prof}
19BuildRequires: ghc-prof
20#BuildRequires: ghc-OTHERMODULE-prof
21BuildRequires: rpmbuild(macros) >= 1.608
22%requires_releq ghc
23Requires(post,postun): /usr/bin/ghc-pkg
24#Requires: ghc-OTHERMODULE
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27# debuginfo is not useful for ghc
28%define _enable_debug_packages 0
29
30# don't compress haddock files
31%define _noautocompressdoc *.haddock
32
33%description
34
35%package prof
36Summary: Profiling %{pkgname} library for GHC
37Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
38Group: Development/Libraries
39Requires: %{name} = %{version}-%{release}
40#Requires: ghc-OTHERMODULE-prof
41
42%description prof
43Profiling %{pkgname} library for GHC. Should be installed when
44GHC's profiling subsystem is needed.
45
46%description prof -l pl.UTF-8
47Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
48kiedy potrzebujemy systemu profilującego z GHC.
49
50%prep
51%setup -q -n %{pkgname}-%{version}
52
53%build
54runhaskell Setup.lhs configure -v2 \
55 %{?with_prof:--enable-library-profiling} \
56 --prefix=%{_prefix} \
57 --libdir=%{_libdir} \
58 --libexecdir=%{_libexecdir} \
59 --docdir=%{_docdir}/%{name}-%{version}
60
61runhaskell Setup.lhs build
62runhaskell Setup.lhs haddock --executables
63
64%install
65rm -rf $RPM_BUILD_ROOT
66install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
67
68runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
69
70# work around automatic haddock docs installation
71%{__rm} -rf %{name}-%{version}-doc
72cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
73%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
74
75runhaskell Setup.lhs register \
76 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%post
82%ghc_pkg_recache
83
84%postun
85%ghc_pkg_recache
86
87%files
88%defattr(644,root,root,755)
89%doc NEWS %{name}-%{version}-doc/*
90%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
91%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
92%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
93%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
94%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
95
96%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE
97%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.hi
98
99%if %{with prof}
100%files prof
101%defattr(644,root,root,755)
102%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
103%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/PACKAGE/*.p_hi
104%endif
This page took 0.053557 seconds and 4 git commands to generate.