code:
stdlib.h is required for free()

--- lib/output.c
+++ lib/output.c
@@ -20,6 +20,7 @@
 #include <sys/param.h>

 #ifdef STDC_HEADERS
+# include <stdlib.h>
 # include <string.h>
 #endif

--- lib/wrapper.c
+++ lib/wrapper.c
@@ -18,6 +18,7 @@
 #include <errno.h>

 #ifdef STDC_HEADERS
+# include <stdlib.h>
 # include <string.h>
 #endif

repo_name: ayhanyalcinsoy/main


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libtar</Name>
        <Homepage>http://www.feep.net/libtar/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>as-is</License>
        <IsA>library</IsA>
        tar file manipulation API
        <Description>libtar is a C library for manipulating POSIX tar files. It handles adding and extracting files to/from a tar archive.</Description>
        <Archive sha1sum="89901d5dbf720b59df7a5f0b34ff90bff9bbb806" type="targz">http://pkgbuild.com/~giovanni/libtar/libtar-1.2.20.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>zlib-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>libtar</Name>
        <RuntimeDependencies>
            <Dependency>zlib</Dependency>
        </RuntimeDependencies>
        <Files>
            <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>libtar-devel</Name>
        Development files for libtar
        <RuntimeDependencies>
            <Dependency release="current">libtar</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-02</Date>
            <Version>1.2.20</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.2.20</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-06-20</Date>
            <Version>1.2.20</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>libtar</Name>
        tar dosyalarını işlemek için bir API
        <Description xml:lang="tr">libtar, POSIX tar dosyalarını işlemek için yazılmış bir C kütüphanesidir.</Description>
    </Source>

    <Package>
        <Name>libtar-devel</Name>
        libtar için geliştirme dosyaları
    </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():
    # fix test return state
    #pisitools.dosed("regress/open_nonarchive.test", "19/2", "19/0")
    autotools.autoreconf("-fi")
    autotools.configure()

def build():
    autotools.make()

def check():
    autotools.make("check")

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

    pisitools.dodoc("AUTHORS", "NEWS.md", "README.md")

    # preserve old header path for compatibility
    #pisitools.dosym("/usr/lib/libzip/include/zipconf.h", "/usr/include/zipconf.h")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libzip</Name>
        <Homepage>http://www.nih.at/libzip/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>BSD</License>
        <IsA>library</IsA>
        A C library for reading, creating, and modifying zip archives
        <Description>libzip is a C library for reading, creating and modifying zip archives. Files can be added from data buffers, files or compressed data copied directly from other zip archives.</Description>
        <Archive sha1sum="c98d10d1c8a078e242164fc8a10d3078af055e75" type="targz">https://nih.at/libzip/libzip-1.3.2.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>zlib-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>libzip</Name>
        <RuntimeDependencies>
            <Dependency>zlib</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>libzip-devel</Name>
        Development files for libzip
        <RuntimeDependencies>
            <Dependency>zlib-devel</Dependency>
            <Dependency release="current">libzip</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-12-24</Date>
            <Version>1.3.2</Version>
            <Comment>Version bump</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-01-25</Date>
            <Version>1.1.3</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.0.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-07-28</Date>
            <Version>1.0.1</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>libzip</Name>
        Zip arşivleri yaratmak, okumak ve değiştirmek için C kitaplığı
        <Description xml:lang="tr">libzip, zip arşivleri yaratma, okumak ve değiştirmek için kullanılabilecek bir C kitaplığıdır.</Description>
    </Source>

    <Package>
        <Name>libzip-devel</Name>
        libzip için geliştirme dosyaları
    </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

WorkDir = "p7zip_%s" % get.srcVERSION()

makefiles = {
             'i686'     : "makefile.linux_x86_asm_gcc_4.X",
             'x86_64'   : "makefile.linux_amd64_asm"
            }

def setup():
    shelltools.copy(makefiles[get.ARCH()], "makefile.machine")

    for i in shelltools.ls("makefile.*"):
        pisitools.dosed(i, "^CC=gcc ", "CC=%s " % get.CC())
        pisitools.dosed(i, "^CXX=g\+\+ ", "CXX=%s " % get.CXX())

def build():
    # do not force CC and CXX here since asm build fails
    autotools.make('OPTFLAGS="%s -DHAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden" \
                    all3' % get.CFLAGS())

def install():
    pisitools.insinto("/usr/lib/p7zip","bin/*")

    # p7zip wrapper
    pisitools.dobin("contrib/gzip-like_CLI_wrapper_for_7z/p7zip")
    pisitools.doman("contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1")

    pisitools.dohtml("DOC/MANUAL/*")
    pisitools.dodoc("ChangeLog", "README", "TODO", "DOC/*.txt")


code:
#!/bin/sh
cd ""
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:"
exec /usr/lib/p7zip/7z "$@"


code:
#!/bin/sh
cd ""
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:"
exec /usr/lib/p7zip/7za "$@"


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>p7zip</Name>
        <Homepage>http://p7zip.sourceforge.net/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2.1</License>
        <IsA>app:console</IsA>
        <Summary>Port of 7-Zip archiver for *nix</Summary>
        <Description>p7zip is a port of 7-Zip archiver for Unix. Supports packing-unpacking 7z, ZIP, GZIP, BZIP2 and TAR archives and unpacking RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB and NSIS arhives.</Description>
        <Archive sha1sum="e8819907132811aa1afe5ef296181d3a15cc8f22" type="tarbz2">mirrors://sourceforge/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>yasm-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>p7zip</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib/p7zip</Path>
            <Path fileType="library">/usr/lib/p7zip/Codecs</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/7z">7z</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/7za">7za</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-01-25</Date>
            <Version>16.02</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>15.09</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-01-01</Date>
            <Version>15.09</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>p7zip</Name>
        <Summary xml:lang="tr">7-zip arşivleme programı</Summary>
        <Description xml:lang="tr">7-zip arşivleme programı. 7z, ZIP, GZIP, BZIP2 ve TAR arşivleri oluşturabilir ve açabilir; RAR, CAB, ISO, ARJ, LZH, CHM, Z, CPIO, RPM, DEB ve NSIS arşivlerini ise açabilir.</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 cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    cmaketools.configure("-DCMAKE_INSTALL_PREFIX=/usr \
                                            -DBUILD_WITH_QT4:BOOL=OFF")

def build():
    cmaketools.make()

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

    pisitools.dodoc("COPYING", "README.txt", "NEWS.txt")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>quazip</Name>
        <Homepage>http://quazip.sourceforge.net</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <License>LGPLv2</License>
        <IsA>library</IsA>
        <IsA>app:console</IsA>
        A C++/Qt ZIP library
        <Description>A Qt/C++ wrapper for Gilles Vollant's ZIP/UNZIP C package (minizip). Provides access to ZIP archives from Qt programs using QIODevice API.</Description>
        <Archive sha1sum="ed35d6a53d1ac78860bc058241e3e042c7cdb2ff" type="targz">http://sourceforge.net/projects/quazip/files/quazip/0.7.3/quazip-0.7.3.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>qt5-base-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
            <Dependency>cmake</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>quazip</Name>
        <RuntimeDependencies>
            <Dependency>qt5-base</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share/cmake/Modules/FindQuaZip5.cmake</Path>
        </Files>
    </Package>

    <Package>
        <Name>quazip-devel</Name>
        Development files for quazip
        <RuntimeDependencies>
            <Dependency release="current">quazip</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-14</Date>
            <Version>0.7.3</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-02-02</Date>
            <Version>0.7.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>0.7.2</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-05-22</Date>
            <Version>0.7.2</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>quazip</Name>
        A C++/Qt ZIP library
        <Description xml:lang="en">A Qt/C++ wrapper for Gilles Vollant's ZIP/UNZIP C package (minizip). Provides access to ZIP archives from Qt programs using QIODevice API.</Description>
    </Source>

    <Package>
        <Name>quazip-devel</Name>
        quazip paketi için geliştirme dosyaları
    </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 pisitools
from pisi.actionsapi import get

WorkDir = "%s/%s" % (get.ARCH(), get.srcNAME())
NoStrip = ["/"]

