foryali first commit
works continue..
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import pythonmodules
|
||||
|
||||
def setup():
|
||||
# remove pae modules
|
||||
pisitools.dosed("panda.py", "-pae-", deleteLine=True)
|
||||
|
||||
pythonmodules.compile()
|
||||
|
||||
def install():
|
||||
pythonmodules.install()
|
||||
|
||||
pisitools.dodoc('AUTHORS', 'COPYING', 'README')
|
||||
@@ -0,0 +1,29 @@
|
||||
--- panda.py~ 2013-12-22 18:35:44.986644221 +0100
|
||||
+++ panda.py 2013-12-23 10:50:00.433218873 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
import pisi
|
||||
import shutil
|
||||
from subprocess import call
|
||||
+from distutils import util
|
||||
|
||||
sysdir = "/sys/bus/pci/devices/"
|
||||
driversDB = "/usr/share/X11/DriversDB"
|
||||
@@ -36,7 +37,7 @@
|
||||
"module-nvidia-current-userspace",
|
||||
"xorg-video-nvidia-current",
|
||||
"nvidia-xconfig",
|
||||
- "nvidia-settings"] ,
|
||||
+ "nvidia-settings"],
|
||||
"nvidia96": ["module-nvidia96",
|
||||
"module-pae-nvidia96",
|
||||
"module-nvidia96-userspace",
|
||||
@@ -54,6 +55,9 @@
|
||||
"xorg-video-nvidia304",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"]}
|
||||
+ if util.get_platform() == "linux-x86_64":
|
||||
+ self.driver_packages["fglrx"].append("xorg-video-fglrx-32bit")
|
||||
+ self.driver_packages["nvidia-current"].append("xorg-video-nvidia-current-32bit")
|
||||
|
||||
def __get_primary_driver(self):
|
||||
'''Get driver name for the working primary device'''
|
||||
@@ -0,0 +1,46 @@
|
||||
--- panda.py~ 2013-09-11 23:01:06.715664263 +0200
|
||||
+++ panda.py 2013-09-11 23:39:47.000000000 +0200
|
||||
@@ -48,6 +48,11 @@
|
||||
"module-nvidia173-userspace",
|
||||
"xorg-video-nvidia173",
|
||||
"nvidia-xconfig",
|
||||
+ "nvidia-settings"],
|
||||
+ "nvidia304": ["module-nvidia304",
|
||||
+ "module-nvidia304-userspace",
|
||||
+ "xorg-video-nvidia304",
|
||||
+ "nvidia-xconfig",
|
||||
"nvidia-settings"]}
|
||||
|
||||
def __get_primary_driver(self):
|
||||
@@ -120,7 +125,7 @@
|
||||
if self.driver_name == "fglrx":
|
||||
self.os_driver = "radeon"
|
||||
return self.os_driver
|
||||
- elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"]:
|
||||
+ elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
|
||||
self.os_driver = "nouveau"
|
||||
return self.os_driver
|
||||
else:
|
||||
@@ -169,10 +174,10 @@
|
||||
status, modified = self.update_grub_default_entries(arg)
|
||||
if status in ["os", "generic", "vendor"] and modified:
|
||||
self.update_grub_cfg()
|
||||
- self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "fglrx"] and status == "vendor" else "mesa")
|
||||
- if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"] and status == "vendor":
|
||||
+ self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
|
||||
+ if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
|
||||
open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
|
||||
- elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"] and os.path.isfile(nvidia_blacklist_file):
|
||||
+ elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
|
||||
os.remove(nvidia_blacklist_file)
|
||||
|
||||
|
||||
@@ -221,7 +226,7 @@
|
||||
if self.driver_name is None:
|
||||
self.__get_primary_driver()
|
||||
|
||||
- if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173"]:
|
||||
+ if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
|
||||
return ["vendor", "os", "generic"]
|
||||
elif "Not defined" == self.driver_name:
|
||||
return ["os", "generic"]
|
||||
@@ -0,0 +1,53 @@
|
||||
--- panda-0.2.orig/panda.py 2014-11-14 02:12:02.000000000 +0200
|
||||
+++ panda-0.2/panda.py 2014-11-14 02:20:47.921188120 +0200
|
||||
@@ -46,6 +46,10 @@
|
||||
"xorg-video-nvidia173",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"],
|
||||
+ "nvidia340": ["module-nvidia340",
|
||||
+ "xorg-video-nvidia340",
|
||||
+ "nvidia-xconfig",
|
||||
+ "nvidia-settings"],
|
||||
"nvidia304": ["module-nvidia304",
|
||||
"xorg-video-nvidia304",
|
||||
"nvidia-xconfig",
|
||||
@@ -53,6 +58,7 @@
|
||||
if util.get_platform() == "linux-x86_64":
|
||||
self.driver_packages["fglrx"].append("xorg-video-fglrx-32bit")
|
||||
self.driver_packages["nvidia-current"].append("xorg-video-nvidia-current-32bit")
|
||||
+ self.driver_packages["nvidia340"].append("xorg-video-nvidia340-32bit")
|
||||
|
||||
def __get_primary_driver(self):
|
||||
'''Get driver name for the working primary device'''
|
||||
@@ -124,7 +130,7 @@
|
||||
if self.driver_name == "fglrx":
|
||||
self.os_driver = "radeon"
|
||||
return self.os_driver
|
||||
- elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
|
||||
+ elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304" ,"nvidia340"]:
|
||||
self.os_driver = "nouveau"
|
||||
return self.os_driver
|
||||
else:
|
||||
@@ -173,10 +179,10 @@
|
||||
status, modified = self.update_grub_default_entries(arg)
|
||||
if status in ["os", "generic", "vendor"] and modified:
|
||||
self.update_grub_cfg()
|
||||
- self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "fglrx"] and status == "vendor" else "mesa")
|
||||
- if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and status == "vendor":
|
||||
+ self.set_libGL(self.driver_name if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340", "fglrx"] and status == "vendor" else "mesa")
|
||||
+ if self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and status == "vendor":
|
||||
open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
|
||||
- elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
|
||||
+ elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"] and os.path.isfile(nvidia_blacklist_file):
|
||||
os.remove(nvidia_blacklist_file)
|
||||
|
||||
return status
|
||||
@@ -224,7 +230,7 @@
|
||||
if self.driver_name is None:
|
||||
self.__get_primary_driver()
|
||||
|
||||
- if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"]:
|
||||
+ if self.driver_name in "fglrx" or self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304", "nvidia340"]:
|
||||
return ["vendor", "os", "generic"]
|
||||
elif "Not defined" == self.driver_name:
|
||||
return ["os", "generic"]
|
||||
@@ -0,0 +1,50 @@
|
||||
--- panda.py~ 2013-06-26 23:14:48.709209877 +0200
|
||||
+++ panda.py 2013-06-26 23:15:23.467208607 +0200
|
||||
@@ -269,10 +269,10 @@
|
||||
|
||||
with open(grub_default_file) as grub_default:
|
||||
for line in grub_default:
|
||||
- if "GRUB_CMDLINE_LINUX=" in line:
|
||||
+ if "GRUB_CMDLINE_LINUX_DEFAULT=" in line:
|
||||
params = {} if line.startswith("#") else dict((k, v.split(','))
|
||||
for k,v in (item.split('=') if "=" in item else (item, '')
|
||||
- for item in line.replace('"', '').split("LINUX=")[1].split()))
|
||||
+ for item in line.replace('"', '').replace("'", "").split("DEFAULT=")[1].split()))
|
||||
old_line = " ".join(["%s%s%s" % (k, "=" if l[0] else "", ",".join([v for v in l])) for k, l in sorted(params.items())])
|
||||
if arg == "os":
|
||||
try :
|
||||
@@ -285,10 +285,6 @@
|
||||
if not params["xorg"] or not params["xorg"][0]: del params["xorg"]
|
||||
except KeyError:
|
||||
pass
|
||||
- try :
|
||||
- del params["vga"]
|
||||
- except KeyError:
|
||||
- pass
|
||||
status = "os"
|
||||
|
||||
elif arg == "vendor":
|
||||
@@ -302,7 +298,6 @@
|
||||
if not params["xorg"] or not params["xorg"][0]: del params["xorg"]
|
||||
except KeyError:
|
||||
pass
|
||||
- if self.driver_name in ["nvidia-current"]: params["vga"] = ["794"]
|
||||
status = "vendor"
|
||||
|
||||
elif arg == "generic":
|
||||
@@ -430,4 +425,3 @@
|
||||
# print p.update_grub_entries("vendor")
|
||||
print p.update_system_files("vendor")
|
||||
print p.get_needed_driver_packages(installable=False)
|
||||
-
|
||||
--- panda.py~ 2013-07-12 12:33:05.029649344 +0200
|
||||
+++ panda.py 2013-07-12 12:33:09.728649172 +0200
|
||||
@@ -309,7 +309,7 @@
|
||||
|
||||
new_line = " ".join(["%s%s" % ("%s=" % k if l[0] else k, ",".join([v for v in l])) for k, l in sorted(params.items())])
|
||||
configured = old_line != new_line
|
||||
- new_line = 'GRUB_CMDLINE_LINUX="%s"\n' % new_line
|
||||
+ new_line = 'GRUB_CMDLINE_LINUX_DEFAULT="%s"\n' % new_line
|
||||
grub_tmp.write(new_line)
|
||||
else:
|
||||
grub_tmp.write(line)
|
||||
@@ -0,0 +1,18 @@
|
||||
--- panda.py~ 2014-04-12 20:47:04.213380223 +0200
|
||||
+++ panda.py 2014-04-12 20:51:07.980049491 +0200
|
||||
@@ -30,7 +30,6 @@
|
||||
self.os_driver = None
|
||||
self.driver_packages = {"fglrx": ["module-fglrx",
|
||||
"module-pae-fglrx",
|
||||
- "module-fglrx-userspace",
|
||||
"xorg-video-fglrx"],
|
||||
"nvidia-current": ["module-nvidia-current",
|
||||
"module-pae-nvidia-current",
|
||||
@@ -179,7 +178,6 @@
|
||||
open(nvidia_blacklist_file, "w").write("blacklist nouveau\n")
|
||||
elif self.driver_name in ["nvidia-current", "nvidia96", "nvidia173", "nvidia304"] and os.path.isfile(nvidia_blacklist_file):
|
||||
os.remove(nvidia_blacklist_file)
|
||||
-
|
||||
|
||||
return status
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
--- panda.py~ 2014-03-10 21:18:48.173319857 +0100
|
||||
+++ panda.py 2014-03-10 21:19:43.726653009 +0100
|
||||
@@ -34,24 +34,20 @@
|
||||
"xorg-video-fglrx"],
|
||||
"nvidia-current": ["module-nvidia-current",
|
||||
"module-pae-nvidia-current",
|
||||
- "module-nvidia-current-userspace",
|
||||
"xorg-video-nvidia-current",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"],
|
||||
"nvidia96": ["module-nvidia96",
|
||||
"module-pae-nvidia96",
|
||||
- "module-nvidia96-userspace",
|
||||
"xorg-video-nvidia96",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"],
|
||||
"nvidia173": ["module-nvidia173",
|
||||
"module-pae-nvidia173",
|
||||
- "module-nvidia173-userspace",
|
||||
"xorg-video-nvidia173",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"],
|
||||
"nvidia304": ["module-nvidia304",
|
||||
- "module-nvidia304-userspace",
|
||||
"xorg-video-nvidia304",
|
||||
"nvidia-xconfig",
|
||||
"nvidia-settings"]}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>panda</Name>
|
||||
<Homepage>http://www.pisilinux.org</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2</License>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>PisiLinux Alternative Driver Administration</Summary>
|
||||
<Description>PANDA is an alternative driver administration for PisiLinux.</Description>
|
||||
<Archive sha1sum="7a7ca0036c04b4a4204725268add191ded5a564a" type="targz">https://github.com/forYali/panda/archive/0.2.tar.gz</Archive>
|
||||
<Patches>
|
||||
<!--Patch>fix_editing_grub_default.patch</Patch>
|
||||
<Patch>add_nvidia340.patch</Patch>
|
||||
<Patch>add_nvidia304.patch</Patch-->
|
||||
<Patch>add-32bit_packages.diff</Patch>
|
||||
<Patch>remove_module-nvidia-userspace.patch</Patch>
|
||||
<Patch>remove_module-fglrx-userspace.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>panda</Name>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/libexec</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2017-03-05</Date>
|
||||
<Version>0.2</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Ertuğrul Erata</Name>
|
||||
<Email>ertugrulerata@gmail.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>panda</Name>
|
||||
<Summary xml:lang="tr">PisiLinux Alternatif Sürücü Yönetimi</Summary>
|
||||
<Description xml:lang="tr">Panda, PisiLinux için alternatif sürücü yönetim modülüdür.</Description>
|
||||
</Source>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user