code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xcb-util-keysyms</Name>
        <Homepage>http://xcb.freedesktop.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        A number of libraries which sit on top of libxcb
        <Description>The xcb-util-keysyms module provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries.</Description>
        <Archive sha1sum="ff02ee8ac22c53848af50c0a6a6b00feb002c1cb" type="tarbz2">http://xcb.freedesktop.org/dist/xcb-util-keysyms-0.4.0.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>util-macros</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>xcb-util-keysyms</Name>
        <RuntimeDependencies>
            <Dependency>libxcb</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-keysyms-devel</Name>
        Development files for xcb-util-keysyms
        <RuntimeDependencies>
            <Dependency release="current">xcb-util-keysyms</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/lib32/pkgconfig</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-keysyms-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for xcb-util-keysyms
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>libxcb-32bit</Dependency>

        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency release="current">xcb-util-keysyms</Dependency>
            <Dependency>libxcb-32bit</Dependency>

        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-05</Date>
            <Version>0.4.0</Version>
            <Comment>Rebuild</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-04-30</Date>
            <Version>0.4.0</Version>
            <Comment>Release bump</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-12-13</Date>
            <Version>0.4.0</Version>
            <Comment>First release</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xcb-util-keysyms</Name>
        libxcb temelli birtakım kitaplıklar
        <Description xml:lang="tr">xcb-util-keysyms modülü, çekirdek X protokolü ve bazı eklentiler için libxcb temelli kitaplıklar içerir.</Description>
    </Source>

    <Package>
        <Name>xcb-util-keysyms-devel</Name>
        xcb-util-keysyms için geliştirme dosyaları
    </Package>

    <Package>
        <Name>xcb-uti-keysymsl-32bit</Name>
        xcb-util-keysyms için 32-bit paylaşımlı kitaplıklar
    </Package>
</PISI>

repo_name: ayhanyalcinsoy/main


code:
#!/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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.configure("--disable-static \
                         --with-pic")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xcb-util-renderutil</Name>
        <Homepage>http://xcb.freedesktop.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        A number of libraries which sit on top of libxcb
        <Description>The xcb-util-renderutil module provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries.</Description>
        <Archive sha1sum="cb533b1d039f833f070e7d6398c221a31d30d5e2" type="tarbz2">http://xcb.freedesktop.org/dist/xcb-util-renderutil-0.3.9.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>util-macros</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>xcb-util-renderutil</Name>
        <RuntimeDependencies>
            <Dependency>libxcb</Dependency>
        </RuntimeDependencies>
	<Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-renderutil-devel</Name>
        Development files for xcb-util-renderutil
        <RuntimeDependencies>
            <Dependency release="current">xcb-util-renderutil</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/lib32/pkgconfig</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-renderutil-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for xcb-util-renderutil
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>libxcb-32bit</Dependency>
        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency>libxcb-32bit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-05</Date>
            <Version>0.3.9</Version>
            <Comment>Rebuild</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-04-30</Date>
            <Version>0.3.9</Version>
            <Comment>Release bump</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-09-01</Date>
            <Version>0.3.9</Version>
            <Comment>First release</Comment>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xcb-util-renderutil</Name>
        libxcb temelli birtakım kitaplıklar
        <Description xml:lang="tr">xcb-util-renderutil modülü, çekirdek X protokolü ve bazı eklentiler için libxcb temelli kitaplıklar içerir.</Description>
    </Source>

    <Package>
        <Name>xcb-util-renderutil-devel</Name>
        xcb-util-renderutil için geliştirme dosyaları
    </Package>

    <Package>
        <Name>xcb-util-renderutil-32bit</Name>
        xcb-util-renderutil için 32-bit paylaşımlı kitaplıklar
    </Package>
</PISI>


code:
#!/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 autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.autoreconf("-vif")
    autotools.configure("--disable-static \
                         --with-pic")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xcb-util-wm</Name>
        <Homepage>http://xcb.freedesktop.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        A number of libraries which sit on top of libxcb
        <Description>The xcb-util-wm module provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries.</Description>
        <Archive sha1sum="7006c52b961c123355320bfc30477cdf90c8bbb7" type="tarbz2">http://xcb.freedesktop.org/dist/xcb-util-wm-0.4.1.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>util-macros</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>xcb-util-wm</Name>
        <RuntimeDependencies>
            <Dependency>libxcb</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-wm-devel</Name>
        Development files for xcb-util-wm
        <RuntimeDependencies>
            <Dependency release="current">xcb-util-wm</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/lib32/pkgconfig</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-wm-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for xcb-util-wm
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>libxcb-32bit</Dependency>

        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency release="current">xcb-util-wm</Dependency>
            <Dependency>libxcb-32bit</Dependency>

        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-05</Date>
            <Version>0.4.1</Version>
            <Comment>Rebuild</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-04-30</Date>
            <Version>0.4.1</Version>
            <Comment>Release bump</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-05-16</Date>
            <Version>0.4.1</Version>
            <Comment>First release</Comment>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xcb-util-wm</Name>
        libxcb temelli birtakım kitaplıklar
        <Description xml:lang="tr">xcb-util-wm modülü, çekirdek X protokolü ve bazı eklentiler için libxcb temelli kitaplıklar içerir.</Description>
    </Source>

    <Package>
        <Name>xcb-util-wm-devel</Name>
        xcb-util-wm için geliştirme dosyaları
    </Package>

    <Package>
        <Name>xcb-util-wm-32bit</Name>
        xcb-util-wm için 32-bit paylaşımlı kitaplıklar
    </Package>
</PISI>


code:
#!/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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.autoreconf("-vif")
    autotools.configure("--disable-static \
                         --with-pic")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xcb-util</Name>
        <Homepage>http://xcb.freedesktop.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        A number of libraries which sit on top of libxcb
        <Description>The xcb-util module provides a number of libraries which sit on top of libxcb, the core X protocol library, and some of the extension libraries.</Description>
        <Archive sha1sum="7f2e9b7efcc2c34eb1d6ae312c3d73b075832e46" type="tarbz2">http://xcb.freedesktop.org/dist/xcb-util-0.4.0.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>util-macros</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>xcb-util</Name>
        <RuntimeDependencies>
            <Dependency>libxcb</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-devel</Name>
        Development files for xcb-util
        <RuntimeDependencies>
            <Dependency release="current">xcb-util</Dependency>
            <Dependency>libxcb-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/lib32/pkgconfig</Path>
        </Files>
    </Package>

    <Package>
        <Name>xcb-util-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for xcb-util
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>libxcb-32bit</Dependency>

        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency release="current">xcb-util</Dependency>
            <Dependency>libxcb-32bit</Dependency>

        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-05</Date>
            <Version>0.4.0</Version>
            <Comment>Rebuild</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-04-30</Date>
            <Version>0.4.0</Version>
            <Comment>Release bump</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-12-13</Date>
            <Version>0.4.0</Version>
            <Comment>First release</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xcb-util</Name>
        libxcb temelli birtakım kitaplıklar
        <Description xml:lang="tr">xcb-util modülü, çekirdek X protokolü ve bazı eklentiler için libxcb temelli kitaplıklar içerir.</Description>
    </Source>

    <Package>
        <Name>xcb-util-devel</Name>
        xcb-util için geliştirme dosyaları
    </Package>

    <Package>
        <Name>xcb-util-32bit</Name>
        xcb-util için 32-bit paylaşımlı kitaplıklar
    </Package>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt

