From 3114830a3d9b3b71266ac16de08ec597f025087c Mon Sep 17 00:00:00 2001 From: Andrew Shark Date: Fri, 14 Jun 2019 07:08:57 +0300 Subject: [PATCH] synced already existing .installs, added 32 variant for lib32-libgl1-amdgpu-mesa-dri --- amdgpu-core-meta.install | 6 +++--- amdgpu-pro-core-meta.install | 4 ++-- lib32-libgl1-amdgpu-mesa-dri.install | 21 +++++++++++++++++++++ libgl1-amdgpu-mesa-dri.install | 4 ++-- update-amdgpu-dri-links-32.hook | 15 +++++++++++++++ update-amdgpu-dri-links-32.script | 28 ++++++++++++++++++++++++++++ update-amdgpu-dri-links.hook | 2 +- update-amdgpu-dri-links.script | 2 +- 8 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 lib32-libgl1-amdgpu-mesa-dri.install create mode 100644 update-amdgpu-dri-links-32.hook create mode 100644 update-amdgpu-dri-links-32.script diff --git a/amdgpu-core-meta.install b/amdgpu-core-meta.install index b2b774f..9befaa7 100755 --- a/amdgpu-core-meta.install +++ b/amdgpu-core-meta.install @@ -1,4 +1,4 @@ -# 3f5f1e12af4667a5522a0d5862c92a3d amdgpu-core_19.10-785425_all.deb/postinst +# 3f5f1e12af4667a5522a0d5862c92a3d amdgpu-core_19.20-812932_all.deb/postinst # Converted for arch linux: post_install() { prefix=/opt/amdgpu @@ -9,10 +9,10 @@ post_install() { echo "$prefix/lib/i386-linux-gnu" >>$conf } -# e66513716fefe727886eadb5b95923f9 amdgpu-core_19.10-785425_all.deb/preinst +# e66513716fefe727886eadb5b95923f9 amdgpu-core_19.20-812932_all.deb/preinst # There is nothing but checking Ubuntu version there. So did not use it. -# 9f9130053049b57ee04a078ddf71e927 amdgpu-core_19.10-785425_all.deb/prerm +# 9f9130053049b57ee04a078ddf71e927 amdgpu-core_19.20-812932_all.deb/prerm # Converted for arch linux: pre_remove() { rm -f /etc/ld.so.conf.d/20-amdgpu.conf && /sbin/ldconfig diff --git a/amdgpu-pro-core-meta.install b/amdgpu-pro-core-meta.install index bf6b6d2..ef439a2 100644 --- a/amdgpu-pro-core-meta.install +++ b/amdgpu-pro-core-meta.install @@ -1,4 +1,4 @@ -# 995d510d3099f2be343b1d6445a85bdc amdgpu-pro-core_19.10-785425_all.deb/postinst +# 995d510d3099f2be343b1d6445a85bdc amdgpu-pro-core_19.20-812932_all.deb/postinst # Converted for arch linux: post_install() { prefix=/opt/amdgpu-pro @@ -8,7 +8,7 @@ post_install() { echo "$prefix/lib/i386-linux-gnu" >>$conf } -# 41e43dfaf280600942eab53da384100d amdgpu-pro-core_19.10-785425_all.deb/prerm +# 41e43dfaf280600942eab53da384100d amdgpu-pro-core_19.20-812932_all.deb/prerm # Converted for arch linux: pre_remove() { rm -f /etc/ld.so.conf.d/10-amdgpu-pro.conf && /sbin/ldconfig diff --git a/lib32-libgl1-amdgpu-mesa-dri.install b/lib32-libgl1-amdgpu-mesa-dri.install new file mode 100644 index 0000000..f988c68 --- /dev/null +++ b/lib32-libgl1-amdgpu-mesa-dri.install @@ -0,0 +1,21 @@ +# f00d6adb58ed0b888cc28a3b83af9a30 libgl1-amdgpu-mesa-dri_18.3.0-812932_i386.deb/postinst +# Converted for arch linux (install script part): +post_install() { + source /usr/share/libalpm/scripts/update-amdgpu-dri-links-32 + create_links +} + +# 84cfe30e8c9c8e424e230d3c7743c969 libgl1-amdgpu-mesa-dri_18.3.0-812932_i386.deb/prerm +# Converted for arch linux: +pre_remove() { + rm -f /opt/amdgpu/lib/i386-linux-gnu/dri/i965_dri.so + + for f in /opt/amdgpu/lib/i386-linux-gnu/dri/*_dri.so; do + f=${f##*/} + if [ -f /usr/lib32/dri/$f~ ]; then + mv -f /usr/lib32/dri/$f~ /usr/lib32/dri/$f + else + rm -f /usr/lib32/dri/$f + fi + done +} diff --git a/libgl1-amdgpu-mesa-dri.install b/libgl1-amdgpu-mesa-dri.install index 3c5403d..d195c7c 100644 --- a/libgl1-amdgpu-mesa-dri.install +++ b/libgl1-amdgpu-mesa-dri.install @@ -1,11 +1,11 @@ -# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-785425_amd64.deb/postinst +# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-812932_amd64.deb/postinst # Converted for arch linux (install script part): post_install() { source /usr/share/libalpm/scripts/update-amdgpu-dri-links create_links } -# f81f8fbe57013765c0514e53e83caf37 libgl1-amdgpu-mesa-dri_18.3.0-785425_amd64.deb/prerm +# f81f8fbe57013765c0514e53e83caf37 libgl1-amdgpu-mesa-dri_18.3.0-812932_amd64.deb/prerm # Converted for arch linux: pre_remove() { rm -f /opt/amdgpu/lib/x86_64-linux-gnu/dri/i965_dri.so diff --git a/update-amdgpu-dri-links-32.hook b/update-amdgpu-dri-links-32.hook new file mode 100644 index 0000000..455b36f --- /dev/null +++ b/update-amdgpu-dri-links-32.hook @@ -0,0 +1,15 @@ +# f00d6adb58ed0b888cc28a3b83af9a30 libgl1-amdgpu-mesa-dri_18.3.0-812932_i386.deb/postinst +# Converted for arch linux (hook trigger part): + +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +# Target path taken from interest trigger of a debian package, corrected for arch linux +Target = usr/lib32/dri/* + +[Action] +Description = Updating amdgpu dri links 32... +When = PostTransaction +Exec = . /usr/share/libalpm/scripts/update-amdgpu-dri-links-32; remove_links; create_links diff --git a/update-amdgpu-dri-links-32.script b/update-amdgpu-dri-links-32.script new file mode 100644 index 0000000..acd5d67 --- /dev/null +++ b/update-amdgpu-dri-links-32.script @@ -0,0 +1,28 @@ +#!/bin/sh + +# f00d6adb58ed0b888cc28a3b83af9a30 libgl1-amdgpu-mesa-dri_18.3.0-812932_i386.deb/postinst +# Converted for arch linux (hook script part): +create_links() { + for f in /opt/amdgpu/lib/i386-linux-gnu/dri/*_dri.so; do + ln -sb $f /usr/lib32/dri + done + + # Support I+A hybrid graphics + if [ -f /usr/lib32/dri/i965_dri.so ] ; then # there also was && [ "/usr/lib32/dri" != "/opt/amdgpu/lib/x86_64-linux-gnu/dri" ] , but this will always be true due to they compare two strings. + ln -s /usr/lib32/dri/i965_dri.so /opt/amdgpu/lib/i386-linux-gnu/dri + fi +} + +remove_links() { + rm -f /opt/amdgpu/lib/i386-linux-gnu/dri/i965_dri.so + + for f in $(readlink -e /usr/lib32/dri/*.so); do + if [ "${f%/*}" = "/opt/amdgpu/lib/i386-linux-gnu/dri" ]; then # I (Ashark) fixed ${f%%/*} -> ${f%/*} + f=${f##*/} + rm -f /usr/lib32/dri/$f + if [ -f /usr/lib32/dri/$f~ ]; then + mv -f /usr/lib32/dri/$f{~,} + fi + fi + done +} diff --git a/update-amdgpu-dri-links.hook b/update-amdgpu-dri-links.hook index bfbebcd..a9516f7 100644 --- a/update-amdgpu-dri-links.hook +++ b/update-amdgpu-dri-links.hook @@ -1,4 +1,4 @@ -# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-785425_amd64.deb/postinst +# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-812932_amd64.deb/postinst # Converted for arch linux (hook trigger part): [Trigger] diff --git a/update-amdgpu-dri-links.script b/update-amdgpu-dri-links.script index c5a50db..f5f0293 100644 --- a/update-amdgpu-dri-links.script +++ b/update-amdgpu-dri-links.script @@ -1,6 +1,6 @@ #!/bin/sh -# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-785425_amd64.deb/postinst +# d92079d94c43be3c80dfdc3fc0221a71 libgl1-amdgpu-mesa-dri_18.3.0-812932_amd64.deb/postinst # Converted for arch linux (hook script part): create_links() { for f in /opt/amdgpu/lib/x86_64-linux-gnu/dri/*_dri.so; do