16d39326b1d7278e6fbeb8b247564f377f21cb48 — Kridsada Thanabulpong a month ago 5f8a9db
Fix OS detection
3 files changed, 17 insertions(+), 14 deletions(-)

M .SRCINFO
M PKGBUILD
M patch_Makefile.patch
M .SRCINFO => .SRCINFO +2 -2
@@ 1,7 1,7 @@ pkgbase = amdgpu-dkms
  	pkgdesc = DKMS AMDGPU driver from AMD
  	pkgver = 19.30_838629
- 	pkgrel = 3
+ 	pkgrel = 4
  	url = https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-navi-linux
  	arch = x86_64
  	license = custom


@@ 47,7 47,7 @@ sha256sums = 04cd611a19cd0bc47c8d300f623e4b1b1999ad2a9d4fa1040ac87fcfde968552
  	sha256sums = 3f650c253593ea7969be36ce64f6a6f23e41fa2088738e03cc1d5a89c33d54e7
  	sha256sums = 3079a671f88e4710f9a1698a7c1854fe6b275b4dfe916308f172c3545c721870
- 	sha256sums = 13aba0223748b6af424058c250cb8d957ce56230b3044f98b66117a14fc5cc04
+ 	sha256sums = f43cf8f6f68129a2c718d6bb0313890972baef7e1b6a1edd8970dcf14d81ca65
  
  pkgname = amdgpu-dkms
  

M PKGBUILD => PKGBUILD +2 -2
@@ 4,7 4,7 @@ pkgname='amdgpu-dkms'
  pkgver=${major}_${minor}
  pkgdesc="DKMS AMDGPU driver from AMD"
- pkgrel=3
+ pkgrel=4
  arch=('x86_64')
  url=https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-navi-linux
  license=('custom')


@@ 54,7 54,7 @@ '04cd611a19cd0bc47c8d300f623e4b1b1999ad2a9d4fa1040ac87fcfde968552'
              '3f650c253593ea7969be36ce64f6a6f23e41fa2088738e03cc1d5a89c33d54e7'
              '3079a671f88e4710f9a1698a7c1854fe6b275b4dfe916308f172c3545c721870'
-             '13aba0223748b6af424058c250cb8d957ce56230b3044f98b66117a14fc5cc04')
+             'f43cf8f6f68129a2c718d6bb0313890972baef7e1b6a1edd8970dcf14d81ca65')
  
  build() {
      cd "${srcdir}/amdgpu-pro-${major}-${minor}-ubuntu-18.04"

M patch_Makefile.patch => patch_Makefile.patch +13 -10
@@ 1,16 1,19 @@---- ./Makefile.orig	2019-07-06 00:42:03.000000000 +0000
- +++ ./Makefile	2019-07-23 17:48:36.559101824 +0000
- @@ -18,11 +18,17 @@
-  OS_VERSION = $(shell sed -n 's/^VERSION_ID=\(.*\)/\1/p' /etc/os-release)
-  endif
-  else
- +ifneq (,$(wildcard /etc/arch-release))
+ --- ./Makefile.orig	2019-08-03 13:16:07.119970095 +0000
+ +++ ./Makefile	2019-08-03 13:24:43.649956177 +0000
+ @@ -4,6 +4,12 @@
+  ifneq (,$(RHEL_MAJOR))
+  OS_NAME = "rhel"
+  OS_VERSION = "$(RHEL_MAJOR).$(RHEL_MINOR)"
+ +else ifneq (,$(wildcard /etc/arch-release))
  +OS_NAME = "arch"
+ +OS_VERSION = "rolling"
  +else ifneq (,$(wildcard /etc/artix-release))
  +OS_NAME = "arch"
- +else
-  OS_NAME = "unknown"
- +endif
+ +OS_VERSION = "rolling"
+  else ifneq (,$(wildcard /etc/os-release))
+  OS_NAME = "$(shell sed -n 's/^ID=\(.*\)/\1/p' /etc/os-release | tr -d '\"')"
+  # On CentOS/RHEL, users could have installed a kernel not distributed from RHEL
+ @@ -22,7 +28,7 @@
   OS_VERSION = "0.0"
   endif