from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    shelltools.system("./legal.sh")
    autotools.autoreconf("-vif")
    autotools.configure("--disable-static")

    # for fix unused dependency
    pisitools.dosed("libtool"," -shared ", " -Wl,--as-needed -shared ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("AUTHORS", "NEWS", "ChangeLog", "COPYING", "README")


code:
<PISI>
    <Source>
        <Name>argyllcms</Name>
        <Homepage>http://gitorious.org/hargyllcms</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>osman.erkan@pislinux.org</Email>
        </Packager>
        <License>GPLv3</License>
        <License>MIT</License>
        <IsA>app:gui</IsA>
        <Summary>ICC compatible color management system</Summary>
        <Description>The Argyll color management system supports accurate ICC profile creation for acquisition devices, CMYK printers, film recorders and calibration and profiling of displays.</Description>
        <Archive sha1sum="8d30ec223f0b8ba6b990fc07c01e3b759a6ac900" type="tarxz">https://people.freedesktop.org/~hughsient/releases/hargyllcms-1.9.2.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>tiff-devel</Dependency>
            <Dependency>libpng-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>libXext-devel</Dependency>
            <Dependency>libXrandr-devel</Dependency>
            <Dependency>libXxf86vm-devel</Dependency>
            <Dependency>libXinerama-devel</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>libusb-devel</Dependency>
            <Dependency>libtool</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>argyllcms</Name>
        <RuntimeDependencies>
            <Dependency>tiff</Dependency>
            <Dependency>libpng</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXrandr</Dependency>
            <Dependency>libXxf86vm</Dependency>
            <Dependency>libXinerama</Dependency>
            <Dependency>libjpeg-turbo</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="data">/usr/share/color</Path>
        </Files>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-02-16</Date>
            <Version>1.9.2</Version>
            <Comment>Rebuild.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-11-13</Date>
            <Version>1.9.2</Version>
            <Comment>First Release.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<PISI>
    <Source>
        <Name>argyllcms</Name>
        <Summary xml:lang="en">ICC compatible color management system</Summary>
        <Description xml:lang="en">The Argyll color management system supports accurate ICC profile creation for acquisition devices, CMYK printers, film recorders and calibration and profiling of displays.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt

from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.configure("\
                         CONF_DRIVER=nvidia \
                         CONF_DRIVER_MODULE_NVIDIA=nvidia \
                         CONF_LDPATH_NVIDIA=/usr/lib/nvidia-current:/usr/lib32/nvidia-current \
                         CONF_MODPATH_NVIDIA=//usr/lib/nvidia-current,/usr/lib/xorg/modules \
                         CONF_PRIMUS_LD_PATH=/usr/lib/primus:/usr/lib32/primus \
                         --with-udev-rules=/lib/udev/rules.d/ \
                         --without-pidfile \
                         ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-

import os
from grp import getgrnam

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    if not os.path.isdir("/run/bumblebee"): os.makedirs("/run/bumblebee", int("0775", 8))
    try:
        os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
    except KeyError:
        os.system("groupadd -r bumblebee")
        os.chown("/run/bumblebee", -1, getgrnam("bumblebee").gr_gid)
        for u in getgrnam("users").gr_mem:
            os.system("gpasswd -a %s bumblebee" % u)


code:
# -*- coding: utf-8 -*-

from comar.service import *

import os

serviceType = "local"
serviceDesc = _({"en": "FIXME",
                 "tr": "FIXME"})

serviceDefault = "on"

PIDFILE = "/run/bumblebeed.pid"
DAEMON = "/usr/sbin/bumblebeed"

@synchronized
def start():
    os.system("modprobe bbswitch load_state=0 unload_state=1")
    startService(command=DAEMON,
                 args="--daemon",
                 detach=True)

    os.system("pidof -o %PPID " + "%s > %s" % (DAEMON, PIDFILE))

@synchronized
def stop():
    stopService(pidfile=PIDFILE,
                donotify=True)

    try:
        os.unlink(PIDFILE)
    except:
        pass

def status():
    return isServiceRunning(pidfile=PIDFILE)


code:
From 2073f8537412aa47755eb6f3f22a114403e5285b Mon Sep 17 00:00:00 2001
From: Peter Wu <peter@lekensteyn.nl>
Date: Wed, 16 Apr 2014 18:19:01 +0200
Subject: [PATCH] Fix devices with a bus larger than 9 (GH-573)

The `-isolateDevice` option accepts a PCI ID in decimal format, not hex.
---
 src/bbsecondary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bbsecondary.c b/src/bbsecondary.c
index 71a6b73..6b635ee 100644
--- a/src/bbsecondary.c
+++ b/src/bbsecondary.c
@@ -138,7 +138,7 @@ bool start_secondary(bool need_secondary) {
   if (!bb_is_running(bb_status.x_pid)) {
     char pci_id[12];
     static char *x_conf_file;
-    snprintf(pci_id, 12, "PCI:%02x:%02x:%o", pci_bus_id_discrete->bus,
+    snprintf(pci_id, 12, "PCI:%02d:%02d:%o", pci_bus_id_discrete->bus,
             pci_bus_id_discrete->slot, pci_bus_id_discrete->func);
     if (!x_conf_file) {
       x_conf_file = xorg_path_w_driver(bb_config.x_conf_file, bb_config.driver);


code:
--- a/src/bbsecondary.c	2013-04-26 17:49:03.000000000 +0200
+++ b/src/bbsecondary.c	2015-10-20 22:25:52.874484211 +0200
@@ -119,6 +119,17 @@
     if (!module_load(module_name, driver_name)) {
       set_bb_error("Could not load GPU driver");
       return false;
+    } else {
+      /* XXX NVIDIA UVM support */
+      if (strstr(module_name, "nvidia")) { /* We are using NVIDIA's proprietary driver */
+        char uvm_module_name[1024];
+        sprintf(uvm_module_name, "%s-uvm", module_name);
+        if (!module_load(uvm_module_name, "nvidia_uvm")) {
+          char log_string[1024];
+          sprintf(log_string, "Cannot load UVM module: %s\n", uvm_module_name);
+          bb_log(LOG_ERR, log_string);
+        }
+      }
     }
   }
   return true;
@@ -232,6 +243,11 @@
       }
       /* unload the driver loaded by the graphica card */
       if (pci_get_driver(driver, pci_bus_id_discrete, sizeof driver)) {
+        /* XXX NVIDIA UVM,MODESET support */
+        if (strstr(driver, "nvidia")) {
+          module_unload("nvidia_modeset");
+          module_unload("nvidia_uvm");
+        }
         module_unload(driver);
       }


code: d /run/bumblebee 0775 root bumblebee - -


code:
<PISI>
    <Source>
        <Name>bumblebee</Name>
        <Homepage>http://bumblebee-project.org</Homepage>
        <Packager>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@gmail.com</Email>
        </Packager>
        <License>GPLv3</License>
        <PartOf>kernel.default.drivers</PartOf>
        <IsA>app:gui</IsA>
        <Summary>a project aiming to support NVIDIA Optimus technology under Linux.</Summary>
        <Description>The Bumblebee Project proudly presents version 3.0 of Bumblebee, a project aiming to support NVIDIA Optimus technology under Linux. After two months of hard work this version has finally been considered stable enough for release.</Description>
        <Archive sha1sum="a715f4aa1b0c24dd4352ff7e0bc390f1e4e03cd9" type="targz">http://www.bumblebee-project.org/bumblebee-3.2.1.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>libbsd-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">bb-hexadecimal.patch</Patch>
            <Patch level="1">nv-uvm-modeset.patch</Patch>
        </Patches>
    </Source>
    <Package>
        <Name>bumblebee</Name>
        <RuntimeDependencies>
            <Dependency>glib2</Dependency>
            <Dependency>module-bbswitch</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libbsd</Dependency>
            <Dependency>primus</Dependency>
            <Dependency>virtualgl</Dependency>
            <Dependency>virtualgl-32bit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="config">/usr/lib/tmpfiles.d/bumblebee.conf</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="data">/lib/udev/rules.d</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
        <Provides>
            <COMAR script="service.py">System.Service</COMAR>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
        <AdditionalFiles>
             <AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/bumblebee.conf">tmpfiles.conf</AdditionalFile>
        </AdditionalFiles>
    </Package>
    <History>
        <Update release="3">
            <Date>2017-02-16</Date>
            <Version>3.2.1</Version>
            <Comment>Rebuild</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@pgmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>3.2.1</Version>
            <Comment>Rebuild</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@pgmail.com</Email>
        </Update>
       <Update release="1">
            <Date>2016-04-08</Date>
            <Version>3.2.1</Version>
            <Comment>First Release</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@pgmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>bumblebee</Name>
        <Summary xml:lang="en">a project aiming to support NVIDIA Optimus technology under Linux.</Summary>
        <Description xml:lang="en">The Bumblebee Project proudly presents version 3.0 of Bumblebee, a project aiming to support NVIDIA Optimus technology under Linux. After two months of hard work this version has finally been considered stable enough for release.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt

from pisi.actionsapi import autotools
from pisi.actionsapi import get
from pisi.actionsapi import pisitools

def setup():
    autotools.configure("--enable-print-profiles \
                         --disable-examples \
                         --disable-static \
                         --disable-rpath \
                         --disable-silent-rules \
                         --enable-polkit \
                         --enable-systemd-login=no \
                         --with-daemon-user=colord \
                         --with-systemdsystemunitdir=no \
                         --enable-introspection \
                         --enable-vala ")

    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "TODO", "README.md")


code:
from comar.service import *
import os

serviceType = "local"
serviceDesc = _({
    "en": "Color Management Daemon",
    "tr": "Renk Yönetimi Servisi",
})
serviceDefault = "on"

pidFile = "/run/colord.pid"

@synchronized
def start():
    startService(command="/usr/libexec/colord",
                 pidfile=pidFile,
                 makepid=True,
                 detach=True,
                 donotify=True)

@synchronized
def stop():
    stopService(pidfile=pidFile,
                donotify=True)
    os.unlink(pidFile)

def status():
    return isServiceRunning(pidFile)


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>colord</Name>
        <Homepage>http://www.freedesktop.org/software/colord</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2.1</License>
        <IsA>library</IsA>
        Colord is a system activated daemon that maps devices to color profiles
        <Description>Colord is a system activated daemon that maps devices to color profiles. It is used by GNOME Color Manager for system integration and use when there are no users logged in.</Description>
        <Archive sha1sum="e92cebb017840410d204c80494ae96ba323ba80b" type="tarxz">https://www.freedesktop.org/software/colord/releases/colord-1.3.4.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>intltool</Dependency>
            <Dependency>argyllcms</Dependency>
            <Dependency>vala-devel</Dependency>
            <Dependency>lcms2-devel</Dependency>
            <Dependency>sane-backends-devel</Dependency>
            <Dependency>bash-completion</Dependency>
            <Dependency>eudev-devel</Dependency>
            <Dependency>libtool</Dependency>
            <Dependency>gtk-doc</Dependency>
            <Dependency>perl</Dependency>
            <Dependency>gettext-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
            <Dependency>libgudev-devel</Dependency>
            <Dependency>libxslt-devel</Dependency>
            <Dependency>icu4c-devel</Dependency>
            <Dependency>libgusb-devel</Dependency>
            <Dependency>libusb-devel</Dependency>
            <Dependency>sqlite-devel</Dependency>
            <Dependency>qt5-sql-sqlite</Dependency>
            <Dependency>polkit-devel</Dependency>
            <Dependency>gobject-introspection-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>colord</Name>
        <RuntimeDependencies>
            <Dependency>lcms2</Dependency>
            <Dependency>libgusb</Dependency>
            <Dependency>shared-color-profiles</Dependency>
            <Dependency>sane-backends</Dependency>
            <Dependency>dbus</Dependency>
            <Dependency>sqlite</Dependency>
            <Dependency>polkit</Dependency>
            <Dependency>eudev</Dependency>
            <Dependency>glib2</Dependency>
            <Dependency>libgudev</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="library">/lib</Path>
            <Path fileType="libexec">/usr/libexec/colord-session</Path>
            <Path fileType="data">/var/lib/colord/icc/</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/libexec/colord</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share/dbus-1</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share/polkit-1</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="data">/var</Path>
            <Path fileType="data">/usr/share/colord</Path>
            <Path fileType="data">/usr/share/glib-2.0</Path>
            <Path fileType="data">/usr/share/bash-completion</Path>
            <Path fileType="data">/usr/libexec/colord-sane</Path>
        </Files>
        <Provides>
            <COMAR script="service.py">System.Service</COMAR>
        </Provides>
    </Package>

    <Package>
        <Name>colord-devel</Name>
        Development files for colord
        <RuntimeDependencies>
            <Dependency release="current">colord</Dependency>
            <Dependency>lcms2-devel</Dependency>
            <Dependency>libgusb-devel</Dependency>
            <Dependency>eudev-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/share/vala/vapi/colord.vapi</Path>
            <Path fileType="data">/usr/share/gir-1.0</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <Package>
        <Name>shared-color-profiles</Name>
        <Files>
            <Path fileType="data">/usr/share/color</Path>
        </Files>
    </Package>

    <History>
        <Update release="2">
            <Date>2017-02-16</Date>
            <Version>1.3.4</Version>
            <Comment>Version bump.</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-11-17</Date>
            <Version>1.3.3</Version>
            <Comment>First Release.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>colord</Name>
        Colord is a system activated daemon that maps devices to color profiles.
        Colord, aygıtları renk profillerine eşleyen bir sistem etkinleştirme programıdır.
        Usługa systemowa do zarządzania urządzeniami obsługującymi kolory
        <Description xml:lang="en">Colord is a system activated daemon that maps devices to color profiles. It is used by GNOME Color Manager for system integration and use when there are no users logged in.</Description>
        <Description xml:lang="tr">Colord, giriş ve çıkış aygıtlarını doğru bir şekilde renk yönetimi için renk profilleri yönetmek, yüklemek ve oluşturmak için kolaylaştıran bir sistem hizmetidir.</Description>
        <Description xml:lang="pl">colord to niskopoziomowa usługa systemowa odwzorowująca urządzenia obsługujące kolory na profile kolorów w kontekście systemu.</Description>
    </Source>

    <Package>
        <Name>colord-devel</Name>
        Colord için geliştirme başlıkları
        Pliki nagłówkowe colord
    </Package>
</PISI>


code:
<PISI>
    <Name>x11.misc</Name>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2009 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools

def build():
    shelltools.system("LIBDIR=lib make")
    shelltools.system("LIBDIR=lib32 CXX='g++ -m32' make")

def install():
    pisitools.insinto("/etc/bash_completion.d", "primus.bash-completion", "primusrun")
    pisitools.dobin("primusrun")

    pisitools.insinto("/usr/lib/primus", "lib/*")
    pisitools.insinto("/usr/lib32/primus", "lib32/*")

    pisitools.dodoc("LICENSE.txt","README.md", "technotes.md")
    pisitools.doman("primusrun.1")


code:
Index: primus-master/primusrun
===================================================================
--- primus-master/primusrun
+++ primus-master/primusrun	2014-02-07 19:09:03.459850030 +0100
@@ -10,7 +10,7 @@

 # Upload/display method
 # 0: autodetect, 1: textures, 2: PBO/glDrawPixels (needs Mesa-10.1+)
-# export PRIMUS_UPLOAD=${PRIMUS_UPLOAD:-0}
+export PRIMUS_UPLOAD=\${PRIMUS_UPLOAD:-2}

 # Approximate sleep ratio in the readback thread, percent
 # export PRIMUS_SLEEP=${PRIMUS_SLEEP:-90}
@@ -20,13 +20,13 @@

 # "Accelerating" libGL
 # $LIB will be interpreted by the dynamic linker
-# export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/$LIB/nvidia/libGL.so.1'}
+export PRIMUS_libGLa=${PRIMUS_libGLa:-'/usr/lib/nvidia-current/libGL.so.1.2.0:/usr/lib32/nvidia-current/libGL.so.1.2.0'}

 # "Displaying" libGL
-# export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/$LIB/libGL.so.1'}
+export PRIMUS_libGLd=${PRIMUS_libGLd:-'/usr/lib/libGL.so.1.2.0:/usr/lib32/libGL.so.1.2.0'}

 # Directory containing primus libGL
-PRIMUS_libGL=${PRIMUS_libGL:-$(dirname `readlink -ne $0`)/'$LIB'}
+PRIMUS_libGL='/usr/lib/primus:/usr/lib32/primus'

 # On some distributions, e.g. on Ubuntu, libnvidia-tls.so is not available
 # in default search paths.  Add its path manually after the primus library


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
      <Name>primus</Name>
        <Homepage>https://github.com/amonakov/primus</Homepage>
        <Packager>
            <Name>Mathias Freire</Name>
            <Email>mathiasfreire45@gmail.com</Email>
        </Packager>
        <License>ISC</License>
        <IsA>library</IsA>
       <Summary>Minimalistic and efficient OpenGL offloading for Bumblebee</Summary>
       <Description>Primus is a shared library that provides OpenGL and GLX APIs and implements low-overhead local-only client-side OpenGL offloading via GLX forking, similar to VirtualGL.</Description>
       <Archive sha1sum="07619d043cbb1e85a23499b25835aedb7921c480" type="targz">mirrors://sourceforge/pisilinux/source/primus-20160408.tar.gz</Archive>
       <BuildDependencies>
            <Dependency>libX11-devel</Dependency>
            <Dependency>mesa-devel</Dependency>
        </BuildDependencies>
       <Patches>
            <Patch level="1">primus-nvidia-libs.patch</Patch>
       </Patches>
    </Source>

    <Package>
        <Name>primus</Name>
        <RuntimeDependencies>
            <Dependency>libX11</Dependency>
            <Dependency>mesa</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
    </Package>

    <Package>
        <Name>primus-32bit</Name>
        <BuildDependencies>
            <Dependency>libX11-32bit</Dependency>
            <Dependency>mesa-32bit</Dependency>
        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency>libX11-32bit</Dependency>
            <Dependency>mesa-32bit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-16</Date>
            <Version>2016.05.02</Version>
            <Comment>Rebuild</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>2016.05.02</Version>
            <Comment>Rebuild</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-09</Date>
            <Version>2016.04.08</Version>
            <Comment>First Release</Comment>
            <Name>Idris Kalp</Name>
            <Email>idriskalp@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
# -*- 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 get
from pisi.actionsapi import pisitools
from pisi.actionsapi import cmaketools
from pisi.actionsapi import shelltools

def setup():
    shelltools.makedirs("build")
    shelltools.cd("build")

    options = "-DVGL_FAKEXCB=1 \
               -DVGL_INCDIR=/usr/include \
               -DTJPEG_INCLUDE_DIR=/usr/include \
               -DVGL_DOCDIR=/usr/share/doc/%s \
               " % get.srcNAME()

    if get.buildTYPE() == "emul32":

      options += "-DVGL_LIBDIR=/usr/lib32 \
                  -DCMAKE_INSTALL_PREFIX=/emul32 \
                  -DVGL_BINDIR=/emul32/bin \
                  -DTJPEG_LIBRARY=/usr/lib32/libturbojpeg.so \
                  -DVGL_FAKELIBDIR=/usr/lib32/fakelib \
                 "
    elif get.ARCH() == "x86_64":

      options += "-DVGL_LIBDIR=/usr/lib \
                  -DCMAKE_INSTALL_PREFIX=/usr/share \
                  -DVGL_FAKELIBDIR=/usr/lib/fakelib \
                  -DCMAKE_INSTALL_PREFIX=/usr/share \
                  -DTJPEG_LIBRARY=/usr/lib/libturbojpeg.so \
                  -DVGL_BINDIR=/usr/bin"

    cmaketools.configure(options, sourceDir="..")

def build():
    shelltools.cd("build")
    cmaketools.make()

def install():
    shelltools.cd("build")

    cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())

    if get.buildTYPE() == "emul32":
        pisitools.insinto("/usr/bin/","%s/emul32/bin/glxspheres" % get.installDIR(),"glxspheres32")
        pisitools.removeDir("/emul32")

    elif get.ARCH() == "x86_64":
        pisitools.domove("/usr/bin/glxinfo", "/usr/bin/", "vglxinfo")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>virtualgl</Name>
        <Homepage>http://virtualgl.org</Homepage>
        <Packager>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2.1</License>
        <IsA>library</IsA>
        <IsA>app:console</IsA>
        A toolkit for displaying OpenGL applications to thin clients
        <Description>Redirects 3D commands from an OpenGL application onto a server-side 3D graphics card.</Description>
        <Archive sha1sum="20ec8daa09d2bd5bb2437628a2416f9a4ca0fa63" type="targz">https://sourceforge.net/projects/virtualgl/files/2.5.1/VirtualGL-2.5.1.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>cmake</Dependency>
            <Dependency>fltk-devel</Dependency>
            <Dependency>libXv-devel</Dependency>
            <Dependency>libXext-devel</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>mesa-glu-devel</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>virtualgl</Name>
        <RuntimeDependencies>
            <Dependency>fltk</Dependency>
            <Dependency>libXv</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>mesa-glu</Dependency>
            <Dependency>libjpeg-turbo</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="library">/usr/lib/fakelib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>virtualgl-32bit</Name>
        32 bit shared libraries of VirtualGL
        <PartOf>emul32</PartOf>
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>fltk-32bit</Dependency>
            <Dependency>libX11-32bit</Dependency>
            <Dependency>libXv-32bit</Dependency>
            <Dependency>libXext-32bit</Dependency>
            <Dependency>mesa-32bit</Dependency>
            <Dependency>mesa-glu-32bit</Dependency>
            <Dependency>libjpeg-turbo-32bit</Dependency>
        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency>fltk-32bit</Dependency>
            <Dependency>libX11-32bit</Dependency>
            <Dependency>libXv-32bit</Dependency>
            <Dependency>libXext-32bit</Dependency>
            <Dependency>mesa-32bit</Dependency>
            <Dependency>mesa-glu-32bit</Dependency>
            <Dependency>libjpeg-turbo-32bit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/glxspheres32</Path>
            <Path fileType="library">/usr/lib32</Path>
            <Path fileType="library">/usr/lib32/fakelib</Path>
        </Files>
    </Package>

    <Package>
        <Name>virtualgl-devel</Name>
        Development files for virtualgl
        <RuntimeDependencies>
            <Dependency release="current">virtualgl</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/lib32/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-02-16</Date>
            <Version>2.5.1</Version>
            <Comment>Rebuild.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-11-02</Date>
            <Version>2.5.1</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>2.5</Version>
            <Comment>Rebuild</Comment>
            <Name>Idris KALP</Name>
            <Email>idriskalp@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-08</Date>
            <Version>2.5</Version>
            <Comment>Version bump</Comment>
            <Name>Idris KALP</Name>
            <Email>idriskalp@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>virtualgl</Name>
        <Summary xml:lang="tr">OpenGL uygulamaları ince istemcilerde göstermek için bir kitaplık</Summary>
        <Description xml:lang="tr">Bir OpenGL uygulamadan gelen 3D komutlarını sunucu tarafındaki 3D grafik kartına yönlendirir.</Description>
    </Source>
</PISI>


code:
# -*- 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 autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.configure()

def build():
    autotools.make()

def install():
    autotools.install()

    # Fix conflict with xorg-app
    pisitools.remove("/usr/include/X11/bitmaps/black6")
    pisitools.remove("/usr/include/X11/bitmaps/box6")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xbitmaps</Name>
        <Homepage>http://www.x.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>library</IsA>
        <Summary>X.Org static graphics</Summary>
        <Description>xbitmaps provides static graphics needed by Xorg applications to draw screen elements.</Description>
        <Archive sha1sum="578afff7e4912192b524c25254cf7f54c16e57d8" type="tarbz2">mirrors://xorg/individual/data/xbitmaps-1.1.1.tar.bz2</Archive>
    </Source>

    <Package>
        <Name>xbitmaps</Name>
        <Files>
            <Path fileType="header">/usr/include/X11/bitmaps</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/share/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-16</Date>
            <Version>1.1.1</Version>
            <Comment>Rebuild</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>1.1.1</Version>
            <Comment>Rebuild</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-05-15</Date>
            <Version>1.1.1</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xbitmaps</Name>
        X.Org statik grafikleri
        Utilitaire Xbitmaps de X.Org
        X.Org xbitmaps Werkzeug
        <Description xml:lang="tr">xbitmaps, ekran öğeleri çizmek için Xorg uygulamaları tarafından ihtiyaç duyulan statik grafikleri içerir.</Description>
    </Source>
</PISI>


code:
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.autoreconf("-vif")

    autotools.configure("--disable-static \
                         --enable-unix-transport \
                         --enable-tcp-transport \
                         --enable-local-transport \
                         --enable-secure-rpc \
                         --enable-xpm-logos \
                         --enable-xdm-auth \
                         --with-pam \
                         --with-libaudit \
                         --with-xdmconfigdir=/etc/X11/xdm \
                         --with-default-vt=vt7 \
                         --with-config-type=ws \
                         --with-xft \
                         --with-pixmapdir=/usr/share/X11/xdm/pixmaps \
                        ")

    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodir("/var/lib/xdm")

    pisitools.dodoc("AUTHORS", "COPYING", "README")


code:
from comar.service import *

serviceType = "local"
serviceDesc = _({
    "en": "Display Manager",
    "tr": "Görüntü Yöneticisi",
})
serviceDefault = "on"

pidFile = "/run/dm.pid"

@synchronized
def start(boot=False):
    if status():
        return

    #startDependencies("acpid")

    startService(command="/usr/bin/start-dm",
                 args="--boot" if boot else None,
                 detach=True,
                 pidfile=pidFile,
                 makepid=True,
                 donotify=True)

@synchronized
def stop():
    stopService(pidfile=pidFile,
                donotify=True)

def status():
    return isServiceRunning(pidFile)

def ready():
    from pardus.sysutils import get_kernel_option

    if is_on() == "on" and "off" not in get_kernel_option("xorg"):
        start(boot=True)


code:
--- config/GiveConsole.sessreg-utmp-fix-bug177890	2006-07-24 04:20:10.000000000 -0400
+++ config/GiveConsole	2006-07-24 04:21:16.000000000 -0400
@@ -8,3 +8,5 @@
 # causing serious grief.
 #
 chown $USER /dev/console
+exec /usr/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
+        -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER


code:
diff -up xdm-1.1.11/config.h.in.add-audit-events xdm-1.1.11/config.h.in
--- xdm-1.1.11/config.h.in.add-audit-events	2011-09-25 09:42:16.000000000 +0200
+++ xdm-1.1.11/config.h.in	2011-09-26 17:44:21.796495208 +0200
@@ -193,6 +193,9 @@
 /* Use PAM for authentication */
 #undef USE_PAM

+/* Add linux audit support */
+#undef HAVE_LIBAUDIT
+
 /* Use Security-Enhanced Linux (SELinux) support */
 #undef USE_SELINUX

diff -up xdm-1.1.11/configure.ac.add-audit-events xdm-1.1.11/configure.ac
--- xdm-1.1.11/configure.ac.add-audit-events	2011-09-25 09:41:19.000000000 +0200
+++ xdm-1.1.11/configure.ac	2011-09-26 17:43:30.616557363 +0200
@@ -145,6 +145,29 @@ if test "x$USE_SELINUX" != "xno" ; then
     )
 fi

+AC_ARG_WITH(libaudit,
+  [  --with-libaudit=[auto/yes/no]  Add Linux audit support [default=auto]],,
+  with_libaudit=auto)
+
+# Check for Linux auditing API
+#
+# libaudit detection
+if test x$with_libaudit = xno ; then
+    have_libaudit=no;
+else
+    # See if we have audit daemon library
+    AC_CHECK_LIB(audit, audit_log_user_message,
+                 have_libaudit=yes, have_libaudit=no)
+fi
+
+AM_CONDITIONAL(HAVE_LIBAUDIT, test x$have_libaudit = xyes)
+
+if test x$have_libaudit = xyes ; then
+    XDMGREET_LIBS="$XDMGREET_LIBS -laudit"
+    AC_DEFINE(HAVE_LIBAUDIT,1,[linux audit support])
+fi
+
+
 # Check whether to install systemd unit files, as suggested in daemon(7).
 AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
 	[Directory for systemd service files (default from the System and Service Manager)]),,
