]> git.pld-linux.org Git - packages/ghc-data-default-instances-containers.git/blob - ghc-data-default-instances-containers.spec
554cb2325fd40dc171303b02b364d04bb9d511ab
[packages/ghc-data-default-instances-containers.git] / ghc-data-default-instances-containers.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname data-default-instances-containers
6 Summary:        Default instances for containers
7 Summary(pl.UTF-8):      Domyślne instancje dla kontenerów
8 Name:           ghc-%{pkgname}
9 Version:        0.0.1
10 Release:        2
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/data-default-instances-containers
14 Source0:        http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  1c574d87bf9bc69d4748e3236d575a3c
16 URL:            http://hackage.haskell.org/package/data-default-instances-containers
17 BuildRequires:  ghc >= 6.12.3
18 BuildRequires:  ghc-base >= 2
19 BuildRequires:  ghc-base < 5
20 BuildRequires:  ghc-containers
21 BuildRequires:  ghc-data-default-class
22 %if %{with prof}
23 BuildRequires:  ghc-prof >= 6.12.3
24 BuildRequires:  ghc-base-prof >= 2
25 BuildRequires:  ghc-base-prof < 5
26 BuildRequires:  ghc-containers-prof
27 BuildRequires:  ghc-data-default-class-prof
28 %endif
29 BuildRequires:  rpmbuild(macros) >= 1.608
30 %requires_eq    ghc
31 Requires:       ghc-base >= 2
32 Requires:       ghc-base < 5
33 Requires:       ghc-containers
34 Requires:       ghc-data-default-class
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 # debuginfo is not useful for ghc
38 %define         _enable_debug_packages  0
39
40 # don't compress haddock files
41 %define         _noautocompressdoc      *.haddock
42
43 %description
44 This module defines 'Default' instances for the types 'S.Set',
45 'M.Map', 'IntMap', 'IntSet', 'Seq', and 'Tree'.
46
47 %description -l pl.UTF-8
48 Ten moduł definiuje domyślne instancje ('Default') dla typów: 'S.Set',
49 'M.Map', 'IntMap', 'IntSet', 'Seq' oraz 'Tree'.
50
51 %package prof
52 Summary:        Profiling %{pkgname} library for GHC
53 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       ghc-base-prof >= 2
57 Requires:       ghc-base-prof < 5
58 Requires:       ghc-containers-prof
59 Requires:       ghc-data-default-class-prof
60
61 %description prof
62 Profiling %{pkgname} library for GHC. Should be installed when
63 GHC's profiling subsystem is needed.
64
65 %description prof -l pl.UTF-8
66 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
67 kiedy potrzebujemy systemu profilującego z GHC.
68
69 %package doc
70 Summary:        HTML documentation for ghc %{pkgname} package
71 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
72 Group:          Documentation
73
74 %description doc
75 HTML documentation for ghc %{pkgname} package.
76
77 %description doc -l pl.UTF-8
78 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
79
80 %prep
81 %setup -q -n %{pkgname}-%{version}
82
83 %build
84 runhaskell Setup.lhs configure -v2 \
85         %{?with_prof:--enable-library-profiling} \
86         --prefix=%{_prefix} \
87         --libdir=%{_libdir} \
88         --libexecdir=%{_libexecdir} \
89         --docdir=%{_docdir}/%{name}-%{version}
90
91 runhaskell Setup.lhs build
92 runhaskell Setup.lhs haddock --executables
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
97
98 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
99
100 # work around automatic haddock docs installation
101 %{__rm} -rf %{name}-%{version}-doc
102 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
103 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
104
105 runhaskell Setup.lhs register \
106         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %post
112 %ghc_pkg_recache
113
114 %postun
115 %ghc_pkg_recache
116
117 %files
118 %defattr(644,root,root,755)
119 %doc LICENSE 
120 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
121 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-containers-%{version}-*.so
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-containers-%{version}-*.a
124 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-containers-%{version}-*_p.a
125 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/Containers.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/Containers.dyn_hi
130
131 %if %{with prof}
132 %files prof
133 %defattr(644,root,root,755)
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdata-default-instances-containers-%{version}-*_p.a
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Default/Instances/Containers.p_hi
136 %endif
137
138 %files doc
139 %defattr(644,root,root,755)
140 %doc %{name}-%{version}-doc/*
This page took 0.06176 seconds and 2 git commands to generate.