summaryrefslogtreecommitdiff
path: root/opt/wl-screenrec/MAKEPKG
diff options
context:
space:
mode:
Diffstat (limited to 'opt/wl-screenrec/MAKEPKG')
-rw-r--r--opt/wl-screenrec/MAKEPKG51
1 files changed, 51 insertions, 0 deletions
diff --git a/opt/wl-screenrec/MAKEPKG b/opt/wl-screenrec/MAKEPKG
new file mode 100644
index 0000000..14d824c
--- /dev/null
+++ b/opt/wl-screenrec/MAKEPKG
@@ -0,0 +1,51 @@
+#!/bin/mkpkg
+# description: High performance wlroots screen recording with hardware encoding
+# url: https://github.com/russelltg/wl-screenrec
+
+name=wl-screenrec
+version=0.3.1
+release=2
+depends=(ffmpeg libdrm libva)
+makedeps=(rust vulkan-headers pkgconf cargo-audit)
+source=(https://github.com/russelltg/wl-screenrec/archive/refs/tags/v$version.tar.gz)
+renames=($name-$version.tar.gz)
+sha256sums=(
+ "b55564cea4af0e20a5d9a350381fe8d26bf6b2addabbc81d15cafeaa5a5ad1e6"
+)
+
+patch() {
+ export CARGO_HOME="$SRC/.cargo"
+ cd $name-$version
+ cargo vendor ../vendor
+ mkdir -p .cargo
+ printf '%s\n' \
+ '[source.crates-io]' \
+ 'replace-with = "vendored-sources"' \
+ '' \
+ '[source."git+https://github.com/russelltg/rust-ffmpeg-sys?branch=vulkan"]' \
+ 'git = "https://github.com/russelltg/rust-ffmpeg-sys"' \
+ 'branch = "vulkan"' \
+ 'replace-with = "vendored-sources"' \
+ '' \
+ '[source.vendored-sources]' \
+ 'directory = "../vendor"' \
+ > .cargo/config.toml
+ #cargo audit
+}
+
+build() {
+ export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem
+ export CARGO_PROFILE_RELEASE_LTO=off
+ export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld -C target-feature=-crt-static"
+ cd $name-$version
+ cargo build --release --offline
+ install -Dm755 target/release/$name $PKG/usr/bin/$name
+}
+
+signify() {
+ untrusted comment: public key
+ RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
+}
+
+# vim: filetype=sh
+