source: projects/specs/trunk/h/haskell-platform/haskell-platform-vl.spec @ 10913

Revision 10913, 10.7 KB checked in by ara_t, 7 years ago (diff)

haskell-platform: update to 2016.8.0.1

Line 
1%define pkg_name     haskell-platform
2%define year_version 2016
3%define pkg_version  8.0.1
4%define pkg_release  1%{?_dist_release}
5
6%define ghc_version 8.0.1
7
8%define hscolour_version 1.24
9%define cabal_version 1.24.0.0
10%define stack_version 1.1.2
11
12# to fix wrong dependencies in cabal files
13# do not use '-'
14%define ed25519_version 0.0.5.0
15%define hackagesecurity_version 0.5.2.2
16
17%define hastache_version 0.6.1
18%define oldlocale_version 1.0.0.7
19%define oldtime_version 1.1.0.3
20%define utf8string_version 1.0.1.1
21
22
23%ifarch %{ix86}
24%define rpmarch i386
25%endif
26%ifarch x86_64
27%define rpmarch x86_64
28%endif
29
30
31Summary: An advanced purely-functional programming language
32Name:    %{pkg_name}
33Version: %{year_version}.%{pkg_version}
34Release: %{pkg_release}
35
36License: BSD-like
37Group:   Applications/Languages
38
39Source0: %{name}-%{pkg_version}.tar.gz
40
41Source1: packages.cabal-install
42Source2: packages.stack
43
44# LTS Haskell 7.18 (ghc-8.0.1): Published on 2017-01-29
45# cabal-install
46# num=11; for pkg in `cat packages.cabal-install`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
47Source11: base16-bytestring-0.1.1.6.tar.gz
48Source12: base64-bytestring-1.0.0.1.tar.gz
49Source13: cryptohash-sha256-0.11.100.1.tar.gz
50Source14: ed25519-0.0.5.0.tar.gz
51Source15: tar-0.5.0.3.tar.gz
52Source16: hackage-security-0.5.2.2.tar.gz
53Source17: cabal-install-1.24.0.0.tar.gz
54
55# stack
56# num=101; for pkg in `cat packages.stack`; do echo "Source${num}: ${pkg}.tar.gz"; num=`expr ${num} + 1`; done
57Source101: SHA-1.6.4.2.tar.gz
58Source102: ansi-terminal-0.6.2.3.tar.gz
59Source103: ansi-wl-pprint-0.6.7.3.tar.gz
60Source104: auto-update-0.1.4.tar.gz
61Source105: base-compat-0.9.1.tar.gz
62Source106: base-orphans-0.5.4.tar.gz
63Source107: blaze-builder-0.4.0.2.tar.gz
64Source108: blaze-markup-0.7.1.1.tar.gz
65Source109: blaze-html-0.8.1.3.tar.gz
66Source110: byteable-0.1.1.tar.gz
67Source111: bytestring-builder-0.10.8.1.0.tar.gz
68Source112: cereal-0.5.4.0.tar.gz
69Source113: data-default-class-0.1.2.0.tar.gz
70Source114: digest-0.0.1.2.tar.gz
71Source115: dlist-0.8.0.2.tar.gz
72Source116: transformers-compat-0.5.1.4.tar.gz
73Source117: Glob-0.7.14.tar.gz
74Source118: easy-file-0.2.1.tar.gz
75Source119: edit-distance-0.2.2.1.tar.gz
76Source120: extra-1.4.10.tar.gz
77Source121: fail-4.9.0.0.tar.gz
78Source122: filelock-0.1.0.1.tar.gz
79Source123: generic-deriving-1.11.1.tar.gz
80Source124: generics-sop-0.2.3.0.tar.gz
81Source125: gitrev-1.2.0.tar.gz
82Source126: hinotify-0.3.9.tar.gz
83Source127: hourglass-0.2.10.tar.gz
84Source128: http-types-0.9.1.tar.gz
85Source129: ieee754-0.7.9.tar.gz
86Source130: hastache-0.6.1.tar.gz
87Source131: memory-0.13.tar.gz
88Source132: asn1-types-0.3.2.tar.gz
89Source133: asn1-encoding-0.9.4.tar.gz
90Source134: asn1-parse-0.9.4.tar.gz
91Source135: cryptonite-0.21.tar.gz
92Source136: cryptohash-0.11.9.tar.gz
93Source137: microlens-0.4.7.0.tar.gz
94Source138: mime-types-0.1.0.7.tar.gz
95Source139: monad-loops-0.4.3.tar.gz
96Source140: nats-1.1.1.tar.gz
97Source141: old-locale-1.0.0.7.tar.gz
98Source142: cookie-0.4.2.1.tar.gz
99Source143: old-time-1.1.0.3.tar.gz
100Source144: open-browser-0.2.1.0.tar.gz
101Source145: path-pieces-0.2.1.tar.gz
102Source146: patience-0.1.1.tar.gz
103Source147: pem-0.2.2.tar.gz
104Source148: prelude-extras-0.4.0.3.tar.gz
105Source149: regex-applicative-0.3.3.tar.gz
106Source150: regex-applicative-text-0.1.0.1.tar.gz
107Source151: safe-0.3.11.tar.gz
108Source152: semigroups-0.18.2.tar.gz
109Source153: silently-1.2.5.tar.gz
110Source154: socks-0.5.5.tar.gz
111Source155: split-0.2.3.1.tar.gz
112Source156: stm-chans-3.0.0.4.tar.gz
113Source157: streaming-commons-0.1.17.tar.gz
114Source158: system-filepath-0.4.13.4.tar.gz
115Source159: system-fileio-0.3.16.3.tar.gz
116Source160: tagged-0.8.5.tar.gz
117Source161: aeson-0.11.3.0.tar.gz
118Source162: binary-tagged-0.1.4.2.tar.gz
119Source163: text-binary-0.2.1.1.tar.gz
120Source164: time-locale-compat-0.1.1.3.tar.gz
121Source165: http-api-data-0.2.4.tar.gz
122Source166: MonadRandom-0.4.2.3.tar.gz
123Source167: constraints-0.8.tar.gz
124Source168: distributive-0.5.1.tar.gz
125Source169: exceptions-0.8.3.tar.gz
126Source170: aeson-compat-0.3.6.tar.gz
127Source171: http-client-0.4.31.2.tar.gz
128Source172: mmorph-1.0.9.tar.gz
129Source173: optparse-applicative-0.12.1.0.tar.gz
130Source174: path-0.5.11.tar.gz
131Source175: retry-0.7.4.2.tar.gz
132Source176: temporary-1.2.0.4.tar.gz
133Source177: unix-compat-0.4.3.1.tar.gz
134Source178: path-io-1.2.2.tar.gz
135Source179: transformers-base-0.4.4.tar.gz
136Source180: monad-control-1.0.1.0.tar.gz
137Source181: lifted-base-0.2.3.8.tar.gz
138Source182: enclosed-exceptions-1.0.2.tar.gz
139Source183: monad-unlift-0.2.0.tar.gz
140Source184: resource-pool-0.2.3.2.tar.gz
141Source185: resourcet-1.1.9.tar.gz
142Source186: conduit-1.2.8.tar.gz
143Source187: conduit-extra-1.1.15.tar.gz
144Source188: cryptohash-conduit-0.1.1.tar.gz
145Source189: project-template-0.2.0.tar.gz
146Source190: unexceptionalio-0.3.0.tar.gz
147Source191: errors-2.1.3.tar.gz
148Source192: fsnotify-0.2.1.tar.gz
149Source193: unix-time-0.3.7.tar.gz
150Source194: fast-logger-2.4.8.tar.gz
151Source195: monad-logger-0.3.20.1.tar.gz
152Source196: persistent-2.6.tar.gz
153Source197: persistent-sqlite-2.6.tar.gz
154Source198: persistent-template-2.5.1.6.tar.gz
155Source199: utf8-string-1.0.1.1.tar.gz
156Source200: vector-binary-instances-0.2.3.4.tar.gz
157Source201: void-0.7.1.tar.gz
158Source202: contravariant-1.4.tar.gz
159Source203: comonad-5.tar.gz
160Source204: bifunctors-5.4.1.tar.gz
161Source205: profunctors-5.2.tar.gz
162Source206: semigroupoids-5.1.tar.gz
163Source207: free-4.12.4.tar.gz
164Source208: either-4.4.1.1.tar.gz
165Source209: optparse-simple-0.0.3.tar.gz
166Source210: x509-1.6.5.tar.gz
167Source211: x509-store-1.6.2.tar.gz
168Source212: x509-system-1.6.4.tar.gz
169Source213: x509-validation-1.6.5.tar.gz
170Source214: tls-1.3.9.tar.gz
171Source215: connection-0.2.7.tar.gz
172Source216: http-client-tls-0.2.4.1.tar.gz
173Source217: http-conduit-2.1.11.tar.gz
174Source218: yaml-0.8.21.2.tar.gz
175Source219: hpack-0.14.1.tar.gz
176Source220: zip-archive-0.3.0.5.tar.gz
177Source221: zlib-bindings-0.1.1.5.tar.gz
178Source222: hit-0.6.3.tar.gz
179Source223: stack-1.1.2.tar.gz
180
181# to fix wrong dependencies in cabal files
182Source301: ed25519.cabal
183
184Source401: hastache.cabal
185Source402: old-locale.cabal
186Source403: old-time.cabal
187Source404: utf8-string.cabal
188Source405: stack.cabal
189
190BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
191
192BuildRequires: ghc = %{ghc_version}
193BuildRequires: gmp-devel zlib-devel freeglut-devel
194BuildRequires: libffi-devel
195BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
196
197Requires: ghc = %{ghc_version}
198Requires: freeglut-devel
199
200Conflicts: alex
201Conflicts: happy
202Conflicts: haskell-platform-base
203Conflicts: cabal-install
204Conflicts: hscolour
205
206Vendor: Project Vine
207Distribution: Vine Linux
208Packager: ara_t
209
210
211%description
212Haskell is a computer programming language.
213In particular, it is a polymorphically statically typed, lazy, purely
214functional language, quite different from most other programming languages.
215The language is named for Haskell Brooks Curry, whose work in mathematical
216logic serves as a foundation for functional languages.
217
218
219%prep
220%{__rm} -rf ${RPM_BUILD_ROOT}
221%setup -q -n %{name}-%{pkg_version}
222
223%build
224PKGNAME=%{name}-%{version}
225PKGCONFDIR=${RPM_BUILD_ROOT}%{_libdir}/ghc-%{ghc_version}/package.conf.d
226%{__mkdir_p} ${PKGCONFDIR}
227
228export PATH=${RPM_BUILD_ROOT}%{_bindir}:${HOME}/.cabal/bin:${PATH}
229export LANG=en_US.utf8
230
231# hscolour (bootstrap)
232pkg=hscolour-%{hscolour_version}
233cd %{_builddir}/%{name}-%{pkg_version}/packages/${pkg}
234ghc --make Setup
235./Setup configure --user
236./Setup build
237./Setup copy
238./Setup register --inplace
239
240# haskell-platform
241cd %{_builddir}/%{name}-%{pkg_version}
242cd packages
243for pkg in `cat ../etc/build.packages`; do
244    cd ${pkg}
245    ghc --make Setup
246    ./Setup configure \
247            --user \
248            --prefix=%{_prefix} \
249            --libdir=%{_libdir}/${PKGNAME}/${pkg} \
250            --libsubdir= \
251            --datadir=%{_datadir}/${PKGNAME}/${pkg} \
252            --datasubdir= \
253            --docdir=%{_docdir}/${PKGNAME}/${pkg}
254
255    ./Setup build
256    ./Setup haddock || :
257    ./Setup copy --destdir=${RPM_BUILD_ROOT}
258    ./Setup register --inplace
259    ./Setup register --gen-pkg-config=${PKGCONFDIR}/${pkg}.conf
260    cd ..
261done
262
263# cabal-install
264cd %{_builddir}
265for pkg in `cat %{SOURCE1}`; do
266    %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
267    cd ${pkg}
268    # fix wrong dependencies
269    case ${pkg} in
270        "ed25519-%{ed25519_version}") %{__cp} %{SOURCE301} . ;;
271        *) ;;
272    esac
273
274    ghc --make Setup
275    if [ ${pkg} = "cabal-install-%{cabal_version}" ]
276    then
277        ./Setup configure \
278                --user \
279                --prefix=%{_prefix} \
280                --docdir=%{_docdir}/${PKGNAME}/${pkg}
281
282        ./Setup build
283        ./Setup copy --destdir=${RPM_BUILD_ROOT}
284    else
285        ./Setup configure --user
286        ./Setup build
287        ./Setup copy
288        ./Setup register --inplace
289    fi
290    cd ..
291done
292
293# stack
294cd %{_builddir}
295for pkg in `cat %{SOURCE2}`; do
296    %{__tar} xzf %{_sourcedir}/${pkg}.tar.gz
297    cd ${pkg}
298    # fix wrong dependencies
299    case ${pkg} in
300        "hastache-%{hastache_version}")      %{__cp} %{SOURCE401} . ;;
301        "old-locale-%{oldlocale_version}")   %{__cp} %{SOURCE402} . ;;
302        "old-time-%{oldtime_version}")       %{__cp} %{SOURCE403} . ;;
303        "utf8-string-%{utf8string_version}") %{__cp} %{SOURCE404} . ;;
304        "stack-%{stack_version}")            %{__cp} %{SOURCE405} . ;;
305        *) ;;
306    esac
307
308    if [ ${pkg} = "stack-%{stack_version}" ]
309    then
310        cabal install --enable-documentation
311    else
312        cabal install
313    fi
314    cd ..
315done
316
317%install
318# stack
319%{__install} -m 755 ${HOME}/.cabal/bin/stack \
320 ${RPM_BUILD_ROOT}%{_bindir}
321
322cd ${HOME}/.cabal/share/doc/%{rpmarch}-linux-ghc-%{ghc_version}
323%{__mv} stack-%{stack_version} \
324 ${RPM_BUILD_ROOT}%{_docdir}/%{name}-%{version}
325
326# hscolour
327cd ${RPM_BUILD_ROOT}%{_bindir}
328%{__ln_s} HsColour hscolour
329
330%clean
331%{__rm} -rf ${RPM_BUILD_ROOT}
332
333%post
334ghc-pkg recache
335
336%postun
337ghc-pkg recache
338
339
340%files
341%defattr(-, root, root)
342%{_bindir}/
343%{_libdir}/%{name}-%{version}/
344%{_libdir}/ghc-%{ghc_version}/package.conf.d/
345%{_datadir}/%{name}-%{version}/
346%{_docdir}/%{name}-%{version}/
347%{_mandir}/man1/
348
349
350%changelog
351* Wed Feb 01 2017 Toshiaki Ara <ara_t@384.jp> 2016.8.0.1-1
352- update to 2016.8.0.1
353
354* Tue May 03 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-3
355- modify SPEC file without usage of cabal-install
356
357* Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-2
358- correct SPEC file
359
360* Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 2015.7.10.3-1
361- update to 7.10.3
362
363* Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-4
364- delete subpackage cabal-install
365- delete %%{cabal_version} from Requires: cabal-install-%%{cabal_version}
366- add BuildRequires: libffi-devel
367
368* Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-3
369- correct Requires
370
371* Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
372- install Haskell libraries into %%{_libdir}/ghc-lib
373- add BuildRequires: hscolour
374- devide insto subpackages
375
376* Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
377- new package
Note: See TracBrowser for help on using the repository browser.