Skip to content

Instantly share code, notes, and snippets.

@orospakr
Created March 4, 2013 02:30
Show Gist options
  • Save orospakr/5079495 to your computer and use it in GitHub Desktop.
Save orospakr/5079495 to your computer and use it in GitHub Desktop.
Updated PKGBUILD for c2hs 0.16.4 that depends on the haskell-language-c-03.
# custom variables
_hkgname=c2hs
_licensefile=COPYING
# PKGBUILD options/directives
pkgname=c2hs
pkgver=0.16.4
pkgrel=22
pkgdesc="C->Haskell FFI tool that gives some cross-language type safety"
url="http://www.cse.unsw.edu.au/~chak/haskell/c2hs/"
license=("GPL-2")
arch=('i686' 'x86_64')
makedepends=("ghc"
"haskell-array"
"haskell-containers"
"haskell-directory"
"haskell-filepath"
"haskell-language-c-03>=0.3.1.1"
"haskell-language-c-03<0.4"
"haskell-pretty"
"haskell-process")
depends=()
options=('strip')
source=(
"http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
"c2hs"
)
sha256sums=('f1b15c18de884273eeab4400097a6fad8373849835e2a943d4583d9602fb1555'
'171036efd32bc8ad2cfe9d96f79d7679b34cbd02351e0f48d99b5372efb03b8a')
# PKGBUILD functions
build() {
cd ${srcdir}/${_hkgname}-${pkgver}
runhaskell Setup configure -O --prefix=/usr --docdir=/usr/share/doc/${pkgname}
runhaskell Setup build
}
package() {
cd ${srcdir}/${_hkgname}-${pkgver}
runhaskell Setup copy --destdir=${pkgdir}
mv ${pkgdir}/usr/bin/c2hs{,-bin}
cp ${srcdir}/c2hs ${pkgdir}/usr/bin/c2hs
chmod +rx ${pkgdir}/usr/bin/c2hs
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment