]> git.pld-linux.org Git - packages/ghc-Glob.git/blob - ghc-Glob.spec
updated deps
[packages/ghc-Glob.git] / ghc-Glob.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname Glob
6 Summary:        Globbing library
7 Name:           ghc-%{pkgname}
8 Version:        0.10.0
9 Release:        1
10 License:        BSD
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/Glob
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  2285d0dc5d5810b92a48a7f0576affe4
15 URL:            http://hackage.haskell.org/package/Glob
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-base >= 4
18 BuildRequires:  ghc-containers
19 BuildRequires:  ghc-directory
20 BuildRequires:  ghc-dlist >= 0.4
21 BuildRequires:  ghc-filepath >= 1.1
22 BuildRequires:  ghc-transformers >= 0.2
23 BuildRequires:  ghc-transformers-compat >= 0.3
24 %if %{with prof}
25 BuildRequires:  ghc-prof
26 BuildRequires:  ghc-base-prof >= 4
27 BuildRequires:  ghc-containers-prof
28 BuildRequires:  ghc-directory-prof
29 BuildRequires:  ghc-dlist-prof >= 0.4
30 BuildRequires:  ghc-filepath-prof >= 1.1
31 BuildRequires:  ghc-transformers-prof >= 0.2
32 BuildRequires:  ghc-transformers-compat-prof >= 0.3
33 %endif
34 BuildRequires:  rpmbuild(macros) >= 1.608
35 %requires_eq    ghc
36 Requires(post,postun):  /usr/bin/ghc-pkg
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # debuginfo is not useful for ghc
40 %define         _enable_debug_packages  0
41
42 # don't compress haddock files
43 %define         _noautocompressdoc      *.haddock
44
45 %description
46 A library for globbing: matching patterns against file paths.
47
48 %package prof
49 Summary:        Profiling %{pkgname} library for GHC
50 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53
54 %description prof
55 Profiling %{pkgname} library for GHC.  Should be installed when
56 GHC's profiling subsystem is needed.
57
58 %description prof -l pl.UTF-8
59 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
60 kiedy potrzebujemy systemu profilującego z GHC.
61
62 %prep
63 %setup -q -n %{pkgname}-%{version}
64
65 %build
66 runhaskell 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
73 runhaskell Setup.hs build
74 runhaskell Setup.hs haddock --executables
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
79
80 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
81
82 # work around automatic haddock docs installation
83 %{__rm} -rf %{name}-%{version}-doc
84 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
85 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
86
87 runhaskell Setup.hs register \
88         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89
90 %clean
91 rm -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 CHANGELOG.txt CREDITS.txt README.txt %{name}-%{version}-doc/*
102 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
106 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
107
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/*.hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/*.dyn_hi
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/Glob
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/Glob/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/Glob/*.dyn_hi
115
116 %if %{with prof}
117 %files prof
118 %defattr(644,root,root,755)
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/*.p_hi
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/FilePath/Glob/*.p_hi
122 %endif
This page took 0.181534 seconds and 3 git commands to generate.