]> git.pld-linux.org Git - SPECS.git/blob - ghc-X11.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ghc-X11.spec
1 %define         pkgname X11
2 Summary:        A Haskell binding to the X11 graphics library
3 Name:           ghc-%{pkgname}
4 Version:        1.9.1
5 Release:        1
6 License:        BSD
7 Group:          Development/Languages
8 Source0:        http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5:  71af9399de42c9e41b52020499947833
10 URL:            http://hackage.haskell.org/package/X11/
11 BuildRequires:  autoconf
12 BuildRequires:  automake
13 BuildRequires:  ghc >= 6.12.3
14 BuildRequires:  ghc-data-default
15 BuildRequires:  rpmbuild(macros) >= 1.608
16 BuildRequires:  xorg-lib-libX11-devel
17 BuildRequires:  xorg-lib-libXext-devel
18 BuildRequires:  xorg-lib-libXinerama-devel
19 BuildRequires:  xorg-lib-libXrandr-devel
20 BuildRequires:  xorg-lib-libXScrnSaver-devel
21 BuildRequires:  xorg-proto-xproto-devel
22 %requires_eq    ghc
23 Requires:       ghc-data-default
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # debuginfo is not useful for ghc
27 %define         _enable_debug_packages  0
28
29 %description
30 A Haskell binding to the X11 graphics library.
31
32 %package doc
33 Summary:        HTML documentation for %{pkgname}
34 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla %{pkgname}
35 Group:          Documentation
36
37 %description doc
38 HTML documentation for %{pkgname}.
39
40 %description doc -l pl.UTF-8
41 Dokumentacja w formacie HTML dla %{pkgname}.
42
43 %prep
44 %setup -q -n %{pkgname}-%{version}
45
46 %build
47 %{__aclocal}
48 %{__autoconf}
49 %{__autoheader}
50 runhaskell Setup.hs configure -v2 \
51         --prefix=%{_prefix} \
52         --libdir=%{_libdir} \
53         --libexecdir=%{_libexecdir} \
54         --docdir=%{_docdir}/%{name}-%{version}
55
56 runhaskell Setup.hs build
57 runhaskell Setup.hs haddock --executables
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
62
63 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
64
65 # work around automatic haddock docs installation
66 rm -rf %{name}-%{version}-doc
67 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
68 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
69
70 runhaskell Setup.hs register \
71         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %post
77 %ghc_pkg_recache
78
79 %postun
80 %ghc_pkg_recache
81
82 %files
83 %defattr(644,root,root,755)
84 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
85 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
86
87 %files doc
88 %defattr(644,root,root,755)
89 %doc %{name}-%{version}-doc/*
This page took 0.498947 seconds and 3 git commands to generate.