diff -up xdm-1.1.11/greeter/greet.c.add-audit-events xdm-1.1.11/greeter/greet.c
--- xdm-1.1.11/greeter/greet.c.add-audit-events	2011-09-25 09:35:47.000000000 +0200
+++ xdm-1.1.11/greeter/greet.c	2011-09-26 17:46:11.996361376 +0200
@@ -86,6 +86,13 @@ from The Open Group.
 # endif
 #endif

+#ifdef HAVE_LIBAUDIT
+#include <libaudit.h>
+#include <pwd.h>
+#else
+#define log_to_audit_system(l,h,s)   do { ; } while (0)
+#endif
+
 #include <string.h>

 #if defined(SECURE_RPC) && defined(sun)
@@ -415,6 +422,29 @@ FailedLogin (struct display *d, const ch
     DrawFail (login);
 }

+#ifdef USE_PAM
+#ifdef HAVE_LIBAUDIT
+static void
+log_to_audit_system(const pam_handle_t *pamhp, int success)
+{
+	struct passwd *pw = NULL;
+	char *hostname = NULL, *tty = NULL, *login=NULL;
+	int audit_fd;
+
+	audit_fd = audit_open();
+	pam_get_item(pamhp, PAM_RHOST, &hostname);
+	pam_get_item(pamhp, PAM_TTY, &tty);
+	pam_get_item(pamhp, PAM_USER, &login);
+	if (login)
+		pw = getpwnam(login);
+	audit_log_acct_message(audit_fd, AUDIT_USER_LOGIN,
+		NULL, "login", login ? login : "(unknown)",
+		pw ? pw->pw_uid : -1, hostname, NULL, tty, success);
+	close(audit_fd);
+}
+#endif
+#endif
+
 _X_EXPORT
 greet_user_rtn GreetUser(
     struct display          *d,
@@ -600,6 +630,7 @@ greet_user_rtn GreetUser(
 	if ((pam_error == PAM_SUCCESS) && (Verify (d, greet, verify))) {
 	    SetPrompt (login, 1, "Login Successful", LOGIN_TEXT_INFO, False);
 	    SetValue (login, 1, NULL);
+            log_to_audit_system(*pamhp, 1);
 	    break;
 	} else {
 	    /* Try to fill in username for failed login error log */
@@ -611,6 +642,7 @@ greet_user_rtn GreetUser(
 					 (void *) &username));
 	    }
 	    FailedLogin (d, username);
+            log_to_audit_system(*pamhp, 0);
 	    RUN_AND_CHECK_PAM_ERROR(pam_end,
 				    (*pamhp, pam_error));
 	}


