use new %ghc_libs_build and %ghc_libs_install macros
This commit is contained in:
parent
ce9d6118e0
commit
7eb7b3d1d6
@ -61,7 +61,7 @@ Patch1: haskell-platform-build-tools-cabal-install.patch
|
||||
Patch2: haskell-platform-7.10.3-version.patch
|
||||
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-rpm-macros-extra
|
||||
BuildRequires: ghc-rpm-macros-extra >= 1.6.4
|
||||
|
||||
BuildRequires: alex = %{alex_version}
|
||||
BuildRequires: cabal-install = %{cabal_install_version}
|
||||
@ -137,10 +137,10 @@ and tools. It provides a good starting environment for Haskell development.
|
||||
# used by lambdabot-utils
|
||||
%ghc_lib_subpackage half 0.2.2.1
|
||||
%ghc_lib_subpackage haskell-src 1.0.2.0
|
||||
%ghc_lib_subpackage OpenGL 2.13.1.0
|
||||
%ghc_lib_subpackage -c mesa-libGL-devel%{?_isa} OpenGLRaw 2.6.0.0
|
||||
%ghc_lib_subpackage multipart 0.1.2
|
||||
%ghc_lib_subpackage ObjectName 1.1.0.0
|
||||
%ghc_lib_subpackage OpenGL 2.13.1.0
|
||||
%ghc_lib_subpackage -c mesa-libGL-devel%{?_isa} OpenGLRaw 2.6.0.0
|
||||
%ghc_lib_subpackage StateVar 1.1.0.1
|
||||
%endif
|
||||
|
||||
@ -196,7 +196,8 @@ This provides the haskell-platform meta library package.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{upstream_version}
|
||||
%setup -q -c -n %{name}-%{upstream_version}
|
||||
cd %{name}-%{upstream_version}
|
||||
%patch1 -p1 -b .orig
|
||||
%patch2 -p1
|
||||
|
||||
@ -204,7 +205,6 @@ This provides the haskell-platform meta library package.
|
||||
mkdir packages/%{name}-%{version}
|
||||
cp LICENSE hptool/Setup.hs packages/%{name}-%{version}
|
||||
|
||||
|
||||
cabal-tweak-dep-ver alex '==3.1.4' '==%{alex_version}'
|
||||
cabal-tweak-dep-ver async '==2.0.2' '==%{async_version}'
|
||||
cabal-tweak-dep-ver attoparsec '==0.13.0.1' '==%{attoparsec_version}'
|
||||
@ -225,45 +225,15 @@ cabal-tweak-dep-ver unordered-containers '==0.2.5.1' '==%{unordered_containers_v
|
||||
cabal-tweak-dep-ver zlib '==0.5.4.2' '==%{zlib_version}'
|
||||
mv %{name}.cabal packages/%{name}-%{version}
|
||||
|
||||
mv packages/* ..
|
||||
|
||||
|
||||
%build
|
||||
HOME=$PWD
|
||||
%define cabal_configure_options --user
|
||||
cd packages
|
||||
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
|
||||
;;
|
||||
esac
|
||||
cd ..
|
||||
done
|
||||
cd ..
|
||||
%ghc_libs_build $(egrep \-v "^(%{?separate_packages})-" %{name}-%{upstream_version}/etc/build.packages) %{name}-%{version}
|
||||
|
||||
|
||||
%install
|
||||
HOME=$PWD
|
||||
|
||||
cd packages
|
||||
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
|
||||
%ghc_lib_install $name $ver
|
||||
echo "%%license packages/$name-$ver/LICENSE" >> ghc-$name.files
|
||||
rm %{buildroot}%{_docdir}/ghc-$name/LICENSE
|
||||
cd ..
|
||||
done
|
||||
|
||||
mv */*.files ..
|
||||
cd ..
|
||||
%ghc_libs_install $(egrep \-v "^(%{?separate_packages})-" %{name}-%{upstream_version}/etc/build.packages) %{name}-%{version}
|
||||
|
||||
%ghc_strip_dynlinked
|
||||
|
||||
@ -277,16 +247,17 @@ cd ..
|
||||
|
||||
|
||||
%files
|
||||
%license packages/%{name}-%{version}/LICENSE
|
||||
%license %{name}-%{version}/LICENSE
|
||||
|
||||
|
||||
%files -n ghc-haskell-platform-devel -f ghc-haskell-platform-devel.files
|
||||
%license packages/haskell-platform-%{version}/LICENSE
|
||||
%license haskell-platform-%{version}/LICENSE
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 29 2016 Jens Petersen <petersen@redhat.com> - 2016.7.10.3-2
|
||||
- split-0.2.3.1
|
||||
- use new ghc_libs_build and ghc_libs_install macros
|
||||
|
||||
* Thu Jun 23 2016 Jens Petersen <petersen@redhat.com> - 2016.7.10.3-1
|
||||
- update to new haskell-platform version 7.10.3
|
||||
|
Loading…
Reference in New Issue
Block a user