2 new macros to ease bundling libraries

- ghc_sublib_build and ghc_sublib_install
epel9
Jens Petersen 8 years ago
parent 27b17fb15e
commit 986f88ae73

@ -10,7 +10,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.6.3
Version: 1.6.4
Release: 1%{?dist}
Summary: RPM macros for building packages for GHC
@ -135,6 +135,9 @@ EOF
%changelog
* Wed Aug 17 2016 Jens Petersen <petersen@redhat.com> - 1.6.4-1
- add ghc_sublib_build and ghc_sublib_install to ease bundling libraries
* Sat Aug 6 2016 Jens Petersen <petersen@redhat.com> - 1.6.3-1
- cabal_verbose from github fedora-haskell/ghc-rpm-macros

@ -55,3 +55,39 @@ This package provides the Haskell %{pkgname} library development files.\
%endif\
%{?devel_doc_files:%doc %devel_doc_files}\
%{nil}
# ghc_sublib_build [name-version] ...
%ghc_sublib_build()\
HOME=$PWD\
%define cabal_configure_options --user\
for i in %*; 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\
%{nil}
# ghc_sublib_install [name-version] ...
%ghc_sublib_install()\
HOME=$PWD\
for i in %*; 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 $name-$ver/LICENSE" >> ghc-$name.files\
rm %{buildroot}%{_docdir}/ghc-$name/LICENSE\
mv *.files ..\
cd ..\
done\
%{nil}

Loading…
Cancel
Save