#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file https://www.gnu.org/licenses/gpl-3.0.txt

from pisi.actionsapi import cmaketools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

i = ''.join([
    ' -DBUILD_SHARED_LIBS=ON',
    ' -DWITH_ZLIB=ON -L ' ,
    ' -DCMAKE_CXX_FLAGS="%s -DNDEBUG"'
    ])

def setup():
    cmaketools.configure(i % get.CXXFLAGS())

def build():
    cmaketools.make()

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

    pisitools.dodoc("AUTHORS", "NEWS")