def install():
    pisitools.insinto("/opt/rar/bin", "rar")
    pisitools.insinto("/opt/rar/lib", "default.sfx")
    pisitools.insinto("/opt/rar/etc", "rarfiles.lst")

    pisitools.dosym("/opt/rar/bin/rar", "/usr/bin/rar")

    pisitools.dodoc("license.txt", "readme.txt", "whatsnew.txt", "order.htm", "rar.txt")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>rar</Name>
        <Homepage>http://www.rarlab.com</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>RAR</License>
        <IsA>app:console</IsA>
        <Summary>RAR compressor</Summary>
        <Description>rar is an compressor supporting multiple volume archives and damage protection. It can also create SFX-archives. This program is shareware and you must register it after 40 days of use.</Description>
        <Archive sha1sum="cb59faba2415eac8e1f140341ec3287e27711317" type="targz" target="i686">http://www.rarlab.com/rar/rarlinux-5.5.0.tar.gz</Archive>
        <Archive sha1sum="ae1190751ee0ffdd38034e2ec74c8e7b6bd07c7a" type="targz" target="x86_64">http://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz</Archive>
    </Source>

    <Package>
        <Name>rar</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/opt/rar/bin</Path>
            <Path fileType="data">/opt/rar/lib</Path>
            <Path fileType="data">/opt/rar/etc</Path>
            <Path fileType="doc">/usr/share/doc/rar</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-14</Date>
            <Version>5.5.0</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-01-25</Date>
            <Version>5.4.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>5.3.0</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-01-01</Date>
            <Version>5.3.0</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>rar</Name>
        <Summary xml:lang="tr">RAR sıkıştırıcı</Summary>
        <Description xml:lang="tr">rar, çoklu arşivleri ve hasar korumayı destekleyen bir sıkıştırıcıdır. rar aynı zamanda SFX arşivleri de yaratabilir. Bu uygulama ücretli olup 40 günlük kullanımdan sonra kayıt olunması gerekmektedir.</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 pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

def setup():
    shelltools.export("CPPFLAGS", "-std=c90 -fPIC")
    autotools.configure("--enable-shared --disable-static")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    pisitools.dodoc("AUTHORS", "COPYING", "NEWS", "README", "THANKS" )


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>ucl</Name>
        <Homepage>http://www.oberhumer.com/opensource/ucl/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPL</License>
        <IsA>library</IsA>
        <Summary>Portable lossless data compression library written in ANSI C.</Summary>
        <Description>UCL implements a number of compression algorithms that achieve an excellent compression ratio while allowing *very* fast decompression. Decompression requires no additional memory.</Description>
        <Archive sha1sum="5847003d136fbbca1334dd5de10554c76c755f7c" type="targz">http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz</Archive>
    </Source>

    <Package>
        <Name>ucl</Name>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>ucl-devel</Name>
        <RuntimeDependencies>
            <Dependency release="current">ucl</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-07</Date>
            <Version>1.03</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.03</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-03</Date>
            <Version>1.03</Version>
            <Comment>First pisi Release</Comment>
            <Name>İbrahim KARAGÜZEL</Name>
            <Email>karaguzelibrahim@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>ucl</Name>
        <Summary xml:lang="tr">ANSI C ile yazılmış bir kayıpsız veri sıkıştırma kitaplığı.</Summary>
        <Description xml:lang="tr">UCL kitaplığı sıkıştırılmış veriyi çok hızlı çözerken, yüksek oranda veri sıkıştırması da yapabilen birçok sıkıştırma algoritması içerir. Sıkıştırılmış veriyi açmak ek bellek alanı gerektirmemektedir.</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/licenses/gpl.txt

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

WorkDir = "%s" % get.srcNAME()

def build():
#changed for version 4.2.4
    autotools.make()
#autotools.make for older version
#    autotools.make('-f makefile.unix \
#                    CXXFLAGS="%s" \
#                    CXX="%s" \
#                    STRIP="true"' % (get.CXXFLAGS(), get.CXX()))

def install():
    pisitools.dobin("unrar")

    pisitools.dodoc("readme.txt","license.txt")


code:
--- a/makefile	2013-04-29 16:27:05.000000000 +0200
+++ b/makefile	2013-10-01 22:07:29.611485989 +0200
@@ -133,7 +133,7 @@
 lib:	CXXFLAGS+=$(LIBFLAGS)
 lib:	clean $(OBJECTS) $(LIB_OBJ)
 	@rm -f libunrar.so
-	$(LINK) -shared -o libunrar.so $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)
+	$(LINK) -shared -Wl,-soname,libunrar.so.$(libversion) -o libunrar.so.$(libversion) $(LDFLAGS) $(OBJECTS) $(LIB_OBJ)

 install-unrar:
 			install -D unrar $(DESTDIR)/bin/unrar


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>unrar</Name>
        <Homepage>http://www.rarsoft.com/rar_add.htm</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>unRAR</License>
        <IsA>app:console</IsA>
        <Summary>RAR decompressor</Summary>
        <Description>unrar is a program to decompress RAR archives.</Description>
        <Archive sha1sum="f4fa1c4142b497356a3df505e1459c188f646fad" type="targz">http://www.rarlab.com/rar/unrarsrc-5.5.8.tar.gz</Archive>
        <Patches>
          <!--Patch level="1">unrar-5.3.4-soname.patch</Patch-->
        </Patches>
    </Source>

    <Package>
        <Name>unrar</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-14</Date>
            <Version>5.5.8</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-01-25</Date>
            <Version>5.4.5</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>5.3.4</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-01-25</Date>
            <Version>5.3.4</Version>
            <Comment>First release</Comment>
            <Name>yusuf Aydemir</Name>
            <Email>yuısuf.aydemir@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>unrar</Name>
        <Summary xml:lang="tr">RAR açma uygulaması</Summary>
        <Description xml:lang="tr">Unrar, RAR biçimli sıkıştırılmış dosyaları açar.</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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    shelltools.export("UPX_LZMA_VERSION", "0x465")
    shelltools.export("UPX_LZMADIR", get.workDIR())

def build():
    autotools.make("CHECK_WHITESPACE=/bin/true all")

def install():
    pisitools.insinto("/usr/bin", "src/upx.out", "upx")
    pisitools.insinto("/usr/share/man/man1", "doc/upx.1")
    pisitools.dodoc("BUGS", "COPYING", "LICENSE", "NEWS", "PROJECTS", "README*", "THANKS" )


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>upx</Name>
        <Homepage>http://upx.sourceforge.net/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPL</License>
        <IsA>app:console</IsA>
        <Summary>Ultimate executable compressor.</Summary>
        <Description>UPX is an advanced executable file compressor. UPX will typically reduce the file size of programs and DLLs by around 50%-70%, thus reducing disk space, network load times, download times and other distribution and storage costs.</Description>
        <Archive sha1sum="d692b9b699992a8b6e29576734384dedca4e029b" type="tarxz">http://upx.sourceforge.net/download/upx-3.94-src.tar.xz</Archive>
        <Archive sha1sum="5ec1c4606fec88c770a9712073e83916f8aed173" type="tarbz2">http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>ucl-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>upx</Name>
        <RuntimeDependencies>
            <Dependency>ucl</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man/man1</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-01-14</Date>
            <Version>3.94</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="3">
            <Date>2017-02-17</Date>
            <Version>3.91</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>3.91</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-03</Date>
            <Version>3.91</Version>
            <Comment>First Pisi Release</Comment>
            <Name>İbrahim KARAGÜZEL</Name>
            <Email>karaguzelibrahim@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>upx</Name>
        <Summary xml:lang="tr">UPX (Ultimate executable compressor), bir dosya sıkıştırıcısı</Summary>
        <Description xml:lang="tr">UPX ileri düzey bir çalıştırılabilir dosya sıkıştırıcısıdır. UPX genel olarak programların ve kitaplıkların dosya boyutunu %50 ila %70 oranında sıkıştırarak disk kullanım alanını, ağa yüklenme ve indirme süresini düşürür.</Description>
    </Source>
</PISI>


code:
<PISI>
    <Name>util</Name>
</PISI>


code:
<PISI>
    <Name>util.crypt</Name>
</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 cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get

def build():
    pisitools.dosed("cryptopp.pc", "@VERSION@", get.srcVERSION())

    cmaketools.make()

def install():
    cmaketools.rawInstall("PREFIX=/usr DESTDIR=%s" % get.installDIR())

    pisitools.insinto("/usr/lib/pkgconfig", "cryptopp.pc")


code:
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

Name: Crypto++
Description: A free C++ class library of cryptographic schemes
Version: @VERSION@
URL: http://www.cryptopp.com
Requires:
Conflicts:
Libs: -L${libdir} -lcryptopp
Libs.private:
Cflags: -I${includedir}/cryptopp/


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>crypto++</Name>
        <Homepage>http://www.cryptopp.com</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>public-domain</License>
        <IsA>library</IsA>
        Public domain C++ class library of cryptographic schemes
        <Description>crypto++ is a free C++ class library of cryptographic schemes. One purpose of Crypto++ is to act as a repository of public domain (not copyrighted) source code. Although the library is copyrighted as a compilation, the individual files in it are in the public domain.</Description>
        <Archive sha1sum="1ed9f1ced89ed301a0cf8c7a2b7bf25efb68aac3" type="targz">https://github.com/weidai11/cryptopp/archive/CRYPTOPP_6_0_0.tar.gz</Archive>
        <AdditionalFiles>
            <AdditionalFile target="cryptopp.pc" permission="0644" owner="root">cryptopp.pc</AdditionalFile>
        </AdditionalFiles>
        <BuildDependencies>
            <Dependency>cmake</Dependency>
            <Dependency>dos2unix</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>crypto++</Name>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share</Path>
        </Files>
    </Package>

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

    <History>
        <Update release="2">
            <Date>2018-02-22</Date>
            <Version>6.0.0</Version>
            <Comment>Version Bump</Comment>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2017-01-04</Date>
            <Version>5.6.5</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>crypto++</Name>
        Değişik kripto şemaları içeren kamu malı C++ kitaplığı
        Klasa C++ dostarczająca narzędzia do kryptografii
        <Description xml:lang="tr">crypto++, kriptografik şemalar içeren özgür bir C++ kitaplığıdır. Crypto++ kitaplığının en önemli özelliği kodlarının kamu malı (telif haksız) olmasıdır. Kitaplık, seçki olarak telif haklarına sahip olsa da, dosyalar tek tek kamu malıdır.</Description>
        <Description xml:lang="pl">crypto++ jest klasą C++ dostarczającą narzędzia do kryptografii.</Description>
    </Source>

    <Package>
        <Name>crypto++-devel</Name>
        crypto++ için geliştirme dosyaları
        Pliki nagłówkowe do crypto++.
    </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 shelltools
