Alexander Rødseth pushed to branch main at Arch Linux / Packaging / Packages / 
asciinema


Commits:
51f5e1a5 by Caleb Maclennan at 2024-07-30T19:52:41+00:00
Update packaging for v3 using Rust tooling

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,17 +1,16 @@
 pkgbase = asciinema
        pkgdesc = Record and share terminal sessions
-       pkgver = 2.4.0
-       pkgrel = 3
-       url = https://asciinema.org/
+       pkgver = 3.0.0rc.3
+       pkgrel = 1
+       url = https://asciinema.org
        arch = any
-       license = GPL3
+       license = GPL-3.0-only
+       makedepends = cargo
        makedepends = git
-       makedepends = python-setuptools
-       makedepends = python-wheel
-       makedepends = python-build
-       makedepends = python-installer
-       depends = python
-       source = git+https://github.com/asciinema/asciinema#tag=v2.4.0
-       sha256sums = 
ad52df52cc18d58477d7eb8d0e9897f3c6834693c3dd13c9b97e0dcc88908685
+       depends = gcc-libs
+       depends = glibc
+       options = !lto
+       source = git+https://github.com/asciinema/asciinema.git#tag=v3.0.0-rc.3
+       sha256sums = 
0ea8d7a2bb74ad0b7e053a45044bfa5376bec54b2b2a098fa2787e585435a4eb
 
 pkgname = asciinema


=====================================
PKGBUILD
=====================================
@@ -3,28 +3,53 @@
 # Contributor: Marcin Kulik <mar...@asciinema.org>
 
 pkgname=asciinema
-pkgver=2.4.0
-pkgrel=3
+pkgver=3.0.0rc.3
+pkgrel=1
 pkgdesc='Record and share terminal sessions'
 arch=(any)
-url='https://asciinema.org/'
-license=(GPL3)
-depends=(python)
-makedepends=(git python-setuptools python-wheel python-build python-installer)
-source=("git+https://github.com/asciinema/asciinema#tag=v$pkgver";) # tag: 
v2.4.0
-sha256sums=('ad52df52cc18d58477d7eb8d0e9897f3c6834693c3dd13c9b97e0dcc88908685')
+url=https://asciinema.org
+license=(GPL-3.0-only)
+depends=(gcc-libs
+         glibc)
+makedepends=(cargo
+             git)
+options=(!lto)
+source=("git+https://github.com/asciinema/$pkgname.git#tag=v${pkgver/rc/-rc}";)
+sha256sums=('0ea8d7a2bb74ad0b7e053a45044bfa5376bec54b2b2a098fa2787e585435a4eb')
 
 prepare() {
-  echo -e '#!/bin/sh\n/usr/bin/python -m asciinema "$@"' > 
"$pkgname/asciinema.sh"
+       cd "$pkgname"
+       cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
 }
 
 build() {
-  cd $pkgname
-  python -m build --wheel --no-isolation
+       cd "$pkgname"
+       env \
+               CARGO_PROFILE_RELEASE_LTO=true \
+               CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 \
+               CARGO_PROFILE_RELEASE_DEBUG=2 \
+               ASCIINEMA_GEN_DIR="$PWD" \
+       cargo build --frozen --release
+       mv completion/asciinema{.bash,}
+}
+
+check() {
+       cd "$pkgname"
+       local skipped=(
+               pty::tests::exec_basic # PTY interaction
+               pty::tests::exec_quick # PTY interaction
+       )
+       cargo test --frozen -- ${skipped[@]/#/--skip }
 }
 
 package() {
-  cd $pkgname
-  install -Dm755 -t "$pkgdir/usr/bin" asciinema.sh
-  python -m installer --destdir="$pkgdir" dist/*.whl
+       cd $pkgname
+       install -Dm0755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
+       install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+       install -Dm0644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
+       install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" 
"completion/$pkgname"
+       install -Dm0644 -t "$pkgdir/usr/share/elvish/lib/" 
"completion/$pkgname.elv"
+       install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" 
"completion/$pkgname.fish"
+       install -Dm0644 -t "$pkgdir/usr/share/zsh/site-functions/" 
"completion/_$pkgname"
+       install -Dm0644 -t "$pkgdir/usr/share/man/man1/" man/*.1
 }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/asciinema/-/commit/51f5e1a5152b4561aefdcbe9ed33773c552dd9a7

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


Reply via email to