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