source: trunk/server/fedora/specs/ghc-unix-handle.spec @ 1590

Last change on this file since 1590 was 1590, checked in by andersk, 14 years ago
Package new static-cat written in Haskell. This adds support for Content-Encoding, If-Modified-Since, Range, If-Range, and REQUEST_METHOD.
File size: 2.7 KB
Line 
1%global pkg_name unix-handle
2
3%bcond_without doc
4%bcond_without prof
5
6# ghc does not emit debug information
7%global debug_package %{nil}
8
9Name:           ghc-%{pkg_name}
10Version:        0.0.0
11Release:        0.%{scriptsversion}%{?dist}
12Summary:        Haskell %{pkg_name} library
13
14Group:          Development/Libraries
15License:        BSD
16URL:            http://hackage.haskell.org/cgi-bin/hackage-scripts/package/%{pkg_name}
17Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
18BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
19# fedora ghc archs:
20ExclusiveArch:  %{ix86} x86_64 ppc alpha
21BuildRequires:  ghc, ghc-rpm-macros
22%if %{with doc}
23BuildRequires:  ghc-doc
24%endif
25%if %{with prof}
26BuildRequires:  ghc-prof
27%endif
28
29%description
30This package provides the Haskell %{pkg_name} library for ghc.
31
32
33%package devel
34Summary:        Haskell %{pkg_name} library
35Group:          Development/Libraries
36Requires:       ghc = %{ghc_version}
37Requires(post): ghc = %{ghc_version}
38Requires(preun): ghc = %{ghc_version}
39
40%description devel
41This package contains the development files for %{name}
42built for ghc-%{ghc_version}.
43
44
45%if %{with doc}
46%package doc
47Summary:        Documentation for %{name}
48Group:          Development/Libraries
49Requires:       ghc-doc = %{ghc_version}
50Requires(post): ghc-doc = %{ghc_version}
51Requires(postun): ghc-doc = %{ghc_version}
52
53%description doc
54This package contains development documentation files for
55the %{name} library.
56%endif
57
58
59%if %{with prof}
60%package prof
61Summary:        Profiling libraries for %{name}
62Group:          Development/Libraries
63Requires:       %{name}-devel = %{version}-%{release}
64Requires:       ghc-prof = %{ghc_version}
65
66%description prof
67This package contains profiling libraries for %{name}
68built for ghc-%{ghc_version}.
69%endif
70
71
72%prep
73%setup -q -n %{pkg_name}-%{version}
74
75
76%build
77%cabal_configure --ghc %{?with_prof:-p}
78%cabal build
79%if %{with doc}
80%cabal haddock
81%endif
82%ghc_gen_scripts
83
84
85%install
86rm -rf $RPM_BUILD_ROOT
87%cabal_install
88%ghc_install_scripts
89%ghc_gen_filelists %{name}
90
91
92%clean
93rm -rf $RPM_BUILD_ROOT
94
95
96%post devel
97%ghc_register_pkg
98
99
100%if %{with doc}
101%post doc
102%ghc_reindex_haddock
103%endif
104
105
106%preun devel
107if [ "$1" -eq 0 ] ; then
108  %ghc_unregister_pkg
109fi
110
111
112%if %{with doc}
113%postun doc
114if [ "$1" -eq 0 ] ; then
115  %ghc_reindex_haddock
116fi
117%endif
118
119
120%files devel -f %{name}-devel.files
121%defattr(-,root,root,-)
122%{_docdir}/%{name}-%{version}
123
124
125%if %{with doc}
126%files doc -f %{name}-doc.files
127%defattr(-,root,root,-)
128%endif
129
130
131%if %{with prof}
132%files prof -f %{name}-prof.files
133%defattr(-,root,root,-)
134%endif
135
136
137%changelog
138* Mon Mar 15 2010 Anders Kaseorg <andersk@mit.edu> - 0.0.0-0
139- initial packaging for Fedora automatically generated by cabal2spec
Note: See TracBrowser for help on using the repository browser.