code:
--- configure.ac.jx	2010-04-09 21:49:03.000000000 -0400
+++ configure.ac	2011-04-01 13:24:14.000000000 -0400
@@ -454,6 +454,7 @@
 AM_CONDITIONAL(HAS_XDM_AUTH, test x$xdmauth = xyes -a x$xdmauth_enable != xno)

 AC_SEARCH_LIBS(crypt, crypt)
+AC_SEARCH_LIBS([dlopen], [dl])

 AC_SUBST(XDM_CFLAGS)
 AC_SUBST(XDM_LIBS)


code:
Index: xdm-1.1.8_20090308/config/xdm-config.cpp
===================================================================
--- xdm-1.1.8_20090308.orig/config/xdm-config.cpp
+++ xdm-1.1.8_20090308/config/xdm-config.cpp
@@ -30,9 +30,9 @@ DisplayManager*session:		XDMSCRIPTDIR/Xs
 DisplayManager*reset:		XDMSCRIPTDIR/Xreset
 DisplayManager*authComplain:	true
 ! The following three resources set up display :0 as the console.
-DisplayManager._0.setup:	XDMSCRIPTDIR/Xsetup_0
-DisplayManager._0.startup:	XDMSCRIPTDIR/GiveConsole
-DisplayManager._0.reset:	XDMSCRIPTDIR/TakeConsole
+!DisplayManager._0.setup:	XDMSCRIPTDIR/Xsetup_0
+!DisplayManager._0.startup:	XDMSCRIPTDIR/GiveConsole
+!DisplayManager._0.reset:	XDMSCRIPTDIR/TakeConsole
 #ifdef XPM
 DisplayManager*loginmoveInterval:	10
 #endif /* XPM */


