]> git.pld-linux.org Git - packages/ghc-hourglass.git/blob - ghc-hourglass.spec
- new
[packages/ghc-hourglass.git] / ghc-hourglass.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname hourglass
6 Summary:        Simple performant time related library
7 Name:           ghc-%{pkgname}
8 Version:        0.2.12
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/hourglass
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  73b123130a9d1c3c096c6895e3a4915f
15 URL:            http://hackage.haskell.org/package/hourglass
16 BuildRequires:  ghc >= 6.12.3
17 %if %{with prof}
18 BuildRequires:  ghc-prof
19 %endif
20 BuildRequires:  rpmbuild(macros) >= 1.608
21 %requires_eq    ghc
22 Requires(post,postun):  /usr/bin/ghc-pkg
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 # debuginfo is not useful for ghc
26 %define         _enable_debug_packages  0
27
28 # don't compress haddock files
29 %define         _noautocompressdoc      *.haddock
30
31 %description
32 Simple time library focusing on simple but powerful and performant
33 API.
34
35 %package prof
36 Summary:        Profiling %{pkgname} library for GHC
37 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
38 Group:          Development/Libraries
39 Requires:       %{name} = %{version}-%{release}
40
41 %description prof
42 Profiling %{pkgname} library for GHC.  Should be installed when
43 GHC's profiling subsystem is needed.
44
45 %description prof -l pl.UTF-8
46 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
47 kiedy potrzebujemy systemu profilującego z GHC.
48
49 %prep
50 %setup -q -n %{pkgname}-%{version}
51
52 %build
53 runhaskell Setup.hs configure -v2 \
54         %{?with_prof:--enable-library-profiling} \
55         --prefix=%{_prefix} \
56         --libdir=%{_libdir} \
57         --libexecdir=%{_libexecdir} \
58         --docdir=%{_docdir}/%{name}-%{version}
59
60 runhaskell Setup.hs build
61 runhaskell Setup.hs haddock --executables
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
66
67 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
68
69 # work around automatic haddock docs installation
70 %{__rm} -rf %{name}-%{version}-doc
71 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
72 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
73
74 runhaskell Setup.hs register \
75         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 %ghc_pkg_recache
82
83 %postun
84 %ghc_pkg_recache
85
86 %files
87 %defattr(644,root,root,755)
88 %doc CHANGELOG.md README.md %{name}-%{version}-doc/*
89 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
90 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
92 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
93 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
94
95 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
97 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
98 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass
99 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/*.hi
100 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/*.dyn_hi
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/Internal
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/Internal/*.hi
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/Internal/*.dyn_hi
104 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Time
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Time/*.hi
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Time/*.dyn_hi
110
111 %if %{with prof}
112 %files prof
113 %defattr(644,root,root,755)
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/*.p_hi
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Hourglass/Internal/*.p_hi
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Time/*.p_hi
120 %endif
This page took 0.312099 seconds and 3 git commands to generate.