#!/usr/bin/env 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():
    configuration_parameters = ' '.join([
        '--prefix=/usr',
        '--disable-builtinflac',
        '--disable-builtinmbedtls',
        '--disable-builtinminiupnpc',
        '--disable-builtinzlib',
        '--disable-cg',
        '--disable-jack',
        '--disable-oss',
        '--disable-sdl',
        '--enable-dbus',
    ])
    autotools.rawConfigure(configuration_parameters)


def build():
    autotools.make()
    autotools.make('-C libretro-common/audio/dsp_filters')
    autotools.make('-C gfx/video_filters')


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

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