code:
Index: xdm-1.1.9/config/Xresources.cpp
===================================================================
--- xdm-1.1.9.orig/config/Xresources.cpp
+++ xdm-1.1.9/config/Xresources.cpp
@@ -86,3 +86,5 @@ Chooser*label.font:		*-new century schoo
 Chooser*label.label:		XDMCP Host Menu from CLIENTHOST
 Chooser*list.font:		-*-*-medium-r-normal-*-*-230-*-*-c-*-iso8859-1
 Chooser*Command.font:		*-new century schoolbook-bold-r-normal-*-180-*
+
+XHASHinclude "/etc/X11/Xresources"


code:
#!/bin/sh

read_config() {
    FILE=$1
    KEY=$2
    LINE=$(grep "^$KEY=" $FILE)
    VALUE=${LINE#$KEY=}
}

DISPLAY_MANAGER=xdm
XCURSOR_THEME=
PLYMOUTH_TRANSITION=false

test -r /etc/default/xdm && . /etc/default/xdm
test -r /etc/conf.d/xdm && . /etc/conf.d/xdm

DM_PATH=
DESKTOP_FILE=/usr/share/display-managers/$DISPLAY_MANAGER.desktop

if [ -f $DESKTOP_FILE ]; then
    read_config $DESKTOP_FILE Exec
    DM_PATH=$VALUE
    read_config $DESKTOP_FILE X-Pardus-XCursorTheme
    test -n "$VALUE" && XCURSOR_THEME=$VALUE
    read_config $DESKTOP_FILE X-Pardus-PlymouthTransition
    test -n "$VALUE" && PLYMOUTH_TRANSITION=$VALUE
fi

test -x "$DM_PATH" || DM_PATH=/usr/bin/xdm

PATH=/sbin:/usr/sbin:/bin:/usr/bin

test -f /etc/env.d/03locale && . /etc/env.d/03locale

export LC_ALL PATH XCURSOR_THEME

if [ "x$1" = "x--boot" ]; then
    for x in `grep -o -e "xorg=\w*" /proc/cmdline`; do
        case "$x" in
            xorg=safe)
                MESA_LIBGL=/usr/lib/mesa/libGL.so.1.2.0
                if [ "$(readlink /etc/alternatives/libGL)" != "$MESA_LIBGL" ]; then
                    /usr/sbin/alternatives --set libGL /usr/lib/mesa/libGL.so.1.2.0
                    /sbin/ldconfig -X
                fi

                DRIVER=vesa
                test -c /dev/fb0 && DRIVER=fbdev
                export XORGCONFIG=/usr/share/X11/xorg-safe-$DRIVER.conf
                ;;
            xorg=probe)
                test -f /etc/X11/xorg.conf && mv -f /etc/X11/xorg.conf /etc/X11/xorg.conf.$(date +%Y%m%d)
                ;;
        esac
    done
fi

# Trigger events against a locale change. This is needed for
# determining the default keymap.
udevadm trigger --property-match=ID_INPUT_KEYBOARD=1

# Start first boot wizard if needed
if test -f /etc/yali/yali.conf -a -x /usr/bin/start-yali && \
        grep -e "^installation *= *firstboot" /etc/yali/yali.conf; then
    /usr/bin/start-yali

    # First boot wizard removes itself after the last screen. If it
    # still exists at this time, this would mean a reboot or shutdown
    # requested by the user. In this case, we will not start the
    # display manager.
    test -f /usr/bin/start-yali && exit 0
    sleep 1
fi

if [ "$PLYMOUTH_TRANSITION" != "true" ]; then
    test -x /bin/plymouth && /bin/plymouth --ping && /bin/plymouth quit
fi

exec $DM_PATH -nodaemon


code:
diff -ur a/xdm/genauth.c b/xdm/genauth.c
--- a/xdm/genauth.c	2011-09-25 09:35:47.000000000 +0200
+++ b/xdm/genauth.c	2014-01-06 16:28:09.664060603 +0100
@@ -40,6 +40,14 @@

 #include <errno.h>

+#ifdef HAVE_ARC4RANDOM
+# ifdef __linux__
+#  include <bsd/stdlib.h>
+# else
+#  include <stdlib.h>
+# endif
+#endif
+
 #include <time.h>
 #define Time_t time_t


code:
From 8d1eb5c74413e4c9a21f689fc106949b121c0117 Mon Sep 17 00:00:00 2001
From: mancha <mancha1@hush.com>
Date: Wed, 22 May 2013 14:20:26 +0000
Subject: Handle NULL returns from glibc 2.17+ crypt().

Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
(w/ NULL return) if the salt violates specifications. Additionally,
on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
passed to crypt() fail with EPERM (w/ NULL return).

If using glibc's crypt(), check return value to avoid a possible
NULL pointer dereference.

Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
---
diff --git a/greeter/verify.c b/greeter/verify.c
index db3cb7d..b009e2b 100644
--- a/greeter/verify.c
+++ b/greeter/verify.c
@@ -329,6 +329,7 @@ Verify (struct display *d, struct greet_info *greet, struct verify_info *verify)
 	struct spwd	*sp;
 #  endif
 	char		*user_pass = NULL;
+	char		*crypted_pass = NULL;
 # endif
 # ifdef __OpenBSD__
 	char            *s;
@@ -464,7 +465,9 @@ Verify (struct display *d, struct greet_info *greet, struct verify_info *verify)
 #  if defined(ultrix) || defined(__ultrix__)
 	if (authenticate_user(p, greet->password, NULL) < 0)
 #  else
-	if (strcmp (crypt (greet->password, user_pass), user_pass))
+	crypted_pass = crypt (greet->password, user_pass);
+	if ((crypted_pass == NULL)
+	    || (strcmp (crypted_pass, user_pass)))
 #  endif
 	{
 		if(!greet->allow_null_passwd || strlen(p->pw_passwd) > 0) {
--
cgit v0.9.0.2-2-gbebe


code:
diff -ur a/xdm/choose.c b/xdm/choose.c
--- a/xdm/choose.c	2011-09-25 09:35:47.000000000 +0200
+++ b/xdm/choose.c	2014-01-06 16:33:09.628065364 +0100
@@ -54,6 +54,14 @@
 #  include       <tiuser.h>
 # endif

+# ifdef HAVE_SETPROCTITLE
+#  ifdef __linux__
+#   include <bsd/unistd.h>
+#  else
+#   include <unistd.h>
+#  endif
+# endif
+
 # include <time.h>
 # define Time_t time_t

diff -ur a/xdm/session.c b/xdm/session.c
--- a/xdm/session.c	2011-09-25 09:35:47.000000000 +0200
+++ b/xdm/session.c	2014-01-06 16:40:57.508072789 +0100
@@ -54,6 +54,15 @@
 # include <usersec.h>
 #endif

+# ifdef HAVE_SETPROCTITLE
+#  include <sys/types.h>
+#  ifdef __linux__
+#   include <bsd/unistd.h>
+#  else
+#   include <unistd.h>
+#  endif
+# endif
+
 #ifndef USE_PAM        /* PAM modules should handle these */
 # ifdef SECURE_RPC
 #  include <rpc/rpc.h>


code:
http://bugs.gentoo.org/360987
http://projects.archlinux.org/svntogit/packages.git/plain/trunk/xdm-consolekit.patch?h=packages/xorg-xdm
http://lists.x.org/archives/xorg-devel/2011-February/019615.html
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=615020

--- a/configure.ac
+++ b/configure.ac
@@ -362,6 +362,20 @@

 AM_CONDITIONAL(DYNAMIC_GREETER, test x$DYNAMIC_GREETER = xyes)

+# ConsoleKit support
+AC_ARG_WITH(consolekit, AC_HELP_STRING([--with-consolekit], [Use ConsoleKit]),
+	[USE_CONSOLEKIT=$withval], [USE_CONSOLEKIT=yes])
+if test x"$USE_CONSOLEKIT" != xno; then
+	PKG_CHECK_MODULES(CK_CONNECTOR, ck-connector,
+		[USE_CONSOLEKIT=yes], [USE_CONSOLEKIT=no])
+	if test x"$USE_CONSOLEKIT" = xyes; then
+		AC_DEFINE([USE_CONSOLEKIT], 1, [Define to 1 to use ConsoleKit])
+		XDM_CFLAGS="$XDM_CFLAGS $CK_CONNECTOR_CFLAGS -DUSE_CONSOLEKIT"
+		XDM_LIBS="$XDM_LIBS $CK_CONNECTOR_LIBS"
+	fi
+fi
+dnl AM_CONDITIONAL(USE_CONSOLEKIT, test$USE_CONSOLEKIT = xyes)
+
 #
 #  XDM
 #
--- a/xdm/session.c
+++ b/xdm/session.c
@@ -66,6 +66,11 @@
 #endif
 #endif /* USE_PAM */

+#ifdef USE_CONSOLEKIT
+#include <ck-connector.h>
+#include <dbus/dbus.h>
+#endif
+
 #ifdef __SCO__
 #include <prot.h>
 #endif
@@ -472,6 +477,97 @@
     }
 }

