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

Revision 10154, 6.5 KB checked in by ara_t, 8 years ago (diff)

An advanced purely-functional programming language

Line 
1%define pkg_name     haskell-platform
2%define year_version 2015
3%define pkg_version  7.10.3
4%define pkg_release  2%{?_dist_release}
5
6%define ghc_version 7.10.3
7%define alex_version 3.1.4
8%define cabal_version 1.22.6.0
9%define happy_version 1.19.5
10%define hscolour_version 1.23
11
12%ifarch %{ix86}
13%define rpmarch i386
14%endif
15%ifarch x86_64
16%define rpmarch x86_64
17%endif
18
19
20Summary: An advanced purely-functional programming language
21Name:    %{pkg_name}
22Version: %{year_version}.%{pkg_version}
23Release: %{pkg_release}
24
25License: BSD-like
26Group:   Applications/Languages
27
28Source0: %{name}-%{pkg_version}.tar.gz
29
30BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root
31
32BuildRequires: ghc cabal-install
33BuildRequires: ghc-bindist
34BuildRequires: gmp-devel zlib-devel freeglut-devel
35BuildRequires: libffi-devel
36BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl
37BuildRequires: hscolour
38
39Requires: haskell-platform-base = %{version}
40Requires: alex
41Requires: happy
42Requires: cabal-install
43Requires: hscolour
44
45Vendor: Project Vine
46Distribution: Vine Linux
47Packager: ara_t
48
49
50%description
51Haskell is a computer programming language.
52In particular, it is a polymorphically statically typed, lazy, purely
53functional language, quite different from most other programming languages.
54The language is named for Haskell Brooks Curry, whose work in mathematical
55logic serves as a foundation for functional languages.
56
57This is a meta package for installing haskell-platform, alex, happy and
58cabal-install.
59
60
61%package base
62Version:     %{version}
63Summary:     base package of haskell-platform
64Summary(ja): haskell-platformの基本パッケージ
65License:     BSD-like
66Group:       Applications/Languages
67
68Requires: ghc = %{ghc_version}
69Requires: freeglut
70
71%description base
72Base package for haskell-platform without alex, cabal, happy and HsColour.
73
74
75# %package -n cabal-install
76# Version: %{cabal_version}
77# Summary: A command-line program simplifies the process of managing Haskell software
78# License: BSD3
79# Group:   Applications/Languages
80
81# %description -n cabal-install
82# The 'cabal' command-line program simplifies the process of
83# managing Haskell software by automating the fetching, configuration,
84# compilation and installation of Haskell libraries and programs.
85
86
87%package -n alex
88Version:     %{alex_version}
89Summary:     lexical analyser generator for Haskell
90Summary(ja): Haskell用の構文解析器生成器
91License:     BSD3
92Group:       Applications/Text
93
94%description -n alex
95Alex is a tool for generating lexical analysers in Haskell,
96given a description of the tokens to be recognised
97in the form of regular expressions.
98It is similar to the tool lex or flex for C/C++.
99
100%description -l ja -n alex
101AlexはHaskellで字句解析器を生成するツールで、
102トークン群の記述を正規表現の形式で認識します。
103C/C++用のlexやflexといったツールに似ています。
104
105
106%package -n happy
107Version:     %{happy_version}
108Summary:     a parser generator system for Haskell
109Summary(ja): Haskell 用の構文解析器生成器
110License:     BSD3
111Group:       Applications/Text
112
113%description -n happy
114Happy is a parser generator system for Haskell, similar to the tool 'yacc'
115for C. Like 'yacc', it takes a file containing an annotated BNF specification
116of a grammar and produces a Haskell module containing a parser for the grammar.
117
118%description -l ja -n happy
119HappyはHaskell用の構文解析器生成器のシステムで、C用ツールの'yacc'に似ています。
120'yacc'の様に注釈付きのBNF形式の文法の仕様を含んだファイルを受け取って、
121その文法の構文解析器を含んだHaskellモジュールを生成します。
122
123
124%prep
125%{__rm} -rf ${RPM_BUILD_ROOT}
126%setup -q -n %{name}-%{pkg_version}
127
128%build
129# build hptool
130./platform.sh
131
132# build haskell-platform
133export LANG=en_US.utf8
134hptool/dist/build/hptool/hptool --prefix=%{_prefix} \
135  %{_usrsrc}/ghc-%{ghc_version}-%{rpmarch}-vine-linux.tar.bz2 \
136  build-target
137
138%install
139# make directories for alex and happy
140%{__mkdir_p} ${RPM_BUILD_ROOT}%{_bindir}
141%{__mkdir_p} ${RPM_BUILD_ROOT}%{_libdir}
142%{__mkdir_p} ${RPM_BUILD_ROOT}%{_datadir}
143%{__mkdir_p} ${RPM_BUILD_ROOT}%{_docdir}
144%{__cp} -r build/target/usr/ ${RPM_BUILD_ROOT}/
145
146# move files for subpackages
147cd ${RPM_BUILD_ROOT}%{_usr}/ghc-%{ghc_version}-%{rpmarch}
148## alex
149%{__mv} bin/alex ${RPM_BUILD_ROOT}%{_bindir}
150%{__mv} share/alex-%{alex_version} ${RPM_BUILD_ROOT}%{_datadir}
151%{__rm} -rf lib/alex-%{alex_version}
152## happy
153%{__mv} bin/happy ${RPM_BUILD_ROOT}%{_bindir}
154%{__mv} share/happy-%{happy_version} ${RPM_BUILD_ROOT}%{_datadir}
155%{__rm} -rf lib/happy-%{happy_version}
156
157## delete files and folders from ghc, cabal and hscolour
158cd ${RPM_BUILD_ROOT}/usr/ghc-%{ghc_version}-%{rpmarch}
159%{__rm} -rf bin
160%{__rm} -rf lib/ghc-%{ghc_version}
161%{__rm} -rf lib/hscolour-%{hscolour_version}
162%{__rm} -rf share/hscolour-%{hscolour_version}
163%{__rm} -f  etc/registrations/hscolour-%{hscolour_version}
164%{__rm} -rf share/doc
165%{__rm} -rf share/man
166%{__rm} -f  haskell-platform.cabal
167%{__rm} -f  version-*
168
169%clean
170%{__rm} -rf ${RPM_BUILD_ROOT}
171
172%post base
173cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations
174for conf in *
175do
176  ghc-pkg register --verbose=0 --force $conf 2> /dev/null
177done
178
179%preun base
180cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations
181for conf in *
182do
183  ghc-pkg unregister --verbose=0 --force $conf 2> /dev/null
184done
185
186
187%files
188
189%files base
190%defattr(-, root, root)
191%doc LICENSE README
192%{_usr}/ghc-%{ghc_version}-%{rpmarch}/
193
194# %files -n cabal-install
195# %doc packages/cabal-install-%{cabal_version}/LICENSE
196# %doc packages/cabal-install-%{cabal_version}/README
197# %{_bindir}/cabal
198
199%files -n alex
200%doc packages/alex-%{alex_version}/LICENSE
201%doc packages/alex-%{alex_version}/README
202%{_bindir}/alex
203%{_datadir}/alex-%{alex_version}/
204
205%files -n happy
206%doc packages/happy-%{happy_version}/LICENSE
207%doc packages/happy-%{happy_version}/README
208%{_bindir}/happy
209%{_datadir}/happy-%{happy_version}/
210
211
212%changelog
213* Mon Apr 11 2016 Toshiaki Ara <ara_t@384.jp> 7.10.3-2
214- correct SPEC file
215
216* Fri Feb 19 2016 Toshiaki Ara <ara_t@384.jp> 7.10.3-1
217- update to 7.10.3
218
219* Mon Feb 15 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-4
220- delete subpackage cabal-install
221- delete %{cabal_version} from Requires: cabal-install-%{cabal_version}
222- add BuildRequires: libffi-devel
223
224* Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-3
225- correct Requires
226
227* Thu Feb 11 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-2
228- install Haskell libraries into %{_libdir}/ghc-lib
229- add BuildRequires: hscolour
230- devide insto subpackages
231
232* Thu Feb 04 2016 Toshiaki Ara <ara_t@384.jp> 2013.2.0.0-1
233- new package
Note: See TracBrowser for help on using the repository browser.