from pisi.actionsapi import get

def setup():
    #shelltools.export("CFLAGS","%s -fPIE" % get.CFLAGS())
    #shelltools.export("LDFLAGS", "%s -pie -Wl,-z,relro,-z,now"  % get.LDFLAGS())

    autotools.configure("--enable-symcryptrun \
                         --disable-rpath \
                         --enable-gpgtar \
                         --enable-maintainer-mode")

def build():
    autotools.make("-j1")
    autotools.make("-C doc html")

def check():
    autotools.make("check")

def install():
    autotools.rawInstall('DESTDIR=%s libexecdir="/usr/libexec"' % get.installDIR())

    # Compat symlinks
    pisitools.dosym("gpg2", "/usr/bin/gpg")
    pisitools.dosym("gpgv2", "/usr/bin/gpgv")
    pisitools.dosym("gpg2.1", "/usr/share/man/man1/gpg.1")
    pisitools.dosym("gpgv2.1", "/usr/share/man/man1/gpgv.1")

    # Lets make doc
    pisitools.dohtml("doc/*")
    pisitools.dohtml("doc/gnupg.html/*")
    pisitools.dodoc("ChangeLog", "NEWS", "README", "THANKS", "TODO")


code:
#!/usr/bin/python

import os

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    os.system("/bin/chmod u+s,go-r /usr/bin/gpg2")
    os.system("/bin/chmod u+s,go-r /usr/bin/gpg-agent")


code:
--- gnupg-1.9.3/g10/photoid.c.display	2004-01-24 15:03:56.745060064 +0800
+++ gnupg-1.9.3/g10/photoid.c	2004-01-24 15:04:21.560287576 +0800
@@ -240,7 +240,7 @@
 #elif defined(__riscos__)
   return "Filer_Run %I";
 #else
-  return "xloadimage -fork -quiet -title 'KeyID 0x%k' stdin";
+  return "display -title 'KeyID 0x%k'";
 #endif
 }
 #endif


code:
We have to use fixed s2k-count number otherwise the gpg2 would
want to consult gpg-agent which is not yet installed in the mock
chroot.
Index: gnupg-2.0.17/tests/openpgp/conventional-mdc.test
===================================================================
--- gnupg-2.0.17.orig/tests/openpgp/conventional-mdc.test
+++ gnupg-2.0.17/tests/openpgp/conventional-mdc.test
@@ -21,9 +21,9 @@ for ciph in `all_cipher_algos`; do
         dd if=data-80000 of=z bs=1 count=$i 2>/dev/null
     fi
     echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
-	--force-mdc --cipher $ciph -c -o x --yes z
+	--force-mdc --cipher $ciph -c -o x --yes --s2k-count 65536 z
     echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
-	-o y --yes x
+	-o y --yes --s2k-count 96 x
     cmp z y || error "$ciph/$i: mismatch"
   done
 done
Index: gnupg-2.0.17/tests/openpgp/conventional.test
===================================================================
--- gnupg-2.0.17.orig/tests/openpgp/conventional.test
+++ gnupg-2.0.17/tests/openpgp/conventional.test
@@ -12,8 +12,8 @@

 #info Checking conventional encryption
 for i in plain-2 data-32000 ; do
-    echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -c -o x --yes $i
-    echo "Hier spricht HAL" | $GPG --passphrase-fd 0    -o y --yes x
+    echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -c -o x --yes --s2k-count 65536 $i
+    echo "Hier spricht HAL" | $GPG --passphrase-fd 0    -o y --yes --s2k-count 65536 x
     cmp $i y || error "$i: mismatch"
 done

@@ -21,8 +21,8 @@ for a in `all_cipher_algos`; do
     echo_n "$a "
     for i in plain-1 data-80000 ; do
       echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \
-					  --cipher-algo $a -c -o x --yes $i
-      echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -o y --yes x
+					  --cipher-algo $a -c -o x --yes --s2k-count 65536 $i
+      echo "Hier spricht HAL" | $GPG --passphrase-fd 0 -o y --yes --s2k-count 65536 x
       cmp $i y || error "$i: ($a) mismatch"
     done
 done
Index: gnupg-2.0.17/tests/openpgp/genkey1024.test
===================================================================
--- gnupg-2.0.17.orig/tests/openpgp/genkey1024.test
+++ gnupg-2.0.17/tests/openpgp/genkey1024.test
@@ -10,7 +10,7 @@

 . $srcdir/defs.inc || exit 3

-$GPG --quiet --batch --debug-quick-random --gen-key <<EOF
+$GPG --quiet --batch --debug-quick-random --s2k-count 65536 --gen-key <<EOF
 Key-Type: DSA
 Key-Length: 1024
 Subkey-Type: ELG
@@ -24,7 +24,7 @@ Passphrase: abc
 EOF

 if have_pubkey_algo "RSA"; then
-$GPG --quiet --batch --debug-quick-random --gen-key <<EOF
+$GPG --quiet --batch --debug-quick-random --s2k-count 65536 --gen-key <<EOF
 Key-Type: RSA
 Key-Length: 1024
 Key-Usage: sign,encrypt


code:
diff -Naur old/agent/protect-tool.c new/agent/protect-tool.c
--- old/agent/protect-tool.c	2012-12-08 13:53:17.067611957 +1100
+++ new/agent/protect-tool.c	2012-12-08 13:53:28.247633012 +1100
@@ -102,6 +102,7 @@
 static int opt_status_msg;
 static const char *opt_p12_charset;
 static const char *opt_agent_program;
+static session_env_t opt_session_env;

 static char *get_passphrase (int promptno);
 static void release_passphrase (char *pw);
@@ -1040,6 +1041,7 @@

   opt_homedir = default_homedir ();

+  opt_session_env = session_env_new ();

   pargs.argc = &argc;
   pargs.argv = &argv;
@@ -1091,7 +1093,7 @@
                                 opt.verbose,
                                 opt_homedir,
                                 opt_agent_program,
-                                NULL, NULL, NULL);
+                                NULL, NULL, opt_session_env);

   if (opt_prompt)
     opt_prompt = percent_plus_unescape (opt_prompt, 0);


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>gnupg</Name>
        <Homepage>http://www.gnupg.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3+</License>
        <IsA>app:console</IsA>
        The GNU Privacy Guard, a PGP replacement
        <Description>GnuPG allows to encrypt and sign your data and communication, features a versatile key managment system as well as access modules for all kinds of public key directories.</Description>
        <Archive sha1sum="b698012cc2d77c2652afd168a15e679d1394fa89" type="tarbz2">http://gd.tuwien.ac.at/pub/gnupg/gnupg/gnupg-2.1.18.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>openldap-client</Dependency>
            <Dependency>pinentry</Dependency>
            <Dependency>npth-devel</Dependency>
            <Dependency>libassuan-devel</Dependency>
            <Dependency>libksba-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
            <Dependency>bzip2</Dependency>
            <Dependency>texinfo</Dependency>
            <Dependency>gnutls-devel</Dependency>
            <Dependency>readline-devel</Dependency>
            <Dependency>libgcrypt-devel</Dependency>
            <Dependency>libgpg-error-devel</Dependency>
            <Dependency>libusb-compat-devel</Dependency>
        </BuildDependencies>
        <Patches>

        </Patches>
    </Source>

    <Package>
        <Name>gnupg</Name>
        <Replaces>
            <Package>dirmngr</Package>
        </Replaces>
        <Conflicts>
            <Package>dirmngr</Package>
        </Conflicts>
        <RuntimeDependencies>
            <Dependency>openldap-client</Dependency>
            <Dependency>npth</Dependency>
            <Dependency>libassuan</Dependency>
            <Dependency>pinentry</Dependency>
            <Dependency>libksba</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>bzip2</Dependency>
            <Dependency>gnutls</Dependency>
            <Dependency>readline</Dependency>
            <Dependency>libgcrypt</Dependency>
            <Dependency>libgpg-error</Dependency>
            <Dependency>libusb</Dependency>

            <Dependency>libusb-compat</Dependency>
         </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/libexec</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="doc">/usr/share/doc/html</Path>
            <Path fileType="data">/usr/share/gnupg</Path>
            <Path fileType="info">/usr/share/info</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
    </Package>

    <Package>
        <Name>gnupg-docs</Name>
        Documentation files for GnuPG
        <RuntimeDependencies>
            <Dependency release="current">gnupg</Dependency>
         </RuntimeDependencies>
        <Files>
            <Path fileType="doc">/usr/share/doc/gnupg/html</Path>
            <Path fileType="doc">/usr/share/gnupg/help.*</Path>
            <Path fileType="doc">/usr/share/doc/gnupg/faq.html</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-01-25</Date>
            <Version>2.1.18</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-12-24</Date>
            <Version>2.1.17</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>2.1.7</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-08-21</Date>
            <Version>2.1.7</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>gnupg</Name>
        GNU Gizlilik Koruması
        <Description xml:lang="tr">GnuPG verilerinizin ve iletişimlerinizin şifrelenmesi ve imzalanmmasını sağlar, her tür genel anahtar dizinleri için  modullere erişiminde olduğu gibi çok yönlü anahtar yönetim sistemi avantajı vardır.</Description>
    </Source>

    <Package>
        <Name>gnupg-docs</Name>
        GnuPG paketine ait API dokümantasyonu
    </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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    options = "--disable-static \
               --disable-rpath \
               --disable-silent-rules \
               --disable-guile \
               --enable-heartbeat-support \
               --with-zlib \
               --without-tpm \
               --without-dane \
               --disable-valgrind-tests"

    if get.buildTYPE() == "emul32":
        options += " --disable-hardware-acceleration \
                    --with-included-unistring \
                     --enable-local-libopts \
                   "

    autotools.configure(options)

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

def build():
    autotools.make()

#def check():
    #some tests fail in emul32
    #if not get.buildTYPE() == "emul32":
        #autotools.make("check")

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


code:
#!/bin/sh

prefix=/usr
exec_prefix=/usr
exec_prefix_set=no

name=`basename $0`
name=${name#lib}
name=${name%-config}

libs=`pkg-config --libs $name`
cflags=`pkg-config --cflags $name`
version=`pkg-config --modversion $name`

usage()
{

echo Usage: lib$name-config [OPTIONS]
	cat <<EOF
Options:
	[--prefix[=DIR]]
	[--exec-prefix[=DIR]]
	[--version]
	[--libs]
	[--cflags]
EOF
	exit $1
}

if test $# -eq 0; then
	usage 1 1>&2
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
	exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo_prefix=yes
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo_exec_prefix=yes
      ;;
    --version)
      echo $version
      exit 0
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --libs)
      echo_libs=yes
      ;;
    --help)
      usage 0
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done

if test "$echo_prefix" = "yes"; then
    echo $prefix
fi

if test "$echo_exec_prefix" = "yes"; then
    echo $exec_prefix
fi

if test "$echo_cflags" = "yes"; then
    echo $cflags
fi

if test "$echo_libs" = "yes"; then
    echo $libs
fi


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>gnutls</Name>
        <Homepage>http://www.gnutls.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>library</IsA>
        GNU TLS Library
        <Description>gnutls is a project that aims to develop a library which provides a secure layer, over a reliable transport layer. Currently the GnuTLS library implements the proposed standards by the IETF's TLS working group.</Description>
        <Archive sha1sum="24e5a416ce320945a2515619f3c2f0f6f2290ddc" type="tarxz">http://gd.tuwien.ac.at/pub/gnupg/gnutls/v3.6/gnutls-3.6.2.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>gc-devel</Dependency>
            <Dependency>gmp-devel</Dependency>
            <Dependency>nettle-devel</Dependency>
            <Dependency>autogen-devel</Dependency>
            <Dependency>p11-kit-devel</Dependency>
            <Dependency>libidn-devel</Dependency>
            <Dependency>libunistring-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
            <Dependency>libtasn1-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>gnutls</Name>
        <RuntimeDependencies>
            <Dependency>zlib</Dependency>
            <Dependency>libidn</Dependency>
            <Dependency>gmp</Dependency>
            <Dependency>nettle</Dependency>
            <Dependency>autogen</Dependency>
            <Dependency>p11-kit</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>libunistring</Dependency>
            <Dependency>libtasn1</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/share</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="executable">/usr/bin</Path>
        </Files>
    </Package>

    <Package>
        <Name>gnutls-devel</Name>
        Development files for gnutls
        <RuntimeDependencies>
            <Dependency>nettle-devel</Dependency>
            <Dependency>p11-kit-devel</Dependency>
            <Dependency>libtasn1-devel</Dependency>
            <Dependency>zlib-devel</Dependency>
            <Dependency>libidn-devel</Dependency>
            <Dependency release="current">gnutls</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
            <Path fileType="library">/usr/lib32/pkgconfig</Path>
            <Path fileType="data">/usr/share/info/gnutls*</Path>
            <Path fileType="executable">/usr/bin/libgnutls*-config</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/libgnutls-config">libgnutls-config</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/libgnutls-extra-config">libgnutls-config</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>gnutls-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for gnutls
        <BuildType>emul32</BuildType>
        <BuildDependencies>
            <Dependency>gmp-32bit</Dependency>
            <Dependency>zlib-32bit</Dependency>
            <Dependency>libidn-32bit</Dependency>
            <Dependency>nettle-32bit</Dependency>
            <Dependency>p11-kit-32bit</Dependency>
            <Dependency>libtasn1-32bit</Dependency>
        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency>libgcc</Dependency>
            <Dependency>gmp-32bit</Dependency>
            <Dependency>zlib-32bit</Dependency>
            <Dependency>nettle-32bit</Dependency>
            <Dependency>p11-kit-32bit</Dependency>
            <Dependency>libtasn1-32bit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
    </Package>

    <History>
        <Update release="6">
            <Date>2018-02-21</Date>
            <Version>3.6.2</Version>
            <Comment>Version Bump</Comment>
            <Name>Mustafa Cianasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="5">
            <Date>2017-02-18</Date>
            <Version>3.5.8</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2017-01-25</Date>
            <Version>3.3.26</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-08</Date>
            <Version>3.3.16</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-25</Date>
            <Version>3.3.16</Version>
            <Comment>Release bump.</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2015-07-13</Date>
            <Version>3.3.16</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>gnutls</Name>
        GNU TLS Kütüphanesi
        Biblioteka GNU TLS (Transport Layer Security)
        <Description xml:lang="tr">GnuTLS, erişilebilir bir gönderim katmanı üzerinde güvenli katman oluşturmayı amaçlayan  bir projedir. GnuTLS kütüphanesi halen IETF TLS çalışma grubunun öngördüğü standartları uygulamaya geçirmektedir.</Description>
        <Description xml:lang="fr">GnuTLS est un projet dont l'objectif est de développer une librairie fournissant une couche de sécurité au dessus d'une couche de transport fiable. Actuellement la librairie GnuTLS implémente les standards proposés par le groupe de travail TLs de l'IETF.</Description>
        <Description xml:lang="es">GnuTLS es un proyecto que apunta al desarrollo de una librería, que facilite una capa segura, a través de una capa de transporte fiable. Actualmente la librería GnuTLS implementa los estándares propuestos del grupo de trabajo de TLS de IETF.</Description>
        <Description xml:lang="pl">GnuTLS to projekt mający na celu stworzenie biblioteki udostępniającej powłokę bezpieczeństwa ponad powłoką transportową (np. TCP/IP). Aktualnie biblioteka gnuTLS implementuje standardy proponowane przez grupę roboczą IETF TLS.</Description>
    </Source>

    <Package>
        <Name>gnutls-guile</Name>
        gnutls için guile bağlayıcıları
        Wiązania Guile do GnuTLS.
    </Package>

    <Package>
        <Name>gnutls-devel</Name>
        gnutls için geliştirme dosyaları
        Pliki nagłówkowe do gnutls.
    </Package>

    <Package>
        <Name>gnutls-32bit</Name>
        gnutls için 32-bit paylaşımlı kitaplıklar
        32-bitowe biblioteki GnuTLS.
    </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.configure("--disable-fd-passing \
                          --disable-static \
                          --disable-gpgsm-test \
                          --enable-languages=cpp,qt,python")

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

def build():
    autotools.make()

#def check():
    #autotools.make("check")

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

    pisitools.insinto("/usr/lib/cmake/Qgpgme", "lang/qt/src/QGpgmeConfig.cmake")
    pisitools.insinto("/usr/lib/cmake/Qgpgme", "lang/qt/src/QGpgmeConfigVersion.cmake")

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