+#ifdef USE_CONSOLEKIT
+
+static CkConnector *connector;
+
+static int openCKSession(struct verify_info *verify, struct display *d)
+{
+    int ret;
+    DBusError error;
+    char  *remote_host_name = "";
+    dbus_bool_t is_local;
+    char *display_name = "";
+    char *display_device = "";
+    char devtmp[16];
+
+    if (!use_consolekit)
+	return 1;
+
+    is_local = d->displayType.location == Local;
+    if (d->peerlen > 0 && d->peer)
+	remote_host_name = d->peer;
+    if (d->name)
+	display_name = d->name;
+    /* how can we get the corresponding tty at best...? */
+    if (d->windowPath) {
+	display_device = strchr(d->windowPath, ':');
+	if (display_device && display_device[1])
+	    display_device++;
+	else
+	    display_device = d->windowPath;
+	snprintf(devtmp, sizeof(devtmp), "/dev/tty%s", display_device);
+	display_device = devtmp;
+    }
+
+    connector = ck_connector_new();
+    if (!connector) {
+	LogOutOfMem("ck_connector");
+	return 0;
+    }
+
+    dbus_error_init(&error);
+    ret = ck_connector_open_session_with_parameters(
+		connector, &error,
+		"unix-user", &verify->uid,
+		"x11-display", &display_name,
+		"x11-display-device", &display_device,
+		"remote-host-name", &remote_host_name,
+		"is-local", &is_local,
+		NULL);
+    if (!ret) {
+	if (dbus_error_is_set(&error)) {
+	    LogError("Dbus error: %s\n", error.message);
+	    dbus_error_free(&error);
+	} else {
+	    LogError("ConsoleKit error\n");
+	}
+	LogError("console-kit-daemon not running?\n");
+	ck_connector_unref(connector);
+	connector = NULL;
+	return 0;
+    }
+
+    verify->userEnviron = setEnv(verify->userEnviron,
+		"XDG_SESSION_COOKIE", ck_connector_get_cookie(connector));
+    return 1;
+}
+
+static void closeCKSession(void)
+{
+    DBusError error;
+
+    if (!connector)
+	return;
+
+    dbus_error_init(&error);
+    if (!ck_connector_close_session(connector, &error)) {
+	if (dbus_error_is_set(&error)) {
+	    LogError("Dbus error: %s\n", error.message);
+	    dbus_error_free(&error);
+	} else {
+	    LogError("ConsoleKit close error\n");
+	}
+	LogError("console-kit-daemon not running?\n");
+    }
+    ck_connector_unref(connector);
+    connector = NULL;
+}
+#else
+#define openCKSession(v,d)	1
+#define closeCKSession()
+#endif
+
 void
 SessionExit (struct display *d, int status, int removeAuth)
 {
@@ -486,6 +580,8 @@
     }
 #endif

+    closeCKSession();
+
     /* make sure the server gets reset after the session is over */
     if (d->serverPid >= 2 && d->resetSignal)
	kill (d->serverPid, d->resetSignal);
@@ -568,6 +664,10 @@
 #ifdef USE_PAM
     if (pamh) pam_open_session(pamh, 0);
 #endif
+
+    if (!openCKSession(verify, d))
+	return 0;
+
     switch (pid = fork ()) {
     case 0:
	CleanUpChild ();
--- a/include/dm.h
+++ b/include/dm.h
@@ -325,6 +325,9 @@
 extern char	*prngdSocket;
 extern int	prngdPort;
 # endif
+#ifdef USE_CONSOLEKIT
+extern int	use_consolekit;
+#endif

 extern char	*greeterLib;
 extern char	*willing;
--- a/xdm/resource.c
+++ b/xdm/resource.c
@@ -68,6 +68,9 @@
 char	*prngdSocket;
 int	prngdPort;
 #endif
+#ifdef USE_CONSOLEKIT
+int	use_consolekit;
+#endif

 char	*greeterLib;
 char	*willing;
@@ -258,6 +261,10 @@
				"false"} ,
 { "willing",	"Willing",	DM_STRING,	&willing,
				""} ,
+#ifdef USE_CONSOLEKIT
+{ "consoleKit",	"ConsoleKit",	DM_BOOL,	(char **) &use_consolekit,
+				"true"} ,
+#endif
 };

 # define NUM_DM_RESOURCES	(sizeof DmResources / sizeof DmResources[0])
@@ -440,7 +447,11 @@
 {"-debug",	"*debugLevel",		XrmoptionSepArg,	(caddr_t) NULL },
 {"-xrm",	NULL,			XrmoptionResArg,	(caddr_t) NULL },
 {"-daemon",	".daemonMode",		XrmoptionNoArg,		"true"         },
-{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        }
+{"-nodaemon",	".daemonMode",		XrmoptionNoArg,		"false"        },
+#ifdef USE_CONSOLEKIT
+{"-consolekit",	".consoleKit",		XrmoptionNoArg,		"true"  },
+{"-noconsolekit", ".consoleKit",	XrmoptionNoArg,		"false" }
+#endif
 };

 static int	originalArgc;
--- a/man/xdm.man
+++ b/man/xdm.man
@@ -51,6 +51,8 @@
 ] [
 .B \-session
 .I session_program
+] [
+.B \-noconsolekit
 ]
 .SH DESCRIPTION
 .I Xdm
@@ -218,6 +220,10 @@
 .IP "\fB\-xrm\fP \fIresource_specification\fP"
 Allows an arbitrary resource to be specified, as in most
 X Toolkit applications.
+.IP "\fB\-noconsolekit\fP"
+Specifies ``false'' as the value for the \fBDisplayManager.consoleKit\fP
+resource.
+This suppresses the session management using ConsoleKit.
 .SH RESOURCES
 At many stages the actions of
 .I xdm


code:
# Preferred display manager
DISPLAY_MANAGER="kdm"

# Cursor theme
#XCURSOR_THEME=""


code:
[Desktop Entry]
Exec=/usr/bin/xdm
Icon=xorg
Type=Application
X-Pardus-XCursorTheme=Jimmac

Name=XDM
GenericName=X Login Manager
GenericName[tr]=X Giriş Yöneticisi


code:
#%PAM-1.0

auth       include      system-auth
auth       required     pam_nologin.so

account    include      system-auth

password   include      system-auth

session    include      system-auth

session    optional     pam_console.so
session    optional     pam_polkit_console.so


code:
Section "Module"
    SubSection "extmod"
        Option  "omit xfree86-dga" "true"
    EndSubSection
EndSection

Section "ServerFlags"
    Option  "BlankTime" "0"
    Option  "OffTime" "0"
    Option  "SuspendTime" "0"
    Option  "AllowMouseOpenFail" "true"
    Option  "StandbyTime" "0"
EndSection

Section "Device"
    Identifier  "VideoCard"
    Driver  "fbdev"
EndSection


code:
Section "Module"
    SubSection "extmod"
        Option  "omit xfree86-dga" "true"
    EndSubSection
EndSection

Section "ServerFlags"
    Option  "BlankTime" "0"
    Option  "OffTime" "0"
    Option  "SuspendTime" "0"
    Option  "AllowMouseOpenFail" "true"
    Option  "StandbyTime" "0"
EndSection

Section "Device"
    Identifier  "VideoCard"
    Driver  "vesa"
EndSection


code:
Index: xdm-1.1.8_20090308/config/Xsession.cpp
===================================================================
--- xdm-1.1.8_20090308.orig/config/Xsession.cpp
+++ xdm-1.1.8_20090308/config/Xsession.cpp
@@ -41,47 +41,4 @@ XCOMM	done
 #endif
 fi

-case $# in
-1)
-	case $1 in
-	failsafe)
-		exec BINDIR/xterm -geometry 80x24-0-0
-		;;
-	esac
-esac
-
-XCOMM The startup script is not intended to have arguments.
-
-startup=$HOME/.xsession
-resources=$HOME/.Xresources
-
-if [ -s "$startup" ]; then
-	if [ -x "$startup" ]; then
-		exec "$startup"
-	else
-		exec /bin/sh "$startup"
-	fi
-else
-	if [ -r "$resources" ]; then
-		BINDIR/xrdb -load "$resources"
-	fi
-#if defined(__SCO__) || defined(__UNIXWARE__)
-        [ -r /etc/default/xdesktops ] && {
-                . /etc/default/xdesktops
-        }
-
-        [ -r /etc/default/xdm ] && {
-                . /etc/default/xdm
-        }
-
-        XCOMM Allow the user to over-ride the system default desktop
-        [ -r $HOME/.xdmdesktop ] && {
-                . $HOME/.xdmdesktop
-        }
-
-        [ -n "$XDESKTOP" ] && {
-                exec `eval $XDESKTOP`
-        }
-#endif
-	exec BINDIR/xsm
-fi
+. /usr/lib/X11/xinit/Xsession


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xdm</Name>
        <Homepage>http://www.x.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <Icon>xorg</Icon>
        <IsA>app:gui</IsA>
        <Summary>X Display Manager</Summary>
        <Description>X Display Manager provides a login screen, session management, and support for XDMCP.</Description>
        <Archive sha1sum="8195a8e17d71d18cb89813d04b69a3750e9e818e" type="tarbz2">mirrors://xorg/individual/app/xdm-1.1.11.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>libXt-devel</Dependency>
            <Dependency>libICE-devel</Dependency>
            <Dependency>libSM-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>libXaw-devel</Dependency>
            <Dependency>libXft-devel</Dependency>
            <Dependency>libXmu-devel</Dependency>
            <Dependency>libXpm-devel</Dependency>
            <Dependency>libXext-devel</Dependency>
            <Dependency>libXinerama-devel</Dependency>
            <Dependency>util-macros</Dependency>
            <Dependency>pam-devel</Dependency>
            <Dependency>xtrans</Dependency>
            <Dependency>audit-devel</Dependency>
            <Dependency>libbsd-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">xsession.patch</Patch>
            <Patch level="1">no-xconsole.patch</Patch>
            <Patch level="1">resources.patch</Patch>
            <Patch level="1">xdm-1.1.11-arc4random-include.patch</Patch>
            <Patch level="1">xdm-1.1.11-cve-2013-2179.patch</Patch>
            <Patch level="1">xdm-1.1.11-setproctitle-include.patch</Patch>
            <Patch level="1">xdm-consolekit.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>xdm</Name>
        <RuntimeDependencies>
            <Dependency>pam</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libXau</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency>libXt</Dependency>
            <Dependency>libbsd</Dependency>
            <Dependency>libXft</Dependency>
            <Dependency>libXmu</Dependency>
            <Dependency>libXpm</Dependency>
            <Dependency>libXaw</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXinerama</Dependency>
            <Dependency>xinit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib/X11/xdm</Path>
            <Path fileType="data">/usr/share/X11</Path>
            <Path fileType="data">/usr/share/display-managers</Path>
            <Path fileType="data">/var/lib/xdm</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <AdditionalFiles>
            <!--<AdditionalFile owner="root" permission="0644" target="/etc/conf.d/xdm">xdm.conf.d</AdditionalFile>-->
            <AdditionalFile owner="root" permission="0644" target="/etc/pam.d/xdm">xdm.pam.d</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/start-dm">start-dm.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/display-managers/xdm.desktop">xdm.desktop</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/X11/xorg-safe-fbdev.conf">xorg-safe-fbdev.conf</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/X11/xorg-safe-vesa.conf">xorg-safe-vesa.conf</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="service.py">System.Service</COMAR>
        </Provides>
    </Package>

    <History>
        <Update release="1">
            <Date>2017-03-09</Date>
            <Version>1.1.11</Version>
            <Comment>First release.</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xdm</Name>
        <Summary xml:lang="tr">X Görüntü Yöneticisi</Summary>
        <Description xml:lang="tr">X Görüntü Yöneticisi, giriş ekranı, oturum yönetimi ve XDMCP desteği sağlar.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.autoreconf("-vif")
    autotools.configure()

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("COPYING", "ChangeLog")


