# custom variables _hkgname=shake _licensefile=LICENSE # PKGBUILD options/directives pkgname=(haskell-shake haskell-shake-bin) pkgver=0.15 pkgrel=76 pkgdesc="Build system library, like Make, but more accurate dependencies." url="http://www.shakebuild.com/" license=("BSD3") arch=('i686' 'x86_64') makedepends=() depends=("ghc=7.10.1-1" "haskell-extra=1.1-76" "haskell-hashable=1.2.3.2-76" "haskell-js-flot=0.8.3-76" "haskell-js-jquery=1.11.2-76" "haskell-old-time=1.1.0.3-76" "haskell-random=1.1-76" "haskell-unordered-containers=0.2.5.1-76" "haskell-utf8-string=1-76") options=('strip' 'staticlibs') source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") sha256sums=("1376b82cce3fdc977e9affe72fb01888173d0fcf465a10a0357b3b44449df80b") # PKGBUILD functions prepare() { cd "${srcdir}/${_hkgname}-${pkgver}" # no cabal patch # no source patch } build() { cd "${srcdir}/${_hkgname}-${pkgver}" runhaskell Setup configure -O --enable-library-profiling --enable-shared \ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" \ --libsubdir=\$compiler/site-local/\$pkgid \ -f-portable runhaskell Setup build runhaskell Setup haddock --hoogle --html runhaskell Setup register --gen-script runhaskell Setup unregister --gen-script sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh } package_haskell-shake() { depends+=("haskell-shake-bin=${pkgver}-${pkgrel}") install="${pkgname}.install" cd "${srcdir}/${_hkgname}-${pkgver}" runhaskell Setup copy --destdir="${pkgdir}" 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/${_hkgname}" rm -fr "${pkgdir}/usr/bin" install -D -m644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" rm -f "${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}" } package_haskell-shake-bin() { depends=() cd "${srcdir}/${_hkgname}-${pkgver}" runhaskell Setup copy --destdir="${pkgdir}" rm -fr "${pkgdir}/usr/lib" rm -fr "${pkgdir}/usr/share" install -D -m644 "${_licensefile}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" rm -f "${pkgdir}/usr/share/doc/${pkgname}/${_licensefile}" }