1 %define pkgname snap-server
2 Summary: A fast, iteratee-based, epoll-enabled web server for the Snap Framework
7 Group: Development/Languages
8 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
9 # Source0-md5: 4ee81486fcaf568a9f6ae58a4df1e28a
10 URL: http://hackage.haskell.org/package/snap-server/
11 BuildRequires: ghc >= 6.12.3
12 BuildRequires: ghc-prof
13 BuildRequires: ghc-attoparsec
14 BuildRequires: ghc-attoparsec-prof
15 BuildRequires: ghc-attoparsec-enumerator
16 BuildRequires: ghc-attoparsec-enumerator-prof
17 BuildRequires: ghc-blaze-builder >= 0.2.1.4
18 BuildRequires: ghc-blaze-builder-prof >= 0.2.1.4
19 BuildRequires: ghc-blaze-builder-enumerator >= 0.2.0
20 BuildRequires: ghc-blaze-builder-enumerator-prof >= 0.2.0
21 BuildRequires: ghc-enumerator >= 0.4.15
22 BuildRequires: ghc-enumerator-prof >= 0.4.15
23 BuildRequires: ghc-MonadCatchIO-transformers >= 0.2.1
24 BuildRequires: ghc-MonadCatchIO-transformers-prof >= 0.2.1
25 BuildRequires: ghc-snap-core >= 0.9.3
26 BuildRequires: ghc-snap-core-prof >= 0.9.3
27 BuildRequires: ghc-unix-compat >= 0.2
28 BuildRequires: ghc-unix-compat-prof >= 0.2
29 BuildRequires: rpmbuild(macros) >= 1.608
31 Requires(post,postun): /usr/bin/ghc-pkg
32 Requires: ghc-attoparsec-enumerator
33 Requires: ghc-blaze-builder >= 0.2.1.4
34 Requires: ghc-blaze-builder-enumerator >= 0.2.0
35 Requires: ghc-enumerator >= 0.4.15
36 Requires: ghc-MonadCatchIO-transformers >= 0.2.1
37 %requires_eq ghc-snap-core
38 Requires: ghc-unix-compat >= 0.2
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 # debuginfo is not useful for ghc
42 %define _enable_debug_packages 0
44 # don't compress haddoc files
45 %define _noautocompressdoc *.haddock
48 Snap is a simple and fast web development framework and server written
49 in Haskell. For more information or to download the latest version,
50 you can visit the Snap project website at http://snapframework.com/.
52 The Snap HTTP server is a high performance, epoll-enabled,
53 iteratee-based web server library written in Haskell. Together with
54 the snap-core library upon which it depends, it provides a clean and
55 efficient Haskell programming interface to the HTTP protocol.
58 Summary: Profiling %{pkgname} library for GHC
59 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
60 Group: Development/Libraries
61 Requires: %{name} = %{version}-%{release}
62 BuildRequires: ghc-attoparsec-prof
63 BuildRequires: ghc-attoparsec-enumerator-prof
64 BuildRequires: ghc-blaze-builder-prof
65 BuildRequires: ghc-blaze-builder-enumerator-prof
66 BuildRequires: ghc-enumerator-prof
67 BuildRequires: ghc-MonadCatchIO-transformers-prof
68 BuildRequires: ghc-snap-core-prof
69 BuildRequires: ghc-unix-compat-prof
72 Profiling %{pkgname} library for GHC. Should be installed when
73 GHC's profiling subsystem is needed.
75 %description prof -l pl.UTF-8
76 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
77 kiedy potrzebujemy systemu profilującego z GHC.
80 %setup -q -n %{pkgname}-%{version}
83 runhaskell Setup.hs configure -v2 --enable-library-profiling \
86 --libexecdir=%{_libexecdir} \
87 --docdir=%{_docdir}/%{name}-%{version}
89 runhaskell Setup.hs build
90 runhaskell Setup.hs haddock --executables
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
96 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
98 # work around automatic haddock docs installation
99 %{__rm} -rf %{name}-%{version}-doc
100 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
101 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
103 runhaskell Setup.hs register \
104 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
107 rm -rf $RPM_BUILD_ROOT
116 %defattr(644,root,root,755)
117 %doc CONTRIBUTORS README*
118 %doc %{name}-%{version}-doc/*
119 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
121 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
124 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http/*.hi
129 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http/Server
130 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http/Server/*.hi
131 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/*.hi
134 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/Server
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/Server/*.hi
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
138 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/SendFile
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/SendFile/*.hi
142 %defattr(644,root,root,755)
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
145 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http/*.p_hi
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Http/Server/*.p_hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/*.p_hi
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Snap/Internal/Http/Server/*.p_hi
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/SendFile/*.p_hi