]> git.pld-linux.org Git - SPECS.git/blob - ghc-mime-types.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ghc-mime-types.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname mime-types
6 Summary:        Basic mime-type handling types and functions
7 Name:           ghc-%{pkgname}
8 Version:        0.1.0.9
9 Release:        1
10 License:        MIT
11 Group:          Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/mime-types
13 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5:  e936b48f8549c390e9fac883c99ff3fd
15 URL:            http://hackage.haskell.org/package/mime-types
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 Basic mime-type handling types and functions.
33
34 %package prof
35 Summary:        Profiling %{pkgname} library for GHC
36 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
37 Group:          Development/Libraries
38 Requires:       %{name} = %{version}-%{release}
39
40 %description prof
41 Profiling %{pkgname} library for GHC.  Should be installed when
42 GHC's profiling subsystem is needed.
43
44 %description prof -l pl.UTF-8
45 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
46 kiedy potrzebujemy systemu profilującego z GHC.
47
48 %prep
49 %setup -q -n %{pkgname}-%{version}
50
51 %build
52 runhaskell Setup.lhs configure -v2 \
53         %{?with_prof:--enable-library-profiling} \
54         --prefix=%{_prefix} \
55         --libdir=%{_libdir} \
56         --libexecdir=%{_libexecdir} \
57         --docdir=%{_docdir}/%{name}-%{version}
58
59 runhaskell Setup.lhs build
60 runhaskell Setup.lhs haddock --executables
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
65
66 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
67
68 # work around automatic haddock docs installation
69 %{__rm} -rf %{name}-%{version}-doc
70 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
71 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
72
73 runhaskell Setup.lhs register \
74         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post
80 %ghc_pkg_recache
81
82 %postun
83 %ghc_pkg_recache
84
85 %files
86 %defattr(644,root,root,755)
87 %doc ChangeLog.md README.md %{name}-%{version}-doc/*
88 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
91 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
92 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
93
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.hi
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.dyn_hi
97
98 %if %{with prof}
99 %files prof
100 %defattr(644,root,root,755)
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Network/*.p_hi
103 %endif
This page took 0.902742 seconds and 3 git commands to generate.