diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f26c2086f072 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = haskell-storable-endian + pkgdesc = Storable instances with endianness + pkgver = 0.2.6 + pkgrel = 1 + url = https://github.com/jkff/storable-endian + arch = x86_64 + license = BSD + makedepends = ghc + depends = ghc-libs + depends = haskell-byteorder + source = https://hackage.haskell.org/packages/archive/storable-endian/0.2.6/storable-endian-0.2.6.tar.gz + sha256sums = 3743ac8f084ed3187b83f17b4fac280e77c5df01f7910f42b6a1bf09d5a65489 + +pkgname = haskell-storable-endian + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6ac9b697c4ba --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: Daniel Mouritzen <dmrtzn at gmail dot com> + +_hkgname=storable-endian +pkgname=haskell-storable-endian +pkgver=0.2.6 +pkgrel=1 +pkgdesc="Storable instances with endianness" +url="https://github.com/jkff/storable-endian" +license=("BSD") +arch=('x86_64') +depends=('ghc-libs' 'haskell-byteorder') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha256sums=('3743ac8f084ed3187b83f17b4fac280e77c5df01f7910f42b6a1bf09d5a65489') + +build() { + cd "$_hkgname-$pkgver" + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir="$pkgname" --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + runhaskell Setup build + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +check() { + cd "$_hkgname-$pkgver" + runhaskell Setup test +} + +package() { + cd "$_hkgname-$pkgver" + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +} |