summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Jin2022-05-26 16:57:55 +0800
committerBin Jin2022-05-26 16:57:55 +0800
commit618de502f12734ab0f61e093827ebb5b5a40b130 (patch)
treecfc14ca0b8b784cf7f6a0de05847fee70db2768c
downloadaur-618de502f12734ab0f61e093827ebb5b5a40b130.tar.gz
initial commit
-rw-r--r--.SRCINFO31
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD62
-rw-r--r--gyroflow.desktop10
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..688d7e4f1093
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,31 @@
+pkgbase = gyroflow-git
+ pkgdesc = Video stabilization using gyroscope data (Git version)
+ pkgver = 1.0.1.22.g304b71f
+ pkgrel = 1
+ url = https://gyroflow.xyz/
+ arch = x86_64
+ license = GPL3
+ makedepends = cargo
+ makedepends = opencl-headers
+ depends = libc++
+ depends = qt6-base
+ depends = qt6-quick3d
+ depends = qt6-declarative
+ depends = qt6-3d
+ depends = pulseaudio
+ depends = libxkbcommon
+ depends = opencv
+ depends = ocl-icd
+ depends = ffmpeg
+ optdepends = opencl-driver: OpenCL driver for GPU stabilization acceleration
+ optdepends = libva-mesa-driver: VAAPI video acceleration for NVIDIA and AMD GPU
+ optdepends = intel-media-driver: VAAPI video acceleration for Intel GPU
+ provides = gyroflow
+ conflicts = gyroflow
+ conflicts = gyroflow-appimage
+ source = gyroflow::git+https://github.com/gyroflow/gyroflow.git
+ source = gyroflow.desktop
+ sha512sums = SKIP
+ sha512sums = 03279c2568350619f1cbdd88960e77773f55bafa4da81de4fb9276743fa66ff11edd0149af9caae7ecba3afa3b8704217552634973373aaaf98f20f64fa95a84
+
+pkgname = gyroflow-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..c82a7749f1c9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pkg.tar.*
+gyroflow/
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..49d51222aa95
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,62 @@
+# Maintainer: bjin <bjin@ctrl-d.org>
+# Contributor: Alynx Zhou <alynx.zhou@gmail.com>
+
+_pkgname=gyroflow
+pkgname=${_pkgname}-git
+pkgver=1.0.1.22.g304b71f
+pkgrel=1
+pkgdesc="Video stabilization using gyroscope data (Git version)"
+arch=("x86_64")
+url="https://gyroflow.xyz/"
+provides=("$_pkgname")
+conflicts=("$_pkgname" "${_pkgname}-appimage")
+license=("GPL3")
+depends=("libc++" "qt6-base" "qt6-quick3d" "qt6-declarative" "qt6-3d" "pulseaudio" "libxkbcommon" "opencv" "ocl-icd" "ffmpeg")
+makedepends=("cargo" "opencl-headers")
+optdepends=("opencl-driver: OpenCL driver for GPU stabilization acceleration"
+ "libva-mesa-driver: VAAPI video acceleration for NVIDIA and AMD GPU"
+ "intel-media-driver: VAAPI video acceleration for Intel GPU")
+source=("$_pkgname::git+https://github.com/gyroflow/gyroflow.git"
+ "$_pkgname.desktop")
+sha512sums=("SKIP"
+ "03279c2568350619f1cbdd88960e77773f55bafa4da81de4fb9276743fa66ff11edd0149af9caae7ecba3afa3b8704217552634973373aaaf98f20f64fa95a84")
+
+pkgver() {
+ cd "$_pkgname"
+ git describe --long --tags | sed 's/^v//;s/-/./g'
+}
+
+prepare() {
+ cd "${_pkgname}"
+ cargo update
+ cargo fetch --locked --target "${CARCH}-unknown-linux-gnu"
+}
+
+build() {
+ cd "${_pkgname}"
+ # Currently Arch has both qt5 and qt6, and `/usr/bin/qmake` is qt5, this
+ # package needs qt6.
+ export QMAKE="/usr/bin/qmake6"
+ # Use system libraries.
+ export FFMPEG_DIR="/usr"
+ export OPENCV_LINK_PATHS="/usr"
+ # See <https://github.com/gyroflow/gyroflow/blob/master/__env-linux.sh>.
+ # But I need to add `opencv_dnn` to build it.
+ export OPENCV_LINK_LIBS="opencv_core,opencv_calib3d,opencv_features2d,opencv_imgproc,opencv_video,opencv_flann,opencv_dnn"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
+
+package() {
+ cd "${_pkgname}"
+ # Gyroflow currently has no compiling options for custom resource path,
+ # so I have to install it into `/opt` to put it together with camera
+ # presets.
+ install -Dm0755 "target/release/${_pkgname}" "${pkgdir}/opt/${_pkgname}/${_pkgname}"
+ # I can't find any existing package for this file.
+ install -Dm0755 "target/release/libmdk.so.0" "${pkgdir}/opt/${_pkgname}/libmdk.so.0"
+ cp -a "resources/camera_presets" "${pkgdir}/opt/${_pkgname}"
+ install -Dm0644 "resources/icon.svg" "${pkgdir}/usr/share/pixmaps/${_pkgname}.svg"
+ install -Dm0644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
+}
diff --git a/gyroflow.desktop b/gyroflow.desktop
new file mode 100644
index 000000000000..242d0858bd15
--- /dev/null
+++ b/gyroflow.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=application
+Name=Gyroflow
+Comment=Video stabilization using gyroscope data
+Exec=/opt/gyroflow/gyroflow %U
+Icon=gyroflow
+StartupNotify=false
+Terminal=false
+Categories=Graphics;Photography;AudioVideo;
+MimeType=video/mp4;video/mpeg; \ No newline at end of file