1 %define pkgname alsa-mixer
2 Summary: A Haskell binding to the alsa-mixer graphics library
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: f5384dbbef508bd965dd0c4490b893b2
10 URL: http://hackage.haskell.org/package/alsa-mixer/
11 BuildRequires: alsa-lib-devel
12 BuildRequires: ghc >= 6.12.3
13 BuildRequires: ghc-alsa-core >= 0.5
14 BuildRequires: ghc-c2hs
15 BuildRequires: rpmbuild(macros) >= 1.608
17 Requires: ghc-alsa-core >= 0.5
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 # debuginfo is not useful for ghc
22 %define _enable_debug_packages 0
25 A Haskell binding to the alsa-mixer graphics library.
28 Summary: HTML documentation for %{pkgname}
29 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla %{pkgname}
33 HTML documentation for %{pkgname}.
35 %description doc -l pl.UTF-8
36 Dokumentacja w formacie HTML dla %{pkgname}.
39 %setup -q -n %{pkgname}-%{version}
42 runhaskell Setup.hs configure -v2 \
45 --libexecdir=%{_libexecdir} \
46 --docdir=%{_docdir}/%{name}-%{version}
48 runhaskell Setup.hs build
49 runhaskell Setup.hs haddock --executables
52 rm -rf $RPM_BUILD_ROOT
53 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
55 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
57 # work around automatic haddock docs installation
58 rm -rf %{name}-%{version}-doc
59 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
60 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
62 runhaskell Setup.hs register \
63 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
66 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
76 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
77 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
80 %defattr(644,root,root,755)
81 %doc %{name}-%{version}-doc/*