File libxnvctrl-soname-sover.patch of Package libXNVCtrl

diff -ruN nvidia-settings-435.21.orig/src/libXNVCtrl/Makefile nvidia-settings-435.21/src/libXNVCtrl/Makefile
--- nvidia-settings-435.21.orig/src/libXNVCtrl/Makefile	2019-08-25 17:02:17.000000000 +0300
+++ nvidia-settings-435.21/src/libXNVCtrl/Makefile	2019-09-21 00:46:45.357739383 +0300
@@ -50,8 +50,8 @@

 .PHONY: clean

-all: $(LIBXNVCTRL)
+all: $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)

 clean:
-	rm -rf $(LIBXNVCTRL) *~ \
+	rm -rf $(LIBXNVCTRL) $(LIBXNVCTRL_SHARED)* *~ \
 		$(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d
diff -ruN nvidia-settings-435.21.orig/src/libXNVCtrl/xnvctrl.mk nvidia-settings-435.21/src/libXNVCtrl/xnvctrl.mk
--- nvidia-settings-435.21.orig/src/libXNVCtrl/xnvctrl.mk	2019-08-25 17:02:18.000000000 +0300
+++ nvidia-settings-435.21/src/libXNVCtrl/xnvctrl.mk	2019-09-21 00:46:45.357739383 +0300
@@ -39,6 +39,11 @@

 LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a

+LIBXNVCTRL_SHARED = libXNVCtrl.so
+LIBXNVCTRL_ABI_VERSION_MAJOR = 0
+LIBXNVCTRL_ABI_VERSION_MINOR = 0
+LIBXNVCTRL_LIBS += -lXext -lX11
+
 LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c

 LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC))
@@ -47,3 +52,8 @@

 $(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ)
 	$(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ)
+
+$(LIBXNVCTRL_SHARED) : $(LIBXNVCTRL_OBJ)
+	$(CC) -shared $(CFLAGS) $(LDFLAGS) -Wl,-soname=$(notdir $@).${LIBXNVCTRL_ABI_VERSION_MAJOR} -o $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $^ $(LIBXNVCTRL_LIBS)
+	ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@
+	ln -s $(notdir $@).$(LIBXNVCTRL_ABI_VERSION_MAJOR).$(LIBXNVCTRL_ABI_VERSION_MINOR).0 $@.$(LIBXNVCTRL_ABI_VERSION_MAJOR)