[10154] | 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 | |
---|
| 20 | Summary: An advanced purely-functional programming language |
---|
| 21 | Name: %{pkg_name} |
---|
| 22 | Version: %{year_version}.%{pkg_version} |
---|
| 23 | Release: %{pkg_release} |
---|
| 24 | |
---|
| 25 | License: BSD-like |
---|
| 26 | Group: Applications/Languages |
---|
| 27 | |
---|
| 28 | Source0: %{name}-%{pkg_version}.tar.gz |
---|
| 29 | |
---|
| 30 | BuildRoot: %{_tmppath}/%{name}-%{pkg_version}-root |
---|
| 31 | |
---|
| 32 | BuildRequires: ghc cabal-install |
---|
| 33 | BuildRequires: ghc-bindist |
---|
| 34 | BuildRequires: gmp-devel zlib-devel freeglut-devel |
---|
| 35 | BuildRequires: libffi-devel |
---|
| 36 | BuildRequires: docbook-utils docbook-utils-pdf docbook-style-xsl |
---|
| 37 | BuildRequires: hscolour |
---|
| 38 | |
---|
| 39 | Requires: haskell-platform-base = %{version} |
---|
| 40 | Requires: alex |
---|
| 41 | Requires: happy |
---|
| 42 | Requires: cabal-install |
---|
| 43 | Requires: hscolour |
---|
| 44 | |
---|
| 45 | Vendor: Project Vine |
---|
| 46 | Distribution: Vine Linux |
---|
| 47 | Packager: ara_t |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | %description |
---|
| 51 | Haskell is a computer programming language. |
---|
| 52 | In particular, it is a polymorphically statically typed, lazy, purely |
---|
| 53 | functional language, quite different from most other programming languages. |
---|
| 54 | The language is named for Haskell Brooks Curry, whose work in mathematical |
---|
| 55 | logic serves as a foundation for functional languages. |
---|
| 56 | |
---|
| 57 | This is a meta package for installing haskell-platform, alex, happy and |
---|
| 58 | cabal-install. |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | %package base |
---|
| 62 | Version: %{version} |
---|
| 63 | Summary: base package of haskell-platform |
---|
| 64 | Summary(ja): haskell-platformの基本パッケージ |
---|
| 65 | License: BSD-like |
---|
| 66 | Group: Applications/Languages |
---|
| 67 | |
---|
| 68 | Requires: ghc = %{ghc_version} |
---|
| 69 | Requires: freeglut |
---|
| 70 | |
---|
| 71 | %description base |
---|
| 72 | Base 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 |
---|
| 88 | Version: %{alex_version} |
---|
| 89 | Summary: lexical analyser generator for Haskell |
---|
| 90 | Summary(ja): Haskell用の構文解析器生成器 |
---|
| 91 | License: BSD3 |
---|
| 92 | Group: Applications/Text |
---|
| 93 | |
---|
| 94 | %description -n alex |
---|
| 95 | Alex is a tool for generating lexical analysers in Haskell, |
---|
| 96 | given a description of the tokens to be recognised |
---|
| 97 | in the form of regular expressions. |
---|
| 98 | It is similar to the tool lex or flex for C/C++. |
---|
| 99 | |
---|
| 100 | %description -l ja -n alex |
---|
| 101 | AlexはHaskellで字句解析器を生成するツールで、 |
---|
| 102 | トークン群の記述を正規表現の形式で認識します。 |
---|
| 103 | C/C++用のlexやflexといったツールに似ています。 |
---|
| 104 | |
---|
| 105 | |
---|
| 106 | %package -n happy |
---|
| 107 | Version: %{happy_version} |
---|
| 108 | Summary: a parser generator system for Haskell |
---|
| 109 | Summary(ja): Haskell 用の構文解析器生成器 |
---|
| 110 | License: BSD3 |
---|
| 111 | Group: Applications/Text |
---|
| 112 | |
---|
| 113 | %description -n happy |
---|
| 114 | Happy is a parser generator system for Haskell, similar to the tool 'yacc' |
---|
| 115 | for C. Like 'yacc', it takes a file containing an annotated BNF specification |
---|
| 116 | of a grammar and produces a Haskell module containing a parser for the grammar. |
---|
| 117 | |
---|
| 118 | %description -l ja -n happy |
---|
| 119 | Happyは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 |
---|
| 133 | export LANG=en_US.utf8 |
---|
| 134 | hptool/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 |
---|
| 147 | cd ${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 |
---|
| 158 | cd ${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 |
---|
| 173 | cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations |
---|
| 174 | for conf in * |
---|
| 175 | do |
---|
| 176 | ghc-pkg register --verbose=0 --force $conf 2> /dev/null |
---|
| 177 | done |
---|
| 178 | |
---|
| 179 | %preun base |
---|
| 180 | cd %{_usr}/ghc-%{ghc_version}-%{rpmarch}/etc/registrations |
---|
| 181 | for conf in * |
---|
| 182 | do |
---|
| 183 | ghc-pkg unregister --verbose=0 --force $conf 2> /dev/null |
---|
| 184 | done |
---|
| 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 |
---|