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