[arch-commits] Commit in ghc/trunk (PKGBUILD print-provides-replaces.sh)
Felix Yan
felixonmars at archlinux.org
Mon Sep 28 10:20:09 UTC 2020
Date: Monday, September 28, 2020 @ 10:20:09
Author: felixonmars
Revision: 712800
fix provides/replaces for some utils
Modified:
ghc/trunk/PKGBUILD
ghc/trunk/print-provides-replaces.sh
----------------------------+
PKGBUILD | 19 +++++++++++++++----
print-provides-replaces.sh | 33 +++++++++++++++++++++------------
2 files changed, 36 insertions(+), 16 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-09-28 09:45:50 UTC (rev 712799)
+++ PKGBUILD 2020-09-28 10:20:09 UTC (rev 712800)
@@ -69,10 +69,19 @@
package_ghc() {
pkgdesc='The Glasgow Haskell Compiler'
- provides=("haskell-ghc=$pkgver")
- replaces=("haskell-ghc")
depends=('gcc' 'ghc-libs')
+ provides=('haskell-haddock=2.24.0'
+ 'haskell-hp2ps=0.1'
+ 'haskell-hpc-bin=0.68'
+ 'haskell-hsc2hs=0.68.7')
+ replaces=('haskell-haddock'
+ 'haskell-hp2ps'
+ 'haskell-hpc-bin'
+ 'haskell-hsc2hs')
+ provides+=("haskell-ghc=$pkgver")
+ replaces+=("haskell-ghc")
+
cd ghc-$pkgver
make DESTDIR="$pkgdir" -j1 install
@@ -99,6 +108,7 @@
'haskell-base=4.14.1.0'
'haskell-binary=0.8.8.0'
'haskell-bytestring=0.10.10.0'
+ 'haskell-cabal=3.2.0.0'
'haskell-containers=0.6.2.1'
'haskell-deepseq=1.4.4.0'
'haskell-directory=1.3.6.0'
@@ -125,11 +135,12 @@
'haskell-transformers=0.5.6.2'
'haskell-unix=2.7.2.2'
'haskell-xhtml=3000.2.2.1'
- 'haskell-cabal=3.2.0.0')
+ 'haskell-ghc-pkg=6.9')
replaces=('haskell-array'
'haskell-base'
'haskell-binary'
'haskell-bytestring'
+ 'haskell-cabal'
'haskell-containers'
'haskell-deepseq'
'haskell-directory'
@@ -156,7 +167,7 @@
'haskell-transformers'
'haskell-unix'
'haskell-xhtml'
- 'haskell-cabal')
+ 'haskell-ghc-pkg')
provides+=("haskell-ghci=$pkgver")
conflicts+=('haskell-ghci')
Modified: print-provides-replaces.sh
===================================================================
--- print-provides-replaces.sh 2020-09-28 09:45:50 UTC (rev 712799)
+++ print-provides-replaces.sh 2020-09-28 10:20:09 UTC (rev 712800)
@@ -17,28 +17,37 @@
exclude[${exclude_pkg}]=1
done
-cd src/ghc-${pkgver}/libraries
+cd src/ghc-${pkgver}
-# $1 is the name of the variable
+# $1 is the name of the field
# $2 is the string for the test, either '=' or '<'
+# ..$@ are the files to search
print_var() {
- printf " $1=("
- for path in $(ls ./*/*.cabal ./containers/containers/*.cabal); do
+ field=$1
+ output_version=$2
+ shift
+ shift
+
+ printf " $field=("
+ for path in $(ls $@); do
dirname=$(echo $path | awk -F '/' '{ print $2 }')
cabalfile=$(echo $path | awk -F '/' '{ print $3 }')
cabalname=$(basename $cabalfile .cabal)
[[ ${exclude[${dirname}]} ]] && continue
version=$(awk 'tolower($0) ~ /^version:/ {print $2 }' $path)
- printf "'haskell-$cabalname"
- [[ -n "$2" ]] && printf "$2$version"
+ printf "'haskell-${cabalname,,}"
+ [[ -n "$output_version" ]] && printf "$output_version$version"
printf "'\n "
done
- # also add cabal
- version=$(awk 'tolower($0) ~ /^version:/ { print $2 }' Cabal/Cabal/Cabal.cabal)
- printf "'haskell-cabal"
- [[ -n "$2" ]] && printf "$2$version"
+ printf "\033[1A'haskell-${cabalname,,}"
+ [[ -n "$output_version" ]] && printf "$output_version$version"
printf "')\n"
}
-print_var 'provides' '='
-print_var 'replaces'
+# For ghc-libs
+print_var 'provides' '=' libraries/*/*.cabal libraries/{containers/containers,Cabal/Cabal}/*.cabal utils/ghc-pkg/*.cabal
+print_var 'replaces' '' libraries/*/*.cabal libraries/{containers/containers,Cabal/Cabal}/*.cabal utils/ghc-pkg/*.cabal
+
+# For ghc
+print_var 'provides' '=' utils/{hpc,hsc2hs,haddock*,hp2ps}/*.cabal
+print_var 'replaces' '' utils/{hpc,hsc2hs,haddock*,hp2ps}/*.cabal
More information about the arch-commits
mailing list