petersen pushed to haskell-platform (f20). "more build tweaks"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu May 21 09:01:56 UTC 2015


From a0cda6843582d33dbf3f997e9e68606557922417 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen at redhat.com>
Date: Fri, 6 Jun 2014 17:55:48 +0900
Subject: more build tweaks


diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e7010df
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,30 @@
+Copyright (c) 2008-2010 Haskell.org
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the author nor the names of his contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/haskell-platform.spec b/haskell-platform.spec
index fd6a53e..2026ab4 100644
--- a/haskell-platform.spec
+++ b/haskell-platform.spec
@@ -48,6 +48,7 @@ Group:          Development/Tools
 License:        BSD
 URL:            http://hackage.haskell.org/platform
 Source0:        http://lambda.haskell.org/platform/download/%{version}/%{name}-%{version}.tar.gz
+Source1:        LICENSE
 
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros-extra
@@ -168,36 +169,40 @@ This provides the haskell-platform meta library package.
 
 %prep
 %setup -q -n %{name}-%{version}
+cp -p %SOURCE1 hptool/Setup.hs .
 
-cd packages
-
-cd ..
+# hack for h-p.cabal in top dir
+ln -s .. packages/%{name}-%{version}
 
+mkdir bin
+ln -s %{_bindir}/cabal bin/cabal-install
 
 %build
 HOME=$PWD
-PATH=$HOME/.cabal/bin:$PATH
+PATH=$PATH:$PWD/bin
 %define cabal_configure_options --user
-
 cd packages
-for i in $(egrep -v "^(%{?separate_packages})-" ../etc/build.packages); do
+for i in $(egrep -v "^(%{?separate_packages})-" ../etc/build.packages) %{name}-%{version}; do
 name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
 ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
 cd $name-$ver
+case $name in
+haskell-platform)
+%ghc_lib_build_without_haddock $name $ver
+;;
 %ghc_lib_build $name $ver
 ./Setup register --inplace
 cd ..
 done
 cd ..
-%ghc_lib_build haskell-platform %{version}
 
 
 %install
 HOME=$PWD
-PATH=$HOME/.cabal/bin:$PATH
+PATH=$PATH:$PWD/bin
 
 cd packages
-for i in $(egrep -v "^(%{?separate_packages})-" ../etc/build.packages); do
+for i in $(egrep -v "^(%{?separate_packages})-" ../etc/build.packages) %{name}-%{version}; do
 name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
 ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
 cd $name-$ver
@@ -210,7 +215,6 @@ done
 
 mv */*.files ..
 cd ..
-%ghc_lib_install
 
 %ghc_strip_dynlinked
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/haskell-platform.git/commit/?h=f20&id=a0cda6843582d33dbf3f997e9e68606557922417


More information about the scm-commits mailing list