]> git.pld-linux.org Git - packages/ghc-MissingH.git/blob - ghc-MissingH.spec
72746491b18ad4b3f856e9e86b37dde849233ad8
[packages/ghc-MissingH.git] / ghc-MissingH.spec
1 %define         pkgname MissingH
2 Summary:        Large utility library
3 Name:           ghc-%{pkgname}
4 Version:        1.1.0.3
5 Release:        4
6 Group:          Libraries
7 # Data/Hash/CRC32/GZip.hs is BSD
8 # Data/Hash/CRC32/Posix.hs is GPL+
9 # System/Path/NameManip.hs is LGPLv2+
10 # System/Time/ParseDate.hs is GPLv2 (newer parsedate is now BSD)
11 # all 40 other src (and testsrc) files are GPLv2+
12 License:        GPL v2+
13 URL:            http://hackage.haskell.org/package/MissingH
14 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  a64af1885d60523fe598b4dad086fa6e
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-HUnit
18 BuildRequires:  ghc-hslogger
19 BuildRequires:  ghc-mtl
20 BuildRequires:  ghc-network
21 BuildRequires:  ghc-parsec
22 BuildRequires:  ghc-prof
23 BuildRequires:  ghc-random
24 BuildRequires:  ghc-regex-compat
25 BuildRequires:  rpmbuild(macros) >= 1.608
26 %requires_eq    ghc
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 # debuginfo is not useful for ghc
30 %define         _enable_debug_packages  0
31
32 %description
33 MissingH is a library of all sorts of utility functions for Haskell
34 programmers. It is written in pure Haskell and thus should be
35 extremely portable and easy to use.
36
37 %package doc
38 Summary:        HTML documentation for %{pkgname}
39 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
40 Group:          Documentation
41
42 %description doc
43 HTML documentation for %{pkgname}.
44
45 %description doc -l pl.UTF-8
46 Dokumentacja w formacie HTML dla %{pkgname}.
47
48 %prep
49 %setup -q -n %{pkgname}-%{version}
50
51 mv COPYRIGHT COPYRIGHT.orig
52 iconv -f iso8859-1 -t utf-8 COPYRIGHT.orig > COPYRIGHT
53
54 %build
55 runhaskell Setup.hs configure -v2 \
56         --prefix=%{_prefix} \
57         --libdir=%{_libdir} \
58         --libexecdir=%{_libexecdir} \
59         --docdir=%{_docdir}/%{name}-%{version}
60
61 runhaskell Setup.hs build
62 runhaskell Setup.hs haddock --executables
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
67
68 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
69
70 # work around automatic haddock docs installation
71 rm -rf %{name}-%{version}-doc
72 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
73
74 runhaskell Setup.hs register \
75         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 %ghc_pkg_recache
82
83 %postun
84 %ghc_pkg_recache
85
86 %files
87 %defattr(644,root,root,755)
88 %doc COPYRIGHT TODO
89 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
90 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
91
92 %files doc
93 %defattr(644,root,root,755)
94 %doc %{name}-%{version}-doc/*
This page took 0.06626 seconds and 2 git commands to generate.