code:
Move startx auth files in /tmp so they are removed on reboot.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
The trap patch didn't seem to work on reboot.
---
 startx.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: xinit/startx.cpp
===================================================================
--- xinit.orig/startx.cpp
+++ xinit/startx.cpp
@@ -273,7 +273,7 @@
     dummy=0

     XCOMM create a file with auth information for the server. ':0' is a dummy.
-    xserverauthfile=$HOME/.serverauth.$$
+    xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX`
     trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
     xauth -q -f "$xserverauthfile" << EOF
 add :$dummy . $mcookie


code:
*customization: -color

Xft.dpi:        96

Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintmedium
Xft.rgba:       rgb


code:
#!/bin/bash

SESSIONDIR=/etc/X11/Xsession.d
STARTUP=

#TODO Create error file (~/.xsession-errors) here

echo "X session started for $LOGNAME at $(date)"

if [ -d $SESSIONDIR ]; then
    for file in $SESSIONDIR/*.sh; do
        . $file
    done
fi

exec -l $SHELL -c "$STARTUP"

# Control should never reach here
exec -l $SHELL -c "xsm"


code:
Common subdirectories: xinit.orig/privileged_startx and xinit/privileged_startx
diff -u xinit.orig/startx.cpp xinit/startx.cpp
--- xinit.orig/startx.cpp	2011-08-02 18:26:57.161711018 +0400
+++ xinit/startx.cpp	2011-08-02 19:06:39.348816866 +0400
@@ -290,9 +290,9 @@
     XCOMM now add the same credentials to the client authority file
     XCOMM if '$displayname' already exists do not overwrite it as another
     XCOMM server man need it. Add them to the '$xserverauthfile' instead.
-    for displayname in $authdisplay $hostname$authdisplay; do
+    for displayname in $authdisplay $hostname/unix$authdisplay; do
         authcookie=`XAUTH list "$displayname" @@
