]> git.pld-linux.org Git - SPECS.git/blob - nhc98.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / nhc98.spec
1 #
2 # Conditional build:
3 %bcond_with     ghc     # build using ghc haskell compiler
4 %bcond_with     nhc     # build not using ghc haskell compiler, but nhc98 (slow compiler in effect)
5 %bcond_with     java    # build with Java support
6 #
7 # Due to nhc being old it does not build with new ghc, so default compiler
8 # is now gcc
9 #                 (results is slower compiler, but buildtime is much (!)
10 #                 shorter, and you don't have to have ghc/nhc/... installed)
11
12 %{?_with_ghc:%define    compiler        ghc}
13 %{?_with_nhc:%define    compiler        nhc98}
14 %{!?compiler:%define    compiler        gcc}
15
16 Summary:        York compiler for Haskell 98
17 Summary(pl.UTF-8):      Kompilator York do Haskella 98
18 Name:           nhc98
19 Version:        1.18
20 Release:        1
21 License:        Free
22 Group:          Development/Languages
23 Source0:        ftp://ftp.cs.york.ac.uk/pub/haskell/nhc98/%{name}src-%{version}.tar.gz
24 # Source0-md5:  f38b74481ec01a066cc9314b7bd18c90
25 Patch0:         %{name}-termcap.patch
26 Patch1:         %{name}-uname.patch
27 Patch2:         %{name}-LP64.patch
28 Patch3:         %{name}-alpha.patch
29 URL:            http://www.cs.york.ac.uk/fp/nhc98/
30 BuildRequires:  %{compiler}
31 %{?with_java:BuildRequires:     jdk}
32 # for some tools
33 BuildRequires:  gmp-devel
34 BuildRequires:  ncurses-devel
35 BuildRequires:  rpmbuild(macros) >= 1.213
36 %{?with_java:Requires:  jre}
37 # this should be moved to subpackage
38 Requires:       hmake
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 nhc98 is a fully-fledged compiler for Haskell 98, the standard lazy
43 functional programming language. It based on Niklas Roejemo's nhc13, a
44 compiler for an earlier version of the language. Written in Haskell,
45 it is small and very portable, and aims to produce small executables
46 that run in small amounts of memory. Is a pattern becoming obvious
47 here? :-) It also comes with extensive tool support.
48
49 %description -l en.UTF-8
50 nhc98 is a fully-fledged compiler for Haskell 98, the standard lazy
51 functional programming language. It based on Niklas Röjemo's nhc13, a
52 compiler for an earlier version of the language. Written in Haskell,
53 it is small and very portable, and aims to produce small executables
54 that run in small amounts of memory. Is a pattern becoming obvious
55 here? :-) It also comes with extensive tool support.
56
57 %description -l pl.UTF-8
58 nhc98 jest w pełni wyposażonym kompilatorem Haskella 98,
59 standardowego, leniwego, funkcyjnego języka programowania. Bazuje na
60 nhc13 Niklasa Röjemo, kompilatora wcześniejszej wersji tego języka.
61 Jest napisany w Haskellu, mały i przenośny, jego celem jest
62 produkowanie małych binarek, wymagających mało pamięci.
63
64 %prep
65 %setup -q
66 %patch0 -p1
67 %patch1 -p1
68 %ifarch %{x8664} alpha ia64 ppc64 s390x sparc64
69 %patch2 -p1
70 %endif
71 %patch3 -p1
72
73 %build
74 ./configure \
75         --prefix=%{_prefix} \
76         --mandir=%{_mandir}/man1 \
77         --docdir=docs_/docs +docs \
78         --buildwith=%{compiler} \
79         --buildopts=-O
80
81 %{__make} all \
82         OPT="%{rpmcflags}"
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 ./configure \
87     --install \
88     --prefix=$RPM_BUILD_ROOT%{_prefix} \
89     --mandir=$RPM_BUILD_ROOT%{_mandir}/man1
90 %{__make} install
91
92 # correct hardcoded paths in some scripts
93 for f in $RPM_BUILD_ROOT%{_prefix}/{bin/{harch,hp2graph,hood,nhc98,hat-trail},lib/nhc98/*-Linux/hmake.config} ; do
94 ed -s $f <<EOF || :
95 ,s|$RPM_BUILD_ROOT||g
96 wq
97 EOF
98 done
99
100 # remove hmake
101 rm -f $RPM_BUILD_ROOT%{_bindir}/{harch,hi,hmake}
102 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/hmake*
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %files
108 %defattr(644,root,root,755)
109 %doc COPYRIGHT INSTALL README docs_/docs
110 %attr(755,root,root) %{_bindir}/cpphs
111 %attr(755,root,root) %{_bindir}/*nhc98
112 %attr(755,root,root) %{_bindir}/hood
113 %attr(755,root,root) %{_bindir}/hp2graph
114 %attr(755,root,root) %{_bindir}/tprofprel
115 %{_includedir}/nhc98
116 %dir %{_libdir}/nhc98
117 %dir %{_libdir}/nhc98/*-Linux
118 %dir %{_libdir}/nhc98/*.jar
119 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/cpphs
120 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/hsc2hs
121 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/nhc98*
122 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/hmake*
123 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/greencard-nhc98
124 %attr (755,root,root) %{_libdir}/nhc98/*-Linux/hp2graph
125 %{_libdir}/nhc98/*-Linux/*.a
126 %{_libdir}/nhc98/*-Linux/*.o
127 %{_libdir}/nhc98/*-Linux/config
128 # this file is not %%config
129 %{_mandir}/*/*
This page took 2.982859 seconds and 3 git commands to generate.