summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD28
-rw-r--r--lib32-ffmpeg-steam-libx.path6
-rw-r--r--lib32-ffmpeg-steam-libx.service19
-rw-r--r--lib32-ffmpeg-steam.service13
5 files changed, 61 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 300b9326b1d..a40ba4e3aec 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,18 @@
pkgbase = lib32-ffmpeg-steam
- pkgdesc = ln -s /usr/lib32/libav*.so.57 /home/*/.local/share/Steam/ubuntu12_32/libav*.so.57 (fix VAAPI memleak for Steam)
+ pkgdesc = ln -s /usr/lib32/libav*.so* /home/*/.local/share/Steam/ubuntu12_32/libav*.so* (fix VAAPI memleak for Steam)
pkgver = 0.1.0
- pkgrel = 1
+ pkgrel = 2
url = https://freedesktop.org/wiki/Software/vaapi
arch = x86_64
license = MIT
depends = lib32-ffmpeg-compat-57
+ depends = steam
+ source = lib32-ffmpeg-steam-libx.path
+ source = lib32-ffmpeg-steam-libx.service
+ source = lib32-ffmpeg-steam.service
+ sha512sums = SKIP
+ sha512sums = SKIP
+ sha512sums = SKIP
pkgname = lib32-ffmpeg-steam
diff --git a/PKGBUILD b/PKGBUILD
index e968a89eafa..a0dcd77e814 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,25 +2,25 @@
pkgname=lib32-ffmpeg-steam
pkgver=0.1.0
-pkgrel=1
-pkgdesc='ln -s /usr/lib32/libav*.so.57 /home/*/.local/share/Steam/ubuntu12_32/libav*.so.57 (fix VAAPI memleak for Steam)'
+pkgrel=2
+pkgdesc='ln -s /usr/lib32/libav*.so* /home/*/.local/share/Steam/ubuntu12_32/libav*.so* (fix VAAPI memleak for Steam)'
arch=(x86_64)
url='https://freedesktop.org/wiki/Software/vaapi'
license=('MIT')
-depends=(lib32-ffmpeg-compat-57)
+depends=(lib32-ffmpeg-compat-57 steam)
makedepends=()
optdepends=()
-source=()
-sha512sums=()
-
-symlink() {
- find /home -type f ! -wholename '*/steam-runtime/*' -name "$1" -exec bash -c "mkdir -p ${pkgdir}\$(dirname {})" \;
- find /home -type f ! -wholename '*/steam-runtime/*' -name "$1" -exec bash -c "ln -s /usr/lib32/\$(basename {}) ${pkgdir}{}" \;
-}
+source=('lib32-ffmpeg-steam-libx.path'
+ 'lib32-ffmpeg-steam-libx.service'
+ 'lib32-ffmpeg-steam.service')
+sha512sums=('5644ed41aed835627a941773ff7480d53332d7a6ed4ca27015f2783996e1ad0e'
+ '7128cef1d717ec75c8b2ac39ed84ea87f074d06318a857b2d02cf0d9bd353027'
+ '2dfb0a9f6ccce89d796a52223f092df656707aaca52be9962903a343183ecd05')
package() {
- symlink 'libavresample.so*'
- symlink 'libavcodec.so*'
- symlink 'libavutil.so*'
- symlink 'libavformat.so*'
+ install -D ../lib32-ffmpeg-steam-libx.path "${pkgdir}/usr/lib/systemd/user/lib32-ffmpeg-steam-libx.path"
+
+ install -D ../lib32-ffmpeg-steam-libx.service "${pkgdir}/usr/lib/systemd/user/lib32-ffmpeg-steam-libx.service"
+
+ install -D ../lib32-ffmpeg-steam.service "${pkgdir}/usr/lib/systemd/user/lib32-ffmpeg-steam.service"
}
diff --git a/lib32-ffmpeg-steam-libx.path b/lib32-ffmpeg-steam-libx.path
new file mode 100644
index 00000000000..e006586ff5d
--- /dev/null
+++ b/lib32-ffmpeg-steam-libx.path
@@ -0,0 +1,6 @@
+[Unit]
+Wants=lib32-ffmpeg-steam-libx.service
+PartOf=lib32-ffmpeg-steam.service
+
+[Path]
+PathChanged=%h/.local/share/Steam/ubuntu12_32
diff --git a/lib32-ffmpeg-steam-libx.service b/lib32-ffmpeg-steam-libx.service
new file mode 100644
index 00000000000..7aed4fdd180
--- /dev/null
+++ b/lib32-ffmpeg-steam-libx.service
@@ -0,0 +1,19 @@
+[Unit]
+Wants=lib32-ffmpeg-steam.service
+
+[Service]
+Type=oneshot
+# -
+ExecStart=mkdir -p %h/.local/share/lib32-ffmpeg-steam
+# -
+ExecStart=/bin/sh -c 'test -L %h/.local/share/Steam/ubuntu12_32/libavcodec.so.57 || mv %h/.local/share/Steam/ubuntu12_32/libavcodec.so.57 %h/.local/share/lib32-ffmpeg-steam/libavcodec.so.57'
+ExecStart=-/usr/bin/ln -s /usr/lib32/libavcodec.so.57 %h/.local/share/Steam/ubuntu12_32/libavcodec.so.57
+# -
+ExecStart=/bin/sh -c 'test -L %h/.local/share/Steam/ubuntu12_32/libavformat.so.57 || mv %h/.local/share/Steam/ubuntu12_32/libavformat.so.57 %h/.local/share/lib32-ffmpeg-steam/libavformat.so.57'
+ExecStart=-/usr/bin/ln -s /usr/lib32/libavformat.so.57 %h/.local/share/Steam/ubuntu12_32/libavformat.so.57
+# -
+ExecStart=/bin/sh -c 'test -L %h/.local/share/Steam/ubuntu12_32/libavresample.so.3 || mv %h/.local/share/Steam/ubuntu12_32/libavresample.so.3 %h/.local/share/lib32-ffmpeg-steam/libavresample.so.3'
+ExecStart=-/usr/bin/ln -s /usr/lib32/libavresample.so.3 %h/.local/share/Steam/ubuntu12_32/libavresample.so.3
+# -
+ExecStart=/bin/sh -c 'test -L %h/.local/share/Steam/ubuntu12_32/libavutil.so.55 || mv %h/.local/share/Steam/ubuntu12_32/libavutil.so.55 %h/.local/share/lib32-ffmpeg-steam/libavutil.so.55'
+ExecStart=-/usr/bin/ln -s /usr/lib32/libavutil.so.55 %h/.local/share/Steam/ubuntu12_32/libavutil.so.55
diff --git a/lib32-ffmpeg-steam.service b/lib32-ffmpeg-steam.service
new file mode 100644
index 00000000000..86c6b7a2cf2
--- /dev/null
+++ b/lib32-ffmpeg-steam.service
@@ -0,0 +1,13 @@
+[Unit]
+Wants=lib32-ffmpeg-steam-libx.service
+After=lib32-ffmpeg-steam-libx.path
+
+[Service]
+# yes, this is oneshot. Cannot use Steam until all symlinks is set
+Type=oneshot
+# just for beautiful green
+RemainAfterExit=yes
+ExecStop=mv %h/.local/share/lib32-ffmpeg-steam/libavcodec.so.57 %h/.local/share/Steam/ubuntu12_32/libavcodec.so.57
+ExecStop=mv %h/.local/share/lib32-ffmpeg-steam/libavformat.so.57 %h/.local/share/Steam/ubuntu12_32/libavformat.so.57
+ExecStop=mv %h/.local/share/lib32-ffmpeg-steam/libavresample.so.3 %h/.local/share/Steam/ubuntu12_32/libavresample.so.3
+ExecStop=mv %h/.local/share/lib32-ffmpeg-steam/libavutil.so.55 %h/.local/share/Steam/ubuntu12_32/libavutil.so.55