diff options
author | Alexander Georgievskiy | 2020-12-13 01:41:23 +0300 |
---|---|---|
committer | Alexander Georgievskiy | 2020-12-13 01:41:23 +0300 |
commit | 4c5dcaff9279bcc4fcb56ab965a2c068fcefb6fd (patch) | |
tree | 8e357cf484dabcb0ddf7e77f1fe6cd5d4fe1f5c8 | |
parent | 9d4a023e2e6a547aac02750f15670431a60333f5 (diff) | |
download | aur-4c5dcaff9279bcc4fcb56ab965a2c068fcefb6fd.tar.gz |
systemd
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | lib32-ffmpeg-steam-libx.path | 6 | ||||
-rw-r--r-- | lib32-ffmpeg-steam-libx.service | 19 | ||||
-rw-r--r-- | lib32-ffmpeg-steam.service | 13 |
5 files changed, 61 insertions, 16 deletions
@@ -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 @@ -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 000000000000..e006586ff5d9 --- /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 000000000000..7aed4fdd1808 --- /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 000000000000..86c6b7a2cf20 --- /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 |