package Cpanel::Easy::OptLib::tidy;

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

my $verbose_patch = '';    # set to '--verbose' to see more detail from the patching

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

    return {
        'name'         => 'tidy',
        'install_path' => '/opt/tidy/',
        'itis_up2date' => sub {
            `/opt/tidy/bin/tidy --version` =~ m{ 25 \s+ March \s+ 2009 }xms;
        },
        'working_path' => 'tidy/3rdparty/tidy',
        'command_list' => [
            ["patch -p2 $verbose_patch < ../../cpanel/patch_for_easyapache_step"],
            ['chmod a+x ./configure'],
            [qw(./configure --prefix=/opt/tidy)],
            ['make'],
            [qw(make install)],
        ],
    };
}

1;
