<?xml version="1.0" ?>
<!DOCTYPE INARY SYSTEM "https://raw.githubusercontent.com/Zaryob/inary/master/inary-spec.dtd">
<INARY>
    <Source>
        <Name>postgresql</Name>
        <Homepage>http://www.postgresql.org/</Homepage>
        <Packager>
            <Name>Süleyman Poyraz</Name>
            <Email>zaryob.dev@gmail.com</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>service</IsA>
        <Summary>A powerful, open source relational database system</Summary>
        <Description>PostgreSQL is a powerful, open source relational database system.</Description>
        <Archive sha1sum="3487c6e6a3acb2e03a74c3b6ccedff7d5d658caf" type="targz">https://ftp.postgresql.org/pub/source/v12.0/postgresql-12.0.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>mit-kerberos</Dependency>
            <Dependency>tcl-devel</Dependency>
            <Dependency>python3-libxml2</Dependency>
            <Dependency>openldap-server</Dependency>
        </BuildDependencies>
        <Patches>
            <!--Patch level="1">backend_po_translation.patch</Patch-->
        </Patches>
    </Source>

    <Package>
        <Name>postgresql-lib</Name>
        <IsA>library</IsA>
        <Summary>Essential shared libraries for any PostgreSQL client program or interface</Summary>
        <RuntimeDependencies>
            <Dependency>mit-kerberos</Dependency>
            <Dependency>python3-libxml2</Dependency>
            <Dependency>openldap-client</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="data">/usr/share/postgresql</Path>
            <Path fileType="executable">/usr/bin/pg_config</Path>
        </Files>
    </Package>

    <Package>
        <Name>postgresql-doc</Name>
        <IsA>data:doc</IsA>
        <Summary>Postgresql documents</Summary>
        <Description>Additional documentation for PostgreSQL.</Description>
        <RuntimeDependencies>
            <Dependency release="current">postgresql-lib</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>postgresql-server</Name>
        <IsA>service</IsA>
        <RuntimeDependencies>
            <Dependency release="current">postgresql-lib</Dependency>
            <Dependency>python3-libxml2</Dependency>
            <Dependency>mit-kerberos</Dependency>
            <Dependency>openldap-client</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="data">/usr/share/postgresql/contrib</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="data">/var/lib</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/etc/lib/tmpfiles.d/postgresql.conf">postgresql.tmpfiles</AdditionalFile>
            <AdditionalFile owner="root" permission="0755" target="/etc/init.d/postgresql">postgresql.initd</AdditionalFile>
            <AdditionalFile target="/etc/conf.d/postgresql" owner="root" permission="0644">postgresql.confd</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <SCOM script="package.py">System.Package</SCOM>
            <SCOM script="service.py">System.Service</SCOM>
        </Provides>
    </Package>

    <Package>
        <Name>postgresql-pl</Name>
        <RuntimeDependencies>
            <Dependency release="current">postgresql-lib</Dependency>
            <Dependency>tcl</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/pltcl_listmod</Path>
            <Path fileType="executable">/usr/bin/pltcl_loadmod</Path>
            <Path fileType="executable">/usr/bin/pltcl_delmod</Path>
            <Path fileType="library">/usr/lib/postgresql/plperl.so</Path>
            <Path fileType="library">/usr/lib/postgresql/plpython.so</Path>
            <Path fileType="library">/usr/lib/postgresql/pltcl.so</Path>
            <Path fileType="data">/usr/share/postgresql/unknown.pltcl</Path>
        </Files>
    </Package>

    <History>
        <Update release="1">
            <Date>2019-10-25</Date>
            <Version>12.0</Version>
            <Comment>First release</Comment>
            <Name>Süleyman Poyraz</Name>
            <Email>zaryob.dev@gmail.com</Email>
        </Update>
    </History>
</INARY>
