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