3 %bcond_without prof # profiling library
5 %define pkgname cmdargs
6 Summary: Command line argument processing
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/cmdargs
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: ebc50066c2d38a0ad0f2a446acfea1cd
15 URL: http://hackage.haskell.org/package/cmdargs
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 4.4
18 BuildRequires: ghc-base < 5
19 BuildRequires: ghc-filepath
20 BuildRequires: ghc-process >= 1.0
21 BuildRequires: ghc-transformers >= 0.2
23 BuildRequires: ghc-prof >= 6.12.3
24 BuildRequires: ghc-base-prof >= 4.4
25 BuildRequires: ghc-base-prof < 5
26 BuildRequires: ghc-filepath-prof
27 BuildRequires: ghc-process-prof >= 1.0
28 BuildRequires: ghc-transformers-prof >= 0.2
30 BuildRequires: rpmbuild(macros) >= 1.608
31 Requires(post,postun): /usr/bin/ghc-pkg
33 Requires: ghc-base >= 4.4
34 Requires: ghc-base < 5
35 Requires: ghc-filepath
36 Requires: ghc-process >= 1.0
37 Requires: ghc-transformers >= 0.2
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 # debuginfo is not useful for ghc
41 %define _enable_debug_packages 0
43 # don't compress haddock files
44 %define _noautocompressdoc *.haddock
47 This library provides an easy way to define command line parsers.
50 Summary: Profiling %{pkgname} library for GHC
51 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
54 Requires: ghc-base-prof >= 4.4
55 Requires: ghc-base-prof < 5
56 Requires: ghc-filepath-prof
57 Requires: ghc-process-prof >= 1.0
58 Requires: ghc-transformers-prof >= 0.2
61 Profiling %{pkgname} library for GHC. Should be installed when
62 GHC's profiling subsystem is needed.
64 %description prof -l pl.UTF-8
65 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
66 kiedy potrzebujemy systemu profilującego z GHC.
69 %setup -q -n %{pkgname}-%{version}
72 runhaskell Setup.hs configure -v2 \
73 %{?with_prof:--enable-library-profiling} \
76 --libexecdir=%{_libexecdir} \
77 --docdir=%{_docdir}/%{name}-%{version}
79 runhaskell Setup.hs build
80 runhaskell Setup.hs haddock --executables
83 rm -rf $RPM_BUILD_ROOT
84 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
86 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
88 # work around automatic haddock docs installation
89 %{__rm} -rf %{name}-%{version}-doc
90 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
91 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
93 runhaskell Setup.hs register \
94 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
97 rm -rf $RPM_BUILD_ROOT
106 %defattr(644,root,root,755)
107 %doc %{name}-%{version}-doc/*
108 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HScmdargs-%{version}.o
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScmdargs-%{version}.a
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
113 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/*.hi
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/Any
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/Any/*.hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
118 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.hi
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/*.hi
122 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Implicit
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Implicit/*.hi
124 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Explicit
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Explicit/*.hi
129 %defattr(644,root,root,755)
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHScmdargs-%{version}_p.a
131 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/*.p_hi
132 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Generics/Any/*.p_hi
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.p_hi
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/*.p_hi
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Implicit/*.p_hi
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/CmdArgs/Explicit/*.p_hi