community/ghc to 8.2.1-2

This commit is contained in:
Kevin Mihelich 2017-09-21 18:27:29 +00:00
parent cf28abe75b
commit 6f2fe8c3e5
2 changed files with 11 additions and 9 deletions

View file

@ -18,7 +18,7 @@ shopt -s extglob
pkgbase=ghc
pkgname=(ghc-libs ghc ghc-static)
pkgver=8.2.1
pkgrel=1
pkgrel=2
pkgdesc='The Glasgow Haskell Compiler'
arch=('i686' 'x86_64')
url='http://www.haskell.org/ghc/'
@ -65,7 +65,7 @@ package_ghc-static() {
make DESTDIR="$pkgdir" install
mv "$pkgdir"/usr/lib/ghc-$pkgver/package.conf.d "$srcdir"/static-package.conf.d
find "$pkgdir"/usr/lib ! \( -name "*.a" -o -name "*.p_hi" \) -type f -delete
find "$pkgdir"/usr/lib ! \( -name "*.a" -o -name "*.p_hi" -o -name "*.hi" \) -type f -delete
find "$pkgdir"/usr/lib -type d -empty -delete
mv "$srcdir"/static-package.conf.d "$pkgdir"/usr/lib/ghc-$pkgver/
rm -r "$pkgdir"/usr/bin "$pkgdir"/usr/share/man
@ -83,7 +83,7 @@ package_ghc() {
make DESTDIR="$pkgdir" install
# Remove static libs
find "$pkgdir"/usr/lib \( -name "*.a" -o -name "*.p_hi" \) -delete
find "$pkgdir"/usr/lib \( -name "*.a" -o -name "*.p_hi" -o -name "*.hi" \) -delete
# ghc-pkg is in ghc-libs
rm "$pkgdir"/usr/lib/ghc-$pkgver/bin/ghc-pkg*
@ -159,7 +159,7 @@ package_ghc-libs() {
make DESTDIR="$pkgdir" install
# Remove static libs
find "$pkgdir"/usr/lib \( -name "*.a" -o -name "*.p_hi" \) -delete
find "$pkgdir"/usr/lib \( -name "*.a" -o -name "*.p_hi" -o -name "*.hi" \) -delete
# ghc library and other exes are in the ghc package
rm -r "$pkgdir"/usr/lib/ghc-$pkgver/ghc-$pkgver

View file

@ -1,10 +1,12 @@
pre_upgrade() {
echo '==> Unregistering cabalized packages...'
[[ -d /usr/share/haskell ]] && find /usr/share/haskell -maxdepth 2 -name 'unregister.sh' -exec {} \;
echo '==> Done.'
if [[ ${1%-*} != ${2%-*} ]]; then
[[ -d /usr/share/haskell ]] && find /usr/share/haskell -maxdepth 2 -name 'unregister.sh' -exec {} \;
fi
}
post_upgrade() {
echo '==> All cabalized packages need to be reinstalled now.'
echo '==> See /usr/share/haskell/ for a tentative list of affected packages.'
if [[ ${1%-*} != ${2%-*} ]]; then
echo '==> All cabalized packages need to be reinstalled now.'
echo '==> See /usr/share/haskell/ for a tentative list of affected packages.'
fi
}