]>
Commit | Line | Data |
---|---|---|
aff86967 JR |
1 | %define pkgname snap-server |
2 | Summary: A fast, iteratee-based, epoll-enabled web server for the Snap Framework | |
3 | Name: ghc-%{pkgname} | |
56b647ce JR |
4 | Version: 0.9.4.0 |
5 | Release: 1 | |
aff86967 JR |
6 | License: BSD |
7 | Group: Development/Languages | |
8 | Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz | |
56b647ce | 9 | # Source0-md5: 4ee81486fcaf568a9f6ae58a4df1e28a |
aff86967 JR |
10 | URL: http://hackage.haskell.org/package/snap-server/ |
11 | BuildRequires: ghc >= 6.12.3 | |
12 | BuildRequires: ghc-prof | |
13f24aa4 JR |
13 | BuildRequires: ghc-attoparsec |
14 | BuildRequires: ghc-attoparsec-prof | |
aff86967 | 15 | BuildRequires: ghc-attoparsec-enumerator |
13f24aa4 | 16 | BuildRequires: ghc-attoparsec-enumerator-prof |
aff86967 | 17 | BuildRequires: ghc-blaze-builder >= 0.2.1.4 |
13f24aa4 | 18 | BuildRequires: ghc-blaze-builder-prof >= 0.2.1.4 |
aff86967 | 19 | BuildRequires: ghc-blaze-builder-enumerator >= 0.2.0 |
13f24aa4 | 20 | BuildRequires: ghc-blaze-builder-enumerator-prof >= 0.2.0 |
aff86967 | 21 | BuildRequires: ghc-enumerator >= 0.4.15 |
13f24aa4 | 22 | BuildRequires: ghc-enumerator-prof >= 0.4.15 |
aff86967 | 23 | BuildRequires: ghc-MonadCatchIO-transformers >= 0.2.1 |
13f24aa4 | 24 | BuildRequires: ghc-MonadCatchIO-transformers-prof >= 0.2.1 |
aff86967 | 25 | BuildRequires: ghc-snap-core >= 0.9.3 |
13f24aa4 | 26 | BuildRequires: ghc-snap-core-prof >= 0.9.3 |
aff86967 | 27 | BuildRequires: ghc-unix-compat >= 0.2 |
13f24aa4 | 28 | BuildRequires: ghc-unix-compat-prof >= 0.2 |
aff86967 | 29 | BuildRequires: rpmbuild(macros) >= 1.608 |
0b425514 | 30 | %requires_eq ghc |
aff86967 JR |
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 | |
52232f01 | 37 | %requires_eq ghc-snap-core |
aff86967 JR |
38 | Requires: ghc-unix-compat >= 0.2 |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
40 | ||
41 | # debuginfo is not useful for ghc | |
42 | %define _enable_debug_packages 0 | |
43 | ||
44 | # don't compress haddoc files | |
45 | %define _noautocompressdoc *.haddock | |
46 | ||
47 | %description | |
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/. | |
51 | ||
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. | |
56 | ||
57 | %package prof | |
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} | |
13f24aa4 JR |
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 | |
aff86967 JR |
70 | |
71 | %description prof | |
72 | Profiling %{pkgname} library for GHC. Should be installed when | |
73 | GHC's profiling subsystem is needed. | |
74 | ||
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. | |
78 | ||
79 | %prep | |
80 | %setup -q -n %{pkgname}-%{version} | |
81 | ||
82 | %build | |
83 | runhaskell Setup.hs configure -v2 --enable-library-profiling \ | |
84 | --prefix=%{_prefix} \ | |
85 | --libdir=%{_libdir} \ | |
86 | --libexecdir=%{_libexecdir} \ | |
87 | --docdir=%{_docdir}/%{name}-%{version} | |
88 | ||
89 | runhaskell Setup.hs build | |
90 | runhaskell Setup.hs haddock --executables | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
95 | ||
96 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
97 | ||
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} | |
102 | ||
103 | runhaskell Setup.hs register \ | |
104 | --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %post | |
110 | %ghc_pkg_recache | |
111 | ||
112 | %postun | |
113 | %ghc_pkg_recache | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
13f24aa4 | 117 | %doc CONTRIBUTORS README* |
aff86967 JR |
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 | |
13f24aa4 | 123 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi |
aff86967 JR |
124 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a |
125 | ||
13f24aa4 JR |
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 | |
aff86967 JR |
140 | |
141 | %files prof | |
142 | %defattr(644,root,root,755) | |
143 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a | |
13f24aa4 JR |
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 |