code:
diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in
index 928d19f..cbe9713 100644
--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in
+++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in
@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED)

 set_target_properties(Gpgmepp PROPERTIES
   INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
-  INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
+  INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@"
   IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so"
 )

--


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>gpgme</Name>
        <Homepage>http://www.gnupg.org/gpgme.html</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <License>LGPLv2</License>
        <IsA>library</IsA>
        GnuPG Made Easy is a library for making GnuPG easier to use
        <Description>GPGME is a library designed to make access to GnuPG easier for applications. It provides a high-Level Crypto application programming interface (API) for encryption, decryption, signing, signature verification and key management.</Description>
        <Archive sha1sum="efa043064dbf675fd713228c6fcfcc4116feb221" type="tarbz2">http://gd.tuwien.ac.at/pub/gnupg/gpgme/gpgme-1.8.0.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>gnupg</Dependency>
            <Dependency>libgpg-error-devel</Dependency>
            <Dependency>libassuan-devel</Dependency>
            <Dependency>qt5-base-devel</Dependency>
            <Dependency>doxygen</Dependency>
            <Dependency>swig</Dependency>
            <Dependency>python3-devel</Dependency>
            <Dependency>python-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">remove-a-forgotten-instance-of-libsuffix.diff</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>gpgme</Name>
        <RuntimeDependencies>
            <Dependency>gnupg</Dependency>
            <Dependency>libgpg-error</Dependency>
            <Dependency>libassuan</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>python3</Dependency>
            <Dependency>python</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/share/common-lisp</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="info">/usr/share/info</Path>
        </Files>
    </Package>

    <Package>
        <Name>gpgme-devel</Name>
        Development files for gpgme
        <RuntimeDependencies>
            <Dependency release="current">gpgme</Dependency>
            <Dependency>libgpg-error-devel</Dependency>
            <Dependency>libassuan-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/share/aclocal</Path>
        </Files>
    </Package>

    <Package>
        <Name>gpgme-qt5</Name>
        Qt5 bindings for gpgme
        <RuntimeDependencies>
            <Dependency release="current">gpgme</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>qt5-base</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib/libqgpgme.so.*</Path>
        </Files>
    </Package>

    <Package>
        <Name>gpgme-python</Name>
        Python bindings for gpgme
        <RuntimeDependencies>
            <Dependency release="current">gpgme</Dependency>
            <Dependency>python</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib/python2.7/site-packages</Path>
        </Files>
    </Package>

    <Package>
        <Name>gpgme-python3</Name>
        Python3 bindings for gpgme
        <RuntimeDependencies>
            <Dependency release="current">gpgme</Dependency>
            <Dependency>python3</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib/python3.6/site-packages/</Path>
        </Files>
    </Package>

    <Package>
        <Name>gpgme-qt5-devel</Name>
        Development files for gpgme-qt5
        <RuntimeDependencies>
            <Dependency release="current">gpgme</Dependency>
            <Dependency release="current">gpgme-devel</Dependency>
            <Dependency release="current">gpgme-qt5</Dependency>
            <Dependency>qt5-base-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib/cmake/QGpgme</Path>
            <Path fileType="header">/usr/include/qgpgme/*</Path>
        </Files>
    </Package>

    <History>
        <Update release="5">
            <Date>2017-12-31</Date>
            <Version>1.8.0</Version>
            <Comment>split package.</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="4">
            <Date>2017-07-04</Date>
            <Version>1.8.0</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2017-01-02</Date>
            <Version>1.7.1</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.5.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-08-21</Date>
            <Version>1.5.5</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>gpgme</Name>
        GnuPG Made Easy, GnuPG kullanmayı kolaylaştıran bir kütüphanedir
        <Description xml:lang="tr">GPGME daha kolay uygulanması amacıyla GnuPG ye erişimi sağlamak için tasarlanmış bir kütüphanedir. Şifreleme, şifre çözme, imzalama, imza kontrolü ve anahtar yönetimi için yüksek düzeyde gizli uygulama programlama arayüzü sağlar.</Description>
        <Description xml:lang="fr">GPGME est une librairie conçue pour donner aux applications un accès plus facile à GnuPG. Elle fournit une interface de programmation d'application (API) de haut niveau pour la cryptographie permettant de crypter, décrypter, signer, vérifier les signatures et la gestion de clefs.</Description>
        <Description xml:lang="es">GPGME es una librería diseñada para simplificar el acceso a GnuPG para aplicaciones. Facilita una interfaz de programación de aplicación (API) de alto nivel para encriptación, decriptación, firmas, verificación de firmas y administración de llaves.</Description>
    </Source>

    <Package>
        <Name>gpgme-devel</Name>
        gpgme için geliştirme dosyaları
    </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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def build():
    autotools.make("NO_ARLIB=1 LIBDIR=/lib USRLIBDIR=/usr/lib NO_GLIBC_KEYERR=1 CFLAGS=\"%s\"" % get.CFLAGS())

def install():
    autotools.install("NO_ARLIB=1 LIBDIR=/lib USRLIBDIR=/usr/lib DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("LICENCE.GPL", "LICENCE.LGPL", "README")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>keyutils</Name>
        <Homepage>http://people.redhat.com/~dhowells/keyutils/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2+</License>
        <License>LGPLv2+</License>
        <IsA>library</IsA>
        <IsA>app:console</IsA>
        <Summary>Linux key management utilities</Summary>
        <Description>keyutils contains utilities to control the kernel key management facility and to provide a mechanism by which the kernel call back to userspace to get a key instantiated.</Description>
        <Archive sha1sum="c139dc6f86d772dc608e4572d67c6e023a34a783" type="tarbz2">http://people.redhat.com/~dhowells/keyutils/keyutils-1.5.10.tar.bz2</Archive>
    </Source>

    <Package>
        <Name>keyutils</Name>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="executable">/bin</Path>
            <Path fileType="executable">/sbin</Path>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="library">/lib</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="data">/usr/share/keyutils</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2018-02-22</Date>
            <Version>1.5.10</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2017-02-17</Date>
            <Version>1.5.9</Version>
            <Comment>Rebuild for new toolchain.</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.5.9</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-05-22</Date>
            <Version>1.5.9</Version>
            <Comment>First release</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvarice@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>keyutils</Name>
        <Summary xml:lang="tr">Linux anahtar yönetim araçları</Summary>
        <Description xml:lang="tr">keyutils, Linux çekirdeğindeki anahtar yönetim kolaylıklarını denetlemek ve çekirdek ile kullanıcı uzayı arasında iletişim kurmak için gereken araçları içerir.</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/licenses/gpl.txt

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

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

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    pisitools.dodoc("AUTHORS", "ChangeLog", "NEWS", "README")

def check():
    autotools.make("check")


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libksba</Name>
        <Homepage>http://www.gnupg.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3</License>
        <IsA>library</IsA>
        <IsA>app:console</IsA>
        Library handling X.509 certificates and CMS data
        <Description>libksba is a library designed to build software based on the X.509 and CMS protocols.</Description>
        <Archive sha1sum="a98385734a0c3f5b713198e8d6e6e4aeb0b76fde" type="tarbz2">http://gd.tuwien.ac.at/pub/gnupg/libksba/libksba-1.3.5.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>libgpg-error-devel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>libksba</Name>
        <RuntimeDependencies>
            <Dependency>libgpg-error</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="info">/usr/share/info</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>libksba-devel</Name>
        Development files for libksba
        <RuntimeDependencies>
            <Dependency release="current">libksba</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/share/aclocal</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-02-19</Date>
            <Version>1.3.5</Version>
            <Comment>Release bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-12-24</Date>
            <Version>1.3.5</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>1.3.3</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-04-12</Date>
            <Version>1.3.3</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>libksba</Name>
        Çeşitli uygulamaların X.509 sertifikaları ve CMS verilerine kolay erişebilmesini sağlayan bir kitaplık
        <Description xml:lang="tr">libksba, X.509 ve CMS protokollerini kullanan yazılımlar üretmek için kullanılan bir kitaplıktır.</Description>
        rends les certificats X.509 et le CMS facilement accessible aux applications.
    </Source>

    <Package>
        <Name>libksba-devel</Name>
        libksba için geliştirme dosyaları
    </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

def setup():
    autotools.configure()

def build():
    autotools.make()

def check():
    autotools.make("check")

def install():
    autotools.install()

    # Empty
    pisitools.removeDir("/usr/lib/libmcrypt")

    pisitools.dodoc("ChangeLog","COPYING.LIB","KNOWN-BUGS","NEWS","README")


code:
diff -up libmcrypt-2.5.8/Makefile.in.orig libmcrypt-2.5.8/Makefile.in
--- libmcrypt-2.5.8/Makefile.in.orig	2007-02-19 00:32:38.000000000 -0600
+++ libmcrypt-2.5.8/Makefile.in	2007-07-19 21:23:39.000000000 -0500
@@ -209,8 +209,8 @@ target_os = @target_os@
 target_vendor = @target_vendor@
 INCLUDES = $(INCLTDL)
 EXTRA_DIST = KNOWN-BUGS THANKS NEWS libmcrypt.spec.in libmcrypt.spec COPYING.LIB
-DIST_SUBDIRS = libltdl modules include lib src doc
-SUBDIRS = $(LIBLTDL_DIR) modules include lib src doc
+DIST_SUBDIRS = modules include lib src doc
+SUBDIRS = modules include lib src doc
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive

diff -up libmcrypt-2.5.8/configure.orig libmcrypt-2.5.8/configure
--- libmcrypt-2.5.8/configure.orig	2007-02-19 00:32:39.000000000 -0600
+++ libmcrypt-2.5.8/configure	2007-07-19 21:21:38.000000000 -0500
@@ -426,7 +426,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=

 ac_unique_file="lib/mcrypt.c"
-ac_subdirs_all="$ac_subdirs_all libltdl"
+ac_subdirs_all="$ac_subdirs_all"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
@@ -4425,7 +4425,7 @@ fi

-subdirs="$subdirs libltdl"
+subdirs="$subdirs"

  # Check whether --enable-static or --disable-static was given.
 if test "${enable_static+set}" = set; then


code:
diff -up libmcrypt-2.5.8/modules/algorithms/des.c.BAD libmcrypt-2.5.8/modules/algorithms/des.c
--- libmcrypt-2.5.8/modules/algorithms/des.c.BAD	2008-08-25 17:40:29.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/des.c	2008-08-25 17:40:51.000000000 -0400
@@ -35,9 +35,12 @@

 /* #define	NULL	0 */