-        | sed -n "s/.*$displayname[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
+        | sed -n "s/.*$hostname\/unix$authdisplay[[:space:]*].*[[:space:]*]//p"` 2>/dev/null;
         if [ "z${authcookie}" = "z" ] ; then
             XAUTH -q << EOF
 add $displayname . $mcookie


code:
Index: xinit-1.1.1/startx.cpp
===================================================================
--- xinit-1.1.1.orig/startx.cpp
+++ xinit-1.1.1/startx.cpp
@@ -15,6 +15,7 @@ XCOMM $XFree86: xc/programs/xinit/startx

 unset DBUS_SESSION_BUS_ADDRESS
 unset SESSION_MANAGER
+unset XDG_SESSION_COOKIE

 #if defined(__SCO__) || defined(__UNIXWARE__) || defined(__APPLE__)


code:
#!/bin/bash

. /usr/lib/X11/xinit/Xsession


code:
SYSRESOURCES=/etc/X11/Xdefaults
USERRESOURCES=$HOME/.Xdefaults

if [ -f $SYSRESOURCES ]; then
    xrdb -load  $SYSRESOURCES
fi

if [ -f "$USERRESOURCES" ]; then
    xrdb -load "$USERRESOURCES"
else
	cp $SYSRESOURCES $USERRESOURCES && xrdb -load  "$USERRESOURCES"
fi


code:
SYSRESOURCES=/etc/X11/Xresources
USERRESOURCES=$HOME/.Xresources

if [ -f $SYSRESOURCES ]; then
    xrdb -merge $SYSRESOURCES
fi

if [ -f "$USERRESOURCES" ]; then
    xrdb -merge "$USERRESOURCES"
else
	cp $SYSRESOURCES $USERRESOURCES && xrdb -merge "$USERRESOURCES"
fi


code:
CK_LAUNCH_SESSION=/usr/bin/ck-launch-session
if [ -x "$CK_LAUNCH_SESSION" -a -z "$XDG_SESSION_COOKIE" ]; then
    STARTUP="$CK_LAUNCH_SESSION $STARTUP"
fi


code:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    eval `/usr/bin/dbus-launch --sh-syntax --exit-with-session`
fi


code:
[ -e /etc/profile.env ] && . /etc/profile.env

if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
    PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:${PATH}"
fi
export PATH
unset ROOTPATH


code:
if [ -x /usr/bin/xhost -a -x /usr/bin/id ]; then
    xhost +si:localuser:`id -un` > /dev/null
fi
xhost +


code:
SSH_AGENT=/usr/bin/ssh-agent
if [ -x "$SSH_AGENT" -a -z "$SSH_AGENT_PID" ]; then
    STARTUP="$SSH_AGENT $STARTUP"
fi


code:
DEFAULT_DESKTOP=/etc/default/desktop
USER_XSESSION=$HOME/.xsession
SESSION=$DESKTOP_SESSION
STARTUP=

case $1 in
    failsafe)
        exec -l $SHELL -c "xterm -geometry 80x24-0-0"
        ;;
    custom)
        if [ -x "$USER_XSESSION" ]; then
            STARTUP="$USER_XSESSION"
        fi
        ;;
    default|"")
        test -f $DEFAULT_DESKTOP && . $DEFAULT_DESKTOP

        if [ -n $SESSION ]; then
            desktop_file="/usr/share/xsessions/$SESSION.desktop"
            session_script="/etc/X11/Sessions/$SESSION"

            if [ -f "$desktop_file" ]; then
                STARTUP=`grep "^Exec=" "$desktop_file" | cut -d= -f 2-`
            elif [ -x "$session_script" ]; then
                STARTUP="$session_script"
            fi
        fi
        ;;
    *)
        STARTUP="$1"
        ;;
esac

if [ -z "$STARTUP" ]; then
    # If STARTUP is still empty, try user script first.
    if [ -x "$USER_XSESSION" ]; then
        STARTUP="$USER_XSESSION"
    else
        STARTUP="xsm"
    fi
fi


code:
if test -z "${XDG_RUNTIME_DIR}"; then
    export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
    if ! test -d "${XDG_RUNTIME_DIR}"; then
        mkdir "${XDG_RUNTIME_DIR}"
        chmod 0700 "${XDG_RUNTIME_DIR}"
    fi
fi
mkdir -p ~/.config
#cp weston/weston.ini ~/.config
#$EDITOR ~/.config/weston.ini


code:
USER_XKB=$HOME/.xkb
USER_KEYMAP=$USER_XKB/keymap/default

[ -r $USER_KEYMAP ] && xkbcomp -I$USER_XKB $USER_KEYMAP $DISPLAY


code:
#!/bin/sh
exec /usr/bin/X -nolisten tcp "$@"


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xinit</Name>
        <Homepage>http://www.x.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>app:console</IsA>
        <Summary>X Window System session initializer</Summary>
        <Description>xinit initializes X Window System server and runs the first client application.</Description>
        <Archive sha1sum="de3469080d73ced1f7d7a1803e813bc6ea352072" type="tarbz2">mirrors://xorg/individual/app/xinit-1.3.4.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>util-macros</Dependency>
            <Dependency>xorg-proto</Dependency>
            <Dependency>libX11-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <!--Patch level="1">xinit-1.0.2-client-session.patch</Patch-->
            <Patch>06_move_serverauthfile_into_tmp.diff</Patch>
            <Patch>fs25361.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>xinit</Name>
        <RuntimeDependencies>
            <Dependency>libX11</Dependency>
            <Dependency>xorg-app</Dependency>
            <Dependency>dbus-x11</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc/X11/Xresources</Path>
            <Path fileType="config">/etc/X11/Xdefaults</Path>
            <Path fileType="config">/etc/X11/xinit</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/lib/X11/xinit</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/usr/lib/X11/xinit/Xsession">Xsession</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/lib/X11/xinit/xinitrc">xinitrc</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/X11/xinit/xserverrc">xserverrc</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/lib/X11/xinit/xserverrc">xserverrc</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/X11/Xresources" >Xresources</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/X11/Xdefaults" >Xdefaults</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/10-localuser.sh">xinitrc.d/localuser.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/10-xdg-runtime-dir.sh">xinitrc.d/xdg-runtime-dir.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/10-Xresources.sh">xinitrc.d/Xresources.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/10-Xdefaults.sh">xinitrc.d/Xdefaults.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/10-xkb.sh">xinitrc.d/xkb.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/20-startup.sh">xinitrc.d/startup.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/25-environment.sh">xinitrc.d/environment.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/50-dbus.sh">xinitrc.d/dbus.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/X11/xinit/xinitrc.d/90-ssh-agent.sh">xinitrc.d/ssh-agent.sh</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-16</Date>
            <Version>1.3.4</Version>
            <Comment>Rebuild</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>1.3.4</Version>
            <Comment>Rebuild</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2015-11-30</Date>
            <Version>1.3.4</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xinit</Name>
        <Summary xml:lang="tr">X Pencere Sistemi oturum hazırlayıcı</Summary>
        <Description xml:lang="tr">xinit, X Pencere Sistemi sunucusunu hazırlar ve ilk istemci uygulamayı başlatır.</Description>
    </Source>
</PISI>


code:
# -*- 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 autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--enable-compat-rules \
                         --with-xkb-rules-symlink=xorg")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "TODO", "README*", "NEWS")


code:
Section "InputClass"
    Identifier      "Keyboard Options"
    MatchIsKeyboard "on"

    #Option          "xkb_rules"     "evdev"
    #Option          "xkb_model"     "evdev"
    #Option          "xkb_options"   "ctrl:nocaps,kpdl:dot,terminate:ctrl_alt_bksp"
    #Option          "xkb_layout"    "tr"
    #Option          "xkb_variant"   "f"
EndSection


code:
ACTION!="add|change", GOTO="xkb_end"
ENV{ID_INPUT_KEYBOARD}!="?*", GOTO="xkb_end"

IMPORT{cmdline}="xkeymap"

ENV{xkeymap}=="?*", PROGRAM="/bin/sh -c 'echo $env{xkeymap} | tr : \\t'", ENV{xkblayout}="%c{1}"
ENV{xkeymap}=="?*:?*", ENV{xkbvariant}="%c{2}"

ENV{xkeymap}=="?*", GOTO="xkb_end"

# If a cmdline option is not given, use the configuration
# snippet (/etc/X11/xorg.conf.d/00-configured-keymap.conf).
ENV{ID_INPUT.tags}="use_configured_keymap"

IMPORT{file}="/etc/env.d/03locale"
ENV{LANG}=="?*", PROGRAM="/bin/sh -c 'echo $${LANG,,} | tr .@_ \\t'", ENV{.language}="%c{1}", ENV{.territory}="%c{2}"

ENV{.language}=="ar", ENV{xkblayout}="ara"
ENV{.language}=="el", ENV{xkblayout}="gr"
ENV{.language}=="es", ENV{.territory}!="es", ENV{xkblayout}="latam"
ENV{.language}=="sr", ENV{xkblayout}="rs"
ENV{.language}=="tr", ENV{xkblayout}="tr"

# See Pardus Bugzilla #4271
ENV{.territory}=="nl", ENV{xkblayout}="us", ENV{xkbvariant}="intl"

ENV{.territory}=="?*", ENV{xkblayout}!="?*", ENV{xkblayout}="$env{.territory}"

LABEL="xkb_end"


code:
From 824ce3a400a452929f90a038033c83055c01a2d7 Mon Sep 17 00:00:00 2001
From: Fedora X Ninjas <x@fedoraproject.org>
Date: Mon, 24 Nov 2008 12:59:09 +1000
Subject: [PATCH] Map TLDE to Zenkaku/Hankaku in jp, and BKSL to bracket/brace right (#469537).

This patch is only needed for jp on a non-jp106 keyboard model.
---
 symbols/jp |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/symbols/jp b/symbols/jp
index 694090c..ef0b0f7 100644
--- a/symbols/jp
+++ b/symbols/jp
@@ -24,6 +24,13 @@ xkb_symbols "common" {
 	symbols[Group1]= [ Zenkaku_Hankaku, Kanji ]
     };

+    key <TLDE> {
+	type[Group1]="PC_ALT_LEVEL2",
+	symbols[Group1]= [ Zenkaku_Hankaku, Kanji ]
+    };
+
+    key <BKSL> { [ bracketright, braceright ] };
+
     key <AE01> { [ 1, exclam		] };
     key <AE02> { [ 2, quotedbl		] };
     key <AE03> { [ 3, numbersign	] };
--
1.6.0.3


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xkeyboard-config</Name>
        <Homepage>http://freedesktop.org/wiki/Software/XKeyboardConfig</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <IsA>data</IsA>
        <Summary>X keyboard configuration database</Summary>
        <Description>xkeyboard-config aims to provide consistent and well-structured X keyboard configuration data for X Window System implementations.</Description>
        <Archive sha1sum="fe36dc8259571721776f885ba66060e0b5a0616c" type="tarbz2">mirrors://xorg/individual/data/xkeyboard-config/xkeyboard-config-2.20.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>intltool</Dependency>
            <Dependency>xorg-proto</Dependency>
            <Dependency>xorg-app</Dependency>
            <Dependency>libxslt-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">xkeyboard-config-1.4-jp-tilde.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>xkeyboard-config</Name>
        <RuntimeDependencies>
            <Dependency>xorg-app</Dependency>
            <Dependency>libxslt</Dependency>
            <Dependency>libX11</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc/X11/xorg.conf.d</Path>
            <Path fileType="data">/lib/udev/rules.d</Path>
            <Path fileType="data">/usr/share/X11/xkb</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="doc">/usr/share/locale</Path>
            <Path fileType="data">/usr/share/pkgconfig</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/X11/xorg.conf.d/10-keyboard.conf">10-keyboard.conf</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/lib/udev/rules.d/95-xkb.rules">95-xkb.rules</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-02-16</Date>
            <Version>2.20</Version>
            <Comment>Version bump</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-11-04</Date>
            <Version>2.19</Version>
            <Comment>Version bump</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>2.17</Version>
            <Comment>Version bump</Comment>
            <Name>Hakan Yıldız</Name>
            <Email>hknyldz93@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2015-05-14</Date>
            <Version>2.14</Version>
            <Comment>First release</Comment>
            <Name>Hakan Yıldız</Name>
            <Email>hknyldz93@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xkeyboard-config</Name>
        <Summary xml:lang="tr">X klavye yapılandırma veritabanı</Summary>
        <Description xml:lang="tr">xkeyboard-config, X Pencere Sistemi için tutarlı ve iyi tasarlanmış X klavye yapılandırma verisi sağlamayı amaçlar.</Description>
    </Source>
</PISI>


code:
# -*- 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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools

WorkDir = "."
SkipList = (".", "filelist", "patches", "pisiBuildState", "tmp")

def setup():
    # Speed up xkbcomp
    shelltools.export("CFLAGS","%s -DHAVE_STRCASECMP" % get.CFLAGS())

    for package in shelltools.ls("."):
        if package.startswith(SkipList):
            continue

        print "\nConfiguring %s..." % package
        print "-" * (len(package) + 15)
        shelltools.cd(package)

        if package.startswith(("xcursorgen", "xsm")) or \
                not shelltools.isFile("configure"):
            autotools.autoreconf("-vif")
        elif package.startswith("luit"):
            pisitools.dosed("configure.ac", "(-D_XOPEN_SOURCE)=500", "\\1=600")
            autotools.autoreconf("-vif")

        autotools.configure("--disable-dependency-tracking \
                             --disable-devel-docs \
                             --with-cpp=/usr/bin/mcpp")
        shelltools.cd("../")

def build():
    for package in shelltools.ls("."):
        if package.startswith(SkipList):
            continue

        shelltools.cd(package)
        if package.startswith("xfwp"): pisitools.dosed("io.c", "^(#include <unistd.h>)", r"#define __USE_XOPEN\n\1")
        autotools.make()
        shelltools.cd("../")

def install():
    for package in shelltools.ls("."):
        if package.startswith(SkipList):
            continue

        shelltools.cd(package)
        autotools.rawInstall("DESTDIR=%s" % get.installDIR())
        shelltools.cd("../")


code:
# -*- coding: utf-8 -*-

import piksemel

def updateIndex():
    import os
    import subprocess

    join = os.path.join
    fontsPath = "/usr/share/fonts"
    encodingsPath = join(fontsPath, "encodings")
    fontsScale = "fonts.scale"
    fontsDir = "fonts.dir"

    for root, dirs, files in os.walk(fontsPath):
        if root.startswith(encodingsPath):
            continue

        fonts = files[:]

        if fontsScale in fonts:
            fonts.remove(fontsScale)
            os.unlink(join(root, fontsScale))

        if fontsDir in fonts:
            fonts.remove(fontsDir)
            os.unlink(join(root, fontsDir))

        if not fonts:
            continue

        print "Creating %s ..." % join(root, fontsScale)
        subprocess.call(["/usr/bin/mkfontscale", "-u", root])

        print "Creating %s ..." % join(root, fontsDir)
        subprocess.call(["/usr/bin/mkfontdir", root])

def checkPaths(filepath):
    doc = piksemel.parse(filepath)

    for item in doc.tags("File"):
        path = item.getTagData("Path")
        if path.startswith("usr/share/fonts/"):
            updateIndex()
            break

def setupPackage(metapath, filepath):
    checkPaths(filepath)

def cleanupPackage(metapath, filepath):
    pass

def postCleanupPackage(metapath, filepath):
    checkPaths(filepath)


code:
From 088bb4cef2c93bef312b076a8c7a3c798cbf2f19 Mon Sep 17 00:00:00 2001
From: daicy <daicy@cn.fujitsu.com>
Date: Tue, 8 Dec 2015 11:45:01 +0900
Subject: [PATCH] Makefile.am: Error Fix

Do not compile man dir since error always occur.
 | sed: file filenames.sed line 3: unterminated `s' command
 | make[2]: *** [sessreg.1] Error 1
It is not a good way.But can remove it from PNBLACKLIST.

Upstream-Status: pending

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index cddffd0..94f7048 100644
--- sessreg-1.1.0/Makefile.am
+++ b/Makefile.am
@@ -18,7 +18,7 @@
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.

-SUBDIRS = man
+#SUBDIRS = man
 bin_PROGRAMS = sessreg

 AM_CFLAGS = $(CWARNFLAGS) $(SESSREG_CFLAGS)
--
1.8.4.2