<?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd" [
<!ENTITY nmap_version "7.98">
<!ENTITY openssl_version "3.0.17">
<!ENTITY libpcap_version "1.10.5">
<!ENTITY libssh2_version "1.11.1">
]>
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
<moduleset>

    <!-- INCLUDE -->

    <include href="http://gitlab.gnome.org/GNOME/gtk-osx/raw/master/modulesets-stable/gtk-osx.modules"/>

    <!-- REPOSITORIES -->

    <repository type="tarball" name="openssl" href="https://github.com/openssl/openssl/releases/download/openssl-&openssl_version;/"/>
    <repository type="tarball" name="nmap-local" href="http://localhost:8000/"/>
    <repository type="tarball" name="tcpdump-org" href="https://www.tcpdump.org/release/"/>
    <repository type="tarball" name="libssh2-org" href="https://www.libssh2.org/download/"/>

    <!-- MODULES -->
    <cmake id="libpcap">
        <branch repo="tcpdump-org" version="&libpcap_version;" module="libpcap-&libpcap_version;.tar.xz"/>
        <dependencies>
            <dep package="openssl" />
        </dependencies>
    </cmake>
    <cmake id="libssh2">
        <branch repo="libssh2-org" version="&libpcap_version;" module="libssh2-&libssh2_version;.tar.xz"/>
        <dependencies>
            <dep package="openssl" />
            <dep package="zlib" />
        </dependencies>
    </cmake>

    <autotools id="openssl" autogen-sh="Configure" autogenargs="shared enable-legacy enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers"
        autogen-template="%(srcdir)s/%(autogen-sh)s --prefix=%(prefix)s
            --openssldir=%(prefix)s/etc/ssl %(autogenargs)s"
            makeargs="depend all"
        makeinstallargs="INSTALL_PREFIX='$(DESTDIR)' install_dev"
        supports-parallel-builds="no"
        supports-non-srcdir-builds="no">
        <branch repo="openssl" version="&openssl_version;" module="openssl-&openssl_version;.tar.gz"/>
    </autotools>

    <autotools id="nmap" supports-non-srcdir-builds="no"
       autogen-sh="configure" autogenargs="--with-libdnet=included --with-liblua=included
--without-zenmap --without-ncat --without-ndiff --without-nping"
    >
        <branch repo="nmap-local" module="nmap-&nmap_version;.tar.gz" version="&nmap_version;"/>
        <dependencies>
            <dep package="libpcap" />
            <dep package="libpcre2" />
            <dep package="libssh2" />
            <dep package="openssl" />
            <dep package="zlib" />
        </dependencies>
    </autotools>
 
    <autotools id="ncat" supports-non-srcdir-builds="no"
       autogen-sh="configure" autogenargs="--with-libdnet=included --with-liblua=included
--without-zenmap --without-ndiff --without-nping"
        makeargs='build-ncat'
        makeinstallargs='install-ncat'
    >
        <branch repo="nmap-local" module="nmap-&nmap_version;.tar.gz" version="&nmap_version;"/>
        <dependencies>
            <dep package="openssl" />
        </dependencies>
    </autotools>

    <autotools id="nping" supports-non-srcdir-builds="no"
       autogen-sh="configure" autogenargs="--with-libdnet=included
--without-zenmap --without-ncat --without-ndiff"
        makeargs='build-nping'
        makeinstallargs='install-nping'
    >
        <branch repo="nmap-local" module="nmap-&nmap_version;.tar.gz" version="&nmap_version;"/>
        <dependencies>
            <dep package="libpcap" />
            <dep package="openssl" />
        </dependencies>
    </autotools>

    <!-- METAMODULE -->

    <metamodule id="nmap-deps">
        <dependencies>
            <dep package="libpcap" />
            <dep package="libpcre2" />
            <dep package="libssh2" />
            <dep package="openssl" />
            <dep package="zlib" />
        </dependencies>
    </metamodule>
    <metamodule id="nmap-packages">
        <dependencies>
            <dep package="nmap" />
            <dep package="ncat" />
            <dep package="nping" />
        </dependencies>
    </metamodule>

</moduleset>