-static void permute_ip(), permute_fp(), perminit_ip(), spinit(),
-perminit_fp();
-static word32 f();
+static void permute_ip(char *, DES_KEY *, char *);
+static void permute_fp(char *, DES_KEY *, char *);
+static void perminit_ip(DES_KEY *);
+static void spinit(DES_KEY *);
+static void perminit_fp(DES_KEY *);
+static word32 f(DES_KEY *, register word32, register char *);

 /* Tables defined in the Data Encryption Standard documents */
diff -up libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD libmcrypt-2.5.8/modules/algorithms/tripledes.c
--- libmcrypt-2.5.8/modules/algorithms/tripledes.c.BAD	2008-08-25 17:40:56.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/tripledes.c	2008-08-25 17:41:13.000000000 -0400
@@ -36,8 +36,10 @@

 /* #define	NULL	0 */

-static void permute(), perminit(), spinit();
-static word32 f();
+static void permute(char *, char[16][16][8], char *);
+static void perminit(char[16][16][8], char[64]);
+static void spinit(TRIPLEDES_KEY *, int);
+static word32 f(TRIPLEDES_KEY *, int, register word32, register char *);

 /* Tables defined in the Data Encryption Standard documents */


code:
diff -up libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD libmcrypt-2.5.8/modules/algorithms/twofish.c
--- libmcrypt-2.5.8/modules/algorithms/twofish.c.BAD	2008-08-25 17:38:21.000000000 -0400
+++ libmcrypt-2.5.8/modules/algorithms/twofish.c	2008-08-25 17:38:30.000000000 -0400
@@ -499,7 +499,7 @@ static void f_rnd(int i, word32* blk, TW
 /* encrypt a block of text  */
 WIN32DLL_DEFINE void _mcrypt_encrypt(TWI * pkey, word32 * in_blk)
 {
-	word32 t0, t1, blk[4];
+	word32 t0 = 0, t1 = 0, blk[4];
 #ifdef WORDS_BIGENDIAN
 	blk[0] = byteswap32(in_blk[0]) ^ pkey->l_key[0];
 	blk[1] = byteswap32(in_blk[1]) ^ pkey->l_key[1];


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libmcrypt</Name>
        <Homepage>http://mcrypt.sourceforge.net/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2.1</License>
        <IsA>library</IsA>
        A thread-safe encryption library
        <Description>libmcrypt is a thread-safe encryption library. It allows developers to use a wide range of encryption functions, without making drastic changes to their code. It allows users to encrypt files or data streams without having to be cryptographers.</Description>
        <Archive sha1sum="b4d4d8851db543e6fda80572a54a4901b4e767da" type="tarbz2">mirrors://sourceforge/mcrypt/libmcrypt-2.5.8.tar.bz2</Archive>
        <Patches>
            <Patch level="1">libmcrypt-2.5.8-nolibltdl.patch</Patch>
            <Patch level="1">libmcrypt-2.5.8-prototypes.patch</Patch>
            <Patch level="1">libmcrypt-2.5.8-uninitialized.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>libmcrypt</Name>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc/libmcrypt</Path>
        </Files>
    </Package>

    <Package>
        <Name>libmcrypt-devel</Name>
        Development files for libmcrypt
        <RuntimeDependencies>
            <Dependency release="current">libmcrypt</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/share/aclocal</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-09-19</Date>
            <Version>2.5.8</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-08</Date>
            <Version>2.5.8</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-01-31</Date>
            <Version>2.5.8</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>libmcrypt</Name>
        Güvenli şifreleme kütüphanesi.
        <Description xml:lang="tr">libmcrypt bir güvenli şifreleme kütüphanesidir. Geliştiricilere kodlarında çok büyük bir değişikliğe gerek duymadan kullanabilecekleri, geniş bir şifreleme fonksiyon kaynağı sunar. Şifreleme uzmanı olmadan dosya ve verileri kolayca şifrelemenizi sağlar.</Description>
    </Source>

    <Package>
        <Name>libmcrypt-devel</Name>
        libmcrypt için geliştirme dosyaları
    </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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    options = "--disable-static"

    if not get.buildTYPE() == "emul32":
        options += " --libdir=/usr/lib"

    autotools.configure(options)

    #pisitools.dosed("libtool", "^sys_lib_dlsearch_path_spec=.*", "sys_lib_dlsearch_path_spec=\"/%{_lib} %{_libdir} \"")

def build():
    autotools.make()

def check():
    autotools.make("check")

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

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

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


code:
#!/bin/sh

prefix=/usr
exec_prefix=/usr
exec_prefix_set=no

name=`basename $0`
name=${name#lib}
name=${name%-config}

libs=`pkg-config --libs $name`
cflags=`pkg-config --cflags $name`
version=`pkg-config --modversion $name`

usage()
{

echo Usage: lib$name-config [OPTIONS]
cat <<EOF
Options:
[--prefix[=DIR]]
[--exec-prefix[=DIR]]
[--version]
[--libs]
[--cflags]
EOF
exit $1
}

if test $# -eq 0; then
usage 1 1>&2
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo_prefix=yes
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo_exec_prefix=yes
      ;;
    --version)
      echo $version
      exit 0
      ;;
    --cflags)
      echo_cflags=yes
      ;;
    --libs)
      echo_libs=yes
      ;;
    --help)
      usage 0
      ;;
    *)
      usage 1 1>&2
      ;;
  esac
  shift
done

if test "$echo_prefix" = "yes"; then
    echo $prefix
fi

if test "$echo_exec_prefix" = "yes"; then
    echo $exec_prefix
fi

if test "$echo_cflags" = "yes"; then
    echo $cflags
fi

if test "$echo_libs" = "yes"; then
    echo $libs
fi


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libtasn1</Name>
        <Homepage>http://www.gnutls.org/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>library</IsA>
        ASN.1 library used in GNUTLS
        <Description>libtasn1 is the ASN.1 library which provides ASN.1 structures parsing capabilities for use with GNUTLS.</Description>
        <Archive sha1sum="a84afb4cd8187c1fa5901c6bc1cf1486eea66635" type="targz">http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.13.tar.gz</Archive>
    </Source>

    <Package>
        <Name>libtasn1</Name>
        <Files>
            <Path fileType="data">/usr/share</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="executable">/usr/bin</Path>
        </Files>
    </Package>

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

    <Package>
        <Name>libtasn1-32bit</Name>
        <PartOf>emul32</PartOf>
        32-bit shared libraries for libtasn1
        <BuildType>emul32</BuildType>
        <RuntimeDependencies>
            <Dependency release="current">libtasn1</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32/</Path>
        </Files>
    </Package>

    <History>
        <Update release="5">
            <Date>2018-02-22</Date>
            <Version>4.13</Version>
            <Comment>Version Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2017-01-25</Date>
            <Version>4.10</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold(groni)</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-08</Date>
            <Version>4.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-27</Date>
            <Version>4.5</Version>
            <Comment>Release bump</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2015-07-13</Date>
            <Version>4.5</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>libtasn1</Name>
        GNUTLS için kullanılan ASN.1 kütüphanesi
        <Description xml:lang="tr">libtasn1, ASN.1 yapılarının ayrıştırılmasını sağlayan ve GNUTLS içerisinde kullanılan ASN.1 kütüphanesidir.</Description>
    </Source>

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

    <Package>
        <Name>libtasn1-32bit</Name>
        libtasn1 için 32bit kütüphanesi
    </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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools

WorkDir="%s-%s" % (get.srcNAME(), get.srcVERSION())
pisitools.cflags.add("-fno-strict-aliasing")

def setup():
    # nss-pem
    #shelltools.copytree("../nss-pem-3ade37c5c4ca5a6094e3f4b2e4591405db1867dd/nss/lib/ckfw/pem", "nss/lib/ckfw")

    # Respect LDFLAGS
    pisitools.dosed("nss/coreconf/rules.mk", "(\$\(MKSHLIB\))\s-o", r"\1 $(LDFLAGS) -o")

    # Create nss.pc and nss-config dynamically
    shelltools.system("./generate-pc-config.sh")

def build():
    pisitools.dosed("nss/coreconf/Linux.mk", " -shared ", " -Wl,-O1,--as-needed -shared ")
    if get.ARCH() == "x86_64":
        shelltools.export("USE_64", "1")

    shelltools.export("BUILD_OPT", "1")
    shelltools.export("NSS_ENABLE_ECC", "1")
    shelltools.export("NSS_USE_SYSTEM_SQLITE", "1")
    shelltools.export("NSPR_INCLUDE_DIR", "`nspr-config --includedir`")
    shelltools.export("NSPR_LIB_DIR", "`nspr-config --libdir`")
    shelltools.export("XCFLAGS", get.CFLAGS())

    # Use system zlib
    shelltools.export("PKG_CONFIG_ALLOW_SYSTEM_LIBS", "1")
    shelltools.export("PKG_CONFIG_ALLOW_SYSTEM_CFLAGS", "1")

    autotools.make("-C nss/coreconf -j1")
    autotools.make("-C nss/lib/dbm")
    autotools.make("-C nss -j1")

def install():
    for binary in ["*util", "shlibsign", "signtool", "signver", "ssltap"]:
        pisitools.insinto("/usr/bin","dist/Linux*/bin/%s" % binary, sym=False)

    for lib in ["*.a","*.chk","*.so"]:
        pisitools.insinto("/usr/lib/nss","dist/Linux*/lib/%s" % lib, sym=False)

    # Headers
    for header in ["dist/private/nss/*.h","dist/public/nss/*.h"]:
        pisitools.insinto("/usr/include/nss", header, sym=False)

    # Drop executable bits from headers
    shelltools.chmod("%s/usr/include/nss/*.h" % get.installDIR(), mode=0644)

    # Install nss-config and nss.pc
    pisitools.insinto("/usr/lib/pkgconfig", "dist/pkgconfig/nss.pc")
    pisitools.insinto("/usr/bin", "dist/pkgconfig/nss-config")

    # create empty NSS database
    pisitools.dodir("/etc/pki/nssdb")
    shelltools.export("LD_LIBRARY_PATH", "%s/usr/lib/nss" % get.installDIR())
    shelltools.system("%s/usr/bin/modutil -force -dbdir \"sql:%s/etc/pki/nssdb\" -create" % (get.installDIR(), get.installDIR()))
    shelltools.chmod("%s/etc/pki/nssdb/*" % get.installDIR(), 0644)
    pisitools.dosed("%s/etc/pki/nssdb/*" % get.installDIR(), get.installDIR(), "")


code:
diff -up nss/coreconf/Linux.mk.relro nss/coreconf/Linux.mk
--- nss/coreconf/Linux.mk.relro	2013-04-09 14:29:45.943228682 -0700
+++ nss/coreconf/Linux.mk	2013-04-09 14:31:26.194953927 -0700
@@ -174,6 +174,12 @@ endif
 endif
 endif

+# harden DSOs/executables a bit against exploits
+ifeq (2.6,$(firstword $(sort 2.6 $(OS_RELEASE))))
+DSO_LDOPTS+=-Wl,-z,relro
+LDFLAGS	+= -Wl,-z,relro
+endif
+
 USE_SYSTEM_ZLIB = 1
 ZLIB_LIBS = -lz


code:
diff -up nss/cmd/httpserv/httpserv.c.539183 nss/cmd/httpserv/httpserv.c
--- nss/cmd/httpserv/httpserv.c.539183	2013-05-28 14:43:24.000000000 -0700
+++ nss/cmd/httpserv/httpserv.c	2013-05-30 22:16:46.685373471 -0700
@@ -661,14 +661,18 @@ getBoundListenSocket(unsigned short port
     PRStatus	       prStatus;
     PRNetAddr          addr;
     PRSocketOptionData opt;
+    PRUint16           socketDomain = PR_AF_INET;

-    addr.inet.family = PR_AF_INET;
-    addr.inet.ip     = PR_INADDR_ANY;
-    addr.inet.port   = PR_htons(port);
+    if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
+	errExit("PR_SetNetAddr");
+    }

-    listen_sock = PR_NewTCPSocket();
+    if (PR_GetEnv("NSS_USE_SDP")) {
+        socketDomain = PR_AF_INET_SDP;
+    }
+    listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
     if (listen_sock == NULL) {
-	errExit("PR_NewTCPSocket");
+	errExit("PR_OpenTCPSocket error");
     }

     opt.option = PR_SockOpt_Nonblocking;
