summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorb1f6c1c42022-01-07 03:50:13 -0500
committerb1f6c1c42022-01-07 03:50:13 -0500
commit0d560fe34bc1ba77e5de6005848030cf54cce6e6 (patch)
tree3c7c7156f1d453ef4b8c3fd3c3a6989e6d3028d9 /PKGBUILD
parent5dd0aafe20679d5f4feadfefcb2e770a4cea2cf9 (diff)
downloadaur-sv2v-git.tar.gz
base on newest git commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD58
1 files changed, 16 insertions, 42 deletions
diff --git a/PKGBUILD b/PKGBUILD
index d7984c4dc914..48373bb258f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,52 +1,26 @@
-# This file was generated by https://github.com/berberman/arch-hs, please check it manually.
-# Maintainer: Ferdinand Bachmann <theferdi265@gmail.com>
+# Maintainer: b1f6c1c4 <b1f6c1c4@gmail.com>
-_hkgname=sv2v
-pkgname=$_hkgname
-pkgver=0.0.8
+_pkgname=sv2v
+pkgname=${_pkgname}-git
+pkgver=0.0.9.r10.4c3dcf5
pkgrel=1
-pkgdesc="SystemVerilog to Verilog conversion"
-url="https://github.com/zachjs/sv2v"
-license=("custom: BSD3")
+pkgdesc='SystemVerilog to Verilog conversion'
arch=('x86_64')
-depends=('ghc-libs' 'haskell-cmdargs' 'haskell-githash' 'haskell-hashable' 'haskell-vector')
-makedepends=('ghc' 'alex' 'happy')
-source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
- "sv2v-cabal.patch"
- "at-operator.patch")
-sha256sums=('fc84a770faa9357eeac56d55f861e89d2a73d71378b332096de8ddf4340674fe'
- 'fd9d4dfd5537347d3ca6c3c1e5f166c7d6417acfe84541b8feb837fb043879f8'
- '6f0ab8b52a0592e42de5f07a75e16f13fa576d37c8d223e5932e9f2d8b8689f6')
-
-prepare() {
- cd $_hkgname-$pkgver
-
- patch -p1 < "$srcdir/sv2v-cabal.patch"
- patch -p1 < "$srcdir/at-operator.patch"
+url='https://github.com/zachjs/sv2v'
+license=('custom: BSD3')
+makedepends=('git' 'stack' 'alex' 'happy')
+source=("git+$url.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ git -C "$_pkgname" describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- cd $_hkgname-$pkgver
-
- runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
- --prefix=/usr --docdir=/usr/share/doc/$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
- if [[ -f register.sh ]]; then sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh; fi
- if [[ -f unregister.sh ]]; then sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh; fi
+ make -C "$_pkgname"
}
package() {
- cd $_hkgname-$pkgver
-
- if [[ -f register.sh ]]; then install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh; fi
- if [[ -f unregister.sh ]]; then install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh; fi
- runhaskell Setup copy --destdir="$pkgdir"
- install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
- rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+ install -Dm755 -t "$pkgdir/usr/bin" "$_pkgname/bin/$_pkgname"
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" "$_pkgname/LICENSE"
}