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