diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1bd0337f9b1c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# This file was generated by https://github.com/berberman/arch-hs, please check it manually. +# Maintainer: Your Name <youremail@domain.com> + +_hkgname=ioctl +pkgname=haskell-ioctl +pkgver=0.0.1 +pkgrel=1 +pkgdesc="Type-safe I/O control package" +url="https://hackage.haskell.org/package/ioctl" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs' 'haskell-network') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz" 'fix.patch') +sha256sums=('1a9f21bc8f03d4729ef936d543d463e9ab5656699b2cf27fb344b4c6693d9067' + '7e9ac869d968beb1f77a9899b9a910e6f552749539be8eaf5833e3545979cf29') + +prepare() { + cd "$_hkgname-$pkgver" + patch -p1 < ../fix.patch +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=haskell-ioctl --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 +} + +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 -t "$pkgdir"/usr/share/licenses/$pkgname/ + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +} |