diff -up nss/cmd/selfserv/selfserv.c.539183 nss/cmd/selfserv/selfserv.c
--- nss/cmd/selfserv/selfserv.c.539183	2013-05-28 14:43:24.000000000 -0700
+++ nss/cmd/selfserv/selfserv.c	2013-05-30 22:16:46.688373495 -0700
@@ -1687,14 +1687,18 @@ getBoundListenSocket(unsigned short port
     PRStatus	       prStatus;
     PRNetAddr          addr;
     PRSocketOptionData opt;
+    PRUint16           socketDomain = PR_AF_INET;

-    addr.inet.family = PR_AF_INET;
-    addr.inet.ip     = PR_INADDR_ANY;
-    addr.inet.port   = PR_htons(port);
+    if (PR_SetNetAddr(PR_IpAddrAny, PR_AF_INET6, port, &addr) != PR_SUCCESS) {
+	errExit("PR_SetNetAddr");
+    }

-    listen_sock = PR_NewTCPSocket();
+    if (PR_GetEnv("NSS_USE_SDP")) {
+        socketDomain = PR_AF_INET_SDP;
+    }
+    listen_sock = PR_OpenTCPSocket(PR_AF_INET6);
     if (listen_sock == NULL) {
-	errExit("PR_NewTCPSocket");
+        errExit("PR_OpenTCPSocket error");
     }

     opt.option = PR_SockOpt_Nonblocking;


code:
diff -up nss/tests/dbtests/dbtests.sh.646045 nss/tests/dbtests/dbtests.sh
--- nss/tests/dbtests/dbtests.sh.646045	2013-04-04 13:31:55.000000000 -0700
+++ nss/tests/dbtests/dbtests.sh	2013-04-04 15:57:46.298127149 -0700
@@ -168,6 +168,9 @@ dbtest_main()
         cat $RONLY_DIR/* > /dev/null
     fi

+    # skipping the next two tests when user is root,
+    # otherwise they would fail due to rooty powers
+    if [[ $EUID -ne 0 ]] then
     ${BINDIR}/dbtest -d $RONLY_DIR
     ret=$?
     if [ $ret -ne 46 ]; then
@@ -175,6 +178,10 @@ dbtest_main()
     else
       html_passed "Dbtest r/w didn't work in an readonly dir $ret"
     fi
+    else
+      html_passed "Skipping Dbtest r/w in a readonly dir because user is root"
+    fi
+    if [[ $EUID -ne 0 ]] then
     ${BINDIR}/certutil -D -n "TestUser" -d .
     ret=$?
     if [ $ret -ne 255 ]; then
@@ -182,6 +189,9 @@ dbtest_main()
     else
         html_passed "Certutil didn't work in an readonly dir $ret"
     fi
+    else
+      html_passed "Skipping Certutil delete cert in an readonly directory test because user is root"
+    fi

     Echo "test opening the database ronly in a readonly directory"


code:
#!/bin/bash

# Generate nss.pc and nss-config from nss.pc.in and nss-config.in
# Ozan Caglayan, 2010

LIBDIR="/usr/lib/nss"
PREFIX="/usr"
EXEC_PREFIX="/usr"
INCLUDEDIR="/usr/include/nss"

PKGCONFIG="dist/pkgconfig/nss.pc.in"
NSSCONFIG="dist/pkgconfig/nss-config.in"

NSS_VMAJOR=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VMAJOR" | awk '{print $3}'`
NSS_VMINOR=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VMINOR" | awk '{print $3}'`
NSS_VPATCH=`cat nss/lib/nss/nss.h | grep "#define.*NSS_VPATCH" | awk '{print $3}'`
NSS_VERSION="$NSS_VMAJOR.$NSS_VMINOR.$NSS_VPATCH"
NSPR_VERSION=`nspr-config --version`

echo "NSS_VMAJOR: $NSS_VMAJOR"
echo "NSS_VMINOR: $NSS_VMINOR"
echo "NSS_VPATCH: $NSS_VPATCH"
echo "NSS_VERSION: $NSS_VERSION"

# Setup nss-config
cat $NSSCONFIG | sed    -e "s,@prefix@,$PREFIX,g" \
                        -e "s,@MOD_MAJOR_VERSION@,$NSS_VMAJOR,g" \
                        -e "s,@MOD_MINOR_VERSION@,$NSS_VMINOR,g" \
                        -e "s,@MOD_PATCH_VERSION@,$NSS_VPATCH,g" \
                        > dist/pkgconfig/nss-config

# Set executable bit
chmod 755 dist/pkgconfig/nss-config

# Setup pkgconfig file
cat $PKGCONFIG | sed    -e "s,@libdir@,$LIBDIR,g" \
                        -e "s,@prefix@,$PREFIX,g" \
                        -e "s,@exec_prefix@,$EXEC_PREFIX,g" \
                        -e "s,@includedir@,$INCLUDEDIR,g" \
                        -e "s,@NSS_VERSION@,$NSS_VERSION,g" \
                        -e "s,@NSPR_VERSION@,$NSPR_VERSION,g" \
                        > dist/pkgconfig/nss.pc

# Clear .in files
rm -rf $PKGCONFIG $NSSCONFIG


code:
Patches taken from http://pkgs.fedoraproject.org/cgit/nss.git/

--- nss/lib/ckfw/manifest.mn.libpem
+++ nss/lib/ckfw/manifest.mn
@@ -5,7 +5,7 @@

 CORE_DEPTH = ../..

-DIRS = builtins
+DIRS = builtins pem

 PRIVATE_EXPORTS = \
 	ck.h		  \


code:
Submitted By:            Armin K. <krejzi at email dot com>
Date:                    2014-09-26
Initial Package Version: 3.15
Comment:                 Modified manifest.mn diff (Fernando)
Upstream Status:         Not applicable
Origin:                  Based on dj's original patch, rediffed and modified for 3.15
Description:             Adds auto-generated nss.pc and nss-config script, and allows
                         building without nspr in the source tree.

--- a/nss/config/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ b/nss/config/Makefile	2013-07-02 14:53:56.684750636 +0200
@@ -0,0 +1,40 @@
+CORE_DEPTH = ..
+DEPTH      = ..
+
+include $(CORE_DEPTH)/coreconf/config.mk
+
+NSS_MAJOR_VERSION = `grep "NSS_VMAJOR" ../lib/nss/nss.h | awk '{print $$3}'`
+NSS_MINOR_VERSION = `grep "NSS_VMINOR" ../lib/nss/nss.h | awk '{print $$3}'`
+NSS_PATCH_VERSION = `grep "NSS_VPATCH" ../lib/nss/nss.h | awk '{print $$3}'`
+PREFIX = /usr
+
+all: export libs
+
+export:
+	# Create the nss.pc file
+	mkdir -p $(DIST)/lib/pkgconfig
+	sed -e "s,@prefix@,$(PREFIX)," \
+	    -e "s,@exec_prefix@,\$${prefix}," \
+	    -e "s,@libdir@,\$${prefix}/lib," \
+	    -e "s,@includedir@,\$${prefix}/include/nss," \
+	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION),g" \
+	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+	    nss.pc.in > nss.pc
+	chmod 0644 nss.pc
+	ln -sf ../../../../nss/config/nss.pc $(DIST)/lib/pkgconfig
+
+	# Create the nss-config script
+	mkdir -p $(DIST)/bin
+	sed -e "s,@prefix@,$(PREFIX)," \
+	    -e "s,@NSS_MAJOR_VERSION@,$(NSS_MAJOR_VERSION)," \
+	    -e "s,@NSS_MINOR_VERSION@,$(NSS_MINOR_VERSION)," \
+	    -e "s,@NSS_PATCH_VERSION@,$(NSS_PATCH_VERSION)," \
+	    nss-config.in > nss-config
+	chmod 0755 nss-config
+	ln -sf ../../../nss/config/nss-config $(DIST)/bin
+
+libs:
+
+dummy: all export libs
+
--- a/nss/config/nss-config.in	1970-01-01 01:00:00.000000000 +0100
+++ b/nss/config/nss-config.in	2013-07-02 14:52:58.328084334 +0200
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@NSS_MAJOR_VERSION@
+minor_version=@NSS_MINOR_VERSION@
+patch_version=@NSS_PATCH_VERSION@
+
+usage()
+{
+	cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+	[--prefix[=DIR]]
+	[--exec-prefix[=DIR]]
+	[--includedir[=DIR]]
+	[--libdir[=DIR]]
+	[--version]
+	[--libs]
+	[--cflags]
+Dynamic Libraries:
+	nss
+	nssutil
+	smime
+	ssl
+	softokn
+EOF
+	exit $1
+}
+
+if test $# -eq 0; then
+	usage 1 1>&2
+fi
+
+lib_nss=yes
+lib_nssutil=yes
+lib_smime=yes
+lib_ssl=yes
+lib_softokn=yes
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case $1 in
+    --prefix=*)
+      prefix=$optarg
+      ;;
+    --prefix)
+      echo_prefix=yes
+      ;;
+    --exec-prefix=*)
+      exec_prefix=$optarg
+      ;;
+    --exec-prefix)
+      echo_exec_prefix=yes
+      ;;
+    --includedir=*)
+      includedir=$optarg
+      ;;
+    --includedir)
+      echo_includedir=yes
+      ;;
+    --libdir=*)
+      libdir=$optarg
+      ;;
+    --libdir)
+      echo_libdir=yes
+      ;;
+    --version)
+      echo ${major_version}.${minor_version}.${patch_version}
+      ;;
+    --cflags)
+      echo_cflags=yes
+      ;;
+    --libs)
+      echo_libs=yes
+      ;;
+    nss)
+      lib_nss=yes
+      ;;
+    nssutil)
+      lib_nssutil=yes
+      ;;
+    smime)
+      lib_smime=yes
+      ;;
+    ssl)
+      lib_ssl=yes
+      ;;
+    softokn)
+      lib_softokn=yes
+      ;;
+    *)
+      usage 1 1>&2
+      ;;
+  esac
+  shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+    exec_prefix=`pkg-config --variable=exec_prefix nss`
+fi
+if test -z "$includedir"; then
+    includedir=`pkg-config --variable=includedir nss`
+fi
+if test -z "$libdir"; then
+    libdir=`pkg-config --variable=libdir nss`
+fi
+
+if test "$echo_prefix" = "yes"; then
+    echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+    echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+    echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+    echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+    echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+      libdirs="-L$libdir"
+      if test -n "$lib_nss"; then
+	libdirs="$libdirs -lnss${major_version}"
+      fi
+      if test -n "$lib_nssutil"; then
+        libdirs="$libdirs -lnssutil${major_version}"
+      fi
+      if test -n "$lib_smime"; then
+	libdirs="$libdirs -lsmime${major_version}"
+      fi
+      if test -n "$lib_ssl"; then
+	libdirs="$libdirs -lssl${major_version}"
+      fi
+      if test -n "$lib_softokn"; then
+        libdirs="$libdirs -lsoftokn${major_version}"
+      fi
+      echo $libdirs
+fi
+
--- a/nss/config/nss.pc.in	1970-01-01 01:00:00.000000000 +0100
+++ b/nss/config/nss.pc.in	2013-07-02 14:52:58.328084334 +0200
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: NSS
+Description: Network Security Services
+Version: @NSS_MAJOR_VERSION@.@NSS_MINOR_VERSION@.@NSS_PATCH_VERSION@
+Requires: nspr >= 4.8
+Libs: -L@libdir@ -lnss@NSS_MAJOR_VERSION@ -lnssutil@NSS_MAJOR_VERSION@ -lsmime@NSS_MAJOR_VERSION@ -lssl@NSS_MAJOR_VERSION@ -lsoftokn@NSS_MAJOR_VERSION@
+Cflags: -I${includedir}
+
--- a/nss/Makefile	2013-05-28 23:43:24.000000000 +0200
+++ b/nss/Makefile	2013-07-02 14:52:58.328084334 +0200
@@ -44,7 +44,7 @@
 # (7) Execute "local" rules. (OPTIONAL).                              #
 #######################################################################

-nss_build_all: build_nspr all
+nss_build_all: all

 nss_clean_all: clobber_nspr clobber

--- a/nss/manifest.mn.orig	2014-09-26 16:46:44.201965538 -0300
+++ b/nss/manifest.mn	2014-09-26 16:51:11.386336520 -0300
@@ -10,7 +10,7 @@

 RELEASE = nss

-DIRS = coreconf lib cmd
+DIRS = coreconf lib cmd config

 ifdef NSS_BUILD_GTESTS
 DIRS += external_tests