Import haskell-entropy and haskell-sha as hedgewars' deps.

This commit is contained in:
Jeff Huang 2015-02-25 12:21:55 +00:00
parent 7711893088
commit 8ec125749b
4 changed files with 118 additions and 0 deletions

37
haskell-entropy/PKGBUILD Normal file
View File

@ -0,0 +1,37 @@
# Maintainer: Jeff Huang <s8321414[at]gmail[dot]com>
pkgname=haskell-entropy
pkgver=0.3.5
pkgrel=1
pkgdesc="A platform independent method to obtain cryptographically strong entropy"
url="http://hackage.haskell.org/package/entropy"
license=('custom:BSD3')
arch=('x86_64')
makedepends=()
depends=('ghc')
options=('strip' 'staticlibs')
install=${pkgname}.install
source=(http://hackage.haskell.org/packages/archive/entropy/${pkgver}/entropy-${pkgver}.tar.gz)
md5sums=('da9e144d01634e2892452b3b2a47b18f')
build() {
cd ${srcdir}/entropy-${pkgver}
runhaskell Setup configure -O ${PKGBUILD_HASKELL_ENABLE_PROFILING:+-p } --enable-split-objs --enable-shared \
--prefix=/usr --docdir=/usr/share/doc/${pkgname} --libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build
runhaskell Setup haddock
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd ${srcdir}/entropy-${pkgver}
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/entropy
runhaskell Setup copy --destdir=${pkgdir}
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
}

View File

@ -0,0 +1,18 @@
HS_DIR=usr/share/haskell/haskell-entropy
post_install() {
${HS_DIR}/register.sh
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
pre_upgrade() {
${HS_DIR}/unregister.sh
}
post_upgrade() {
${HS_DIR}/register.sh
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
pre_remove() {
${HS_DIR}/unregister.sh
}
post_remove() {
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}

37
haskell-sha/PKGBUILD Normal file
View File

@ -0,0 +1,37 @@
# Maintainer: Jeff Hunag <s8321414[at]gmail[dot]com>
pkgname=haskell-sha
pkgver=1.6.4.1
pkgrel=1
pkgdesc="Implementations of the SHA suite of message digest functions"
url="http://hackage.haskell.org/package/SHA"
license=('BSD3')
arch=('x86_64')
depends=('ghc')
options=('strip')
install="${pkgname}.install"
source=("http://hackage.haskell.org/packages/archive/SHA/${pkgver}/SHA-${pkgver}.tar.gz")
sha256sums=('743bc6d7dd3e74a44bfca8920f0f0ba5855722a62f6cc44f0a38d10c11bddc0d')
build() {
cd ${srcdir}/SHA-${pkgver}
runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
--prefix=/usr --docdir=/usr/share/doc/${pkgname} \
--libsubdir=\$compiler/site-local/\$pkgid
runhaskell Setup build
runhaskell Setup haddock
runhaskell Setup register --gen-script
runhaskell Setup unregister --gen-script
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
package() {
cd ${srcdir}/SHA-${pkgver}
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries
ln -s /usr/share/doc/${pkgname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/SHA
runhaskell Setup copy --destdir=${pkgdir}
install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
rm -f ${pkgdir}/usr/share/doc/${pkgname}/LICENSE
}

View File

@ -0,0 +1,26 @@
# custom variables
pkgname=haskell-sha
HS_DIR=usr/share/haskell/${pkgname}
# functions
post_install() {
${HS_DIR}/register.sh
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
pre_upgrade() {
${HS_DIR}/unregister.sh
}
post_upgrade() {
${HS_DIR}/register.sh
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}
pre_remove() {
${HS_DIR}/unregister.sh
}
post_remove() {
(cd usr/share/doc/ghc/html/libraries; ./gen_contents_index)
}