package Cpanel::Easy::OptLib::mhash;

# cpanel10 - Cpanel/Easy/OptLib/mhash.pm     Copyright(c) 2005-2008 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited

sub path_installed {
    my ($easy_obj) = @_;

    return {
        'name'         => 'mhash',
        'install_path' => "/opt/mhash/",
        'itis_up2date' => sub {

            # 0.9.9.9 still has 0.9.9 hardcoded everywhere...
            # `grep -i "define VERSION" /opt/mhash/include/mutils/mhash_config.h` =~ m{ 0[.]9[.]9[.]9 }xms;
            `grep 0\.9\.9\.9 /opt/mhash/lib/*`;
        },
        'working_path' => 'mhash-0.9.9.9',
        'command_list' => [ [ './configure', '--prefix=/opt/mhash' ], ['make'], [qw(make install)], ],
    };
}

1;
