Felix Yan pushed to branch main at Arch Linux / Packaging / Packages / alex


Commits:
3f70d75b by Felix Yan at 2024-10-22T02:57:12+03:00
upgpkg: 3.3.0.0-2: enable tests and modernize pkgbuild

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = alex
        pkgdesc = Lexical analyser generator for Haskell
        pkgver = 3.3.0.0
-       pkgrel = 1
+       pkgrel = 2
        url = https://hackage.haskell.org/package/alex
        arch = x86_64
        license = BSD-3-Clause


=====================================
PKGBUILD
=====================================
@@ -1,11 +1,12 @@
-# Maintainer: Alexander F. Rødseth <[email protected]>
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Alexander F. Rødseth <[email protected]>
 # Contributor: Sergej Pupykin <[email protected]>
 # Contributor: Vesa Kaihlavirta <[email protected]>
 # Contributor: Philip Nilsson <[email protected]>
 
 pkgname=alex
 pkgver=3.3.0.0
-pkgrel=1
+pkgrel=2
 pkgdesc='Lexical analyser generator for Haskell'
 arch=(x86_64)
 url='https://hackage.haskell.org/package/alex'
@@ -17,19 +18,23 @@ 
sha512sums=('e7755273406d69cd2a30294d055836cd188f6435fdf7b621fad3f5dd6b0f7f37e05
 
 build() {
   cd $pkgname-$pkgver
-  runghc Setup.hs configure \
-    --prefix=/usr \
-    --datasubdir=$pkgname \
-    --enable-executable-dynamic \
+  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'
-  runghc Setup.hs build
+  runhaskell Setup build $MAKEFLAGS
+}
+
+check() {
+  cd $pkgname-$pkgver
+  HC="ghc -dynamic" runhaskell Setup test
 }
 
 package() {
   cd $pkgname-$pkgver
-  runghc Setup.hs copy --destdir="$pkgdir"
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/alex/BSD3"
+  runhaskell Setup copy --destdir="$pkgdir"
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/alex/
 
   # Doc only contains the license
   rm -rf "$pkgdir/usr/share/doc"



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/alex/-/commit/3f70d75bc459aef69930250ebeeb5e47168a2a93

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/alex/-/commit/3f70d75bc459aef69930250ebeeb5e47168a2a93
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to