Example #1
0
def install(parameters='', argument='install', no_sb2=False):
    '''install source into install directory with given parameters'''
    cmd = 'make prefix=%(prefix)s/%(defaultprefix)s \
           datadir=%(prefix)s/%(data)s \
           infodir=%(prefix)s/%(info)s \
           localstatedir=%(prefix)s/%(localstate)s \
           mandir=%(prefix)s/%(man)s \
           sysconfdir=%(prefix)s/%(conf)s \
           %(parameters)s \
           %(argument)s' % {
        'prefix': get.installDIR(),
        'defaultprefix': get.defaultprefixDIR(),
        'man': get.manDIR(),
        'info': get.infoDIR(),
        'localstate': get.localstateDIR(),
        'conf': get.confDIR(),
        'data': get.dataDIR(),
        'parameters': parameters,
        'argument': argument,
    }

    if crosscompiling and not no_sb2:
        cmd = "sb2 -e %s" % cmd

    if system(cmd):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()
Example #2
0
def install(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters'''
    # Set clang as compiler if supported
    if get.canClang():
		export ("CC", "clang")
		export ("CXX", "clang++")
		    
    args = 'make prefix=%(prefix)s/%(defaultprefix)s \
            datadir=%(prefix)s/%(data)s \
            infodir=%(prefix)s/%(info)s \
            localstatedir=%(prefix)s/%(localstate)s \
            mandir=%(prefix)s/%(man)s \
            sysconfdir=%(prefix)s/%(conf)s \
            %(parameters)s \
            %(argument)s' % {
                                'prefix': get.installDIR(),
                                'defaultprefix': get.defaultprefixDIR(),
                                'man': get.manDIR(),
                                'info': get.infoDIR(),
                                'localstate': get.localstateDIR(),
                                'conf': get.confDIR(),
                                'data': get.dataDIR(),
                                'parameters': parameters,
                                'argument':argument,
                            }

    if system(args):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()

    if get.buildTYPE() == "emul32":
        fixpc()
        if isDirectory("%s/emul32" % get.installDIR()): removeDir("/emul32")
Example #3
0
def install(parameters="", argument="install"):
    """install source into install directory with given parameters"""
    if can_access_file("makefile") or can_access_file("Makefile") or can_access_file("GNUmakefile"):
        args = (
            "make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s"
            % {
                "prefix": get.installDIR(),
                "defaultprefix": get.defaultprefixDIR(),
                "man": get.manDIR(),
                "info": get.infoDIR(),
                "localstate": get.localstateDIR(),
                "conf": get.confDIR(),
                "data": get.dataDIR(),
                "parameters": parameters,
                "argument": argument,
            }
        )

        if system(args):
            raise InstallError(_("Install failed."))
        else:
            fixInfoDir()
    else:
        raise InstallError(_("No Makefile found."))
Example #4
0
def install(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters'''
    if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
        args = 'make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s' % {'prefix': get.installDIR(),
                            'defaultprefix': get.defaultprefixDIR(),
                            'man': get.manDIR(),
                            'info': get.infoDIR(),
                            'localstate': get.localstateDIR(),
                            'conf': get.confDIR(),
                            'data': get.dataDIR(),
                            'parameters': parameters,
                            'argument':argument}

        if system(args):
            raise InstallError(_('Install failed.'))
        else:
            fixInfoDir()
    else:
        raise InstallError(_('No Makefile found.'))
Example #5
0
def install(parameters='', argument='install'):
    '''install source into install directory with given parameters'''
    if can_access_file('makefile') or can_access_file(
            'Makefile') or can_access_file('GNUmakefile'):
        args = 'make prefix=%(prefix)s/%(defaultprefix)s \
                datadir=%(prefix)s/%(data)s \
                infodir=%(prefix)s/%(info)s \
                localstatedir=%(prefix)s/%(localstate)s \
                mandir=%(prefix)s/%(man)s \
                sysconfdir=%(prefix)s/%(conf)s \
                %(parameters)s \
                %(argument)s' % {
            'prefix': get.installDIR(),
            'defaultprefix': get.defaultprefixDIR(),
            'man': get.manDIR(),
            'info': get.infoDIR(),
            'localstate': get.localstateDIR(),
            'conf': get.confDIR(),
            'data': get.dataDIR(),
            'parameters': parameters,
            'argument': argument
        }

        if system(args):
            raise InstallError(_('Install failed.'))
    else:
        raise InstallError(_('No Makefile found.'))

    fixInfoDir()
Example #6
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    # Set clang as compiler if supported
    if get.canClang():
		export ("CC", "clang")
		export ("CXX", "clang++")
		
    if can_access_file('configure'):
        gnuconfig_update()

        prefix = get.emul32prefixDIR() if get.buildTYPE() == "emul32" else get.defaultprefixDIR()
        args = './configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                --libexecdir=/%s \
                %s' % (prefix, \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if get.buildTYPE() == "emul32":
            args += " --libdir=/usr/lib32"

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Example #7
0
def install(parameters = '', argument = 'install', no_sb2=False):
    '''install source into install directory with given parameters'''
    cmd = 'make prefix=%(prefix)s/%(defaultprefix)s \
           datadir=%(prefix)s/%(data)s \
           infodir=%(prefix)s/%(info)s \
           localstatedir=%(prefix)s/%(localstate)s \
           mandir=%(prefix)s/%(man)s \
           sysconfdir=%(prefix)s/%(conf)s \
           %(parameters)s \
           %(argument)s' % {
                                'prefix': get.installDIR(),
                                'defaultprefix': get.defaultprefixDIR(),
                                'man': get.manDIR(),
                                'info': get.infoDIR(),
                                'localstate': get.localstateDIR(),
                                'conf': get.confDIR(),
                                'data': get.dataDIR(),
                                'parameters': parameters,
                                'argument':argument,
                           }

    if crosscompiling and not no_sb2:
        cmd = "sb2 -e %s" % cmd

    if system(cmd):
        raise InstallError(_('Install failed.'))
    else:
        fixInfoDir()
Example #8
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file('ltmain.sh'):
        libtoolize("--copy --force")

    if can_access_file('configure'):
        gnuconfig_update()

        args = './configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                --libexecdir=/%s \
                %s' % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Example #9
0
def setup():
    shelltools.export("LDFLAGS", "-Wl,-z,defs")

    args = '../configure \
            --prefix=/%s \
            --build=%s \
            --mandir=/%s \
            --infodir=/%s \
            --datadir=/%s \
            --sysconfdir=/%s \
            --localstatedir=/%s \
            --libexecdir=/%s \
            ' % (get.defaultprefixDIR(), \
                 get.HOST(), get.manDIR(), \
                 get.infoDIR(), get.dataDIR(), \
                 get.confDIR(), get.localstateDIR(), get.libexecDIR())

    args += "--with-pic \
             --disable-static \
             --with-ipc=%(ipc_type)s \
             --program-suffix=-%(ipc_type)s"

    for ipc_type in ipc_types:
        shelltools.makedirs(ipc_type)

        shelltools.cd(ipc_type)
        shelltools.system(args % {'ipc_type':ipc_type})
        shelltools.cd('..')
Example #10
0
def configure(parameters=""):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file("configure"):
        gnuconfig_update()

        args = (
            "./configure \
                --prefix=/%s \
                --build=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s"
            % (
                get.defaultprefixDIR(),
                get.HOST(),
                get.manDIR(),
                get.infoDIR(),
                get.dataDIR(),
                get.confDIR(),
                get.localstateDIR(),
                parameters,
            )
        )

        if system(args):
            raise ConfigureError(_("Configure failed."))
    else:
        raise ConfigureError(_("No configure script found."))
Example #11
0
def configure(parameters='', build_dir='build'):
    """
    Configures the project into the build directory with the parameters using meson.

    Args:
        parameters (str): Extra parameters for the command. Default is empty string.
        build_dir (str): Build directory. Default is 'build'.

    Examples:
        >>> mesontools.configure()
        >>> mesontools.configure('extra parameters')
        >>> mesontools.configure('extra parameters', 'custom_build_dir')
    """
    default_parameters = ' '.join([
        '--prefix=/%s' % get.defaultprefixDIR(),
        '--bindir=/usr/bin',
        '--datadir=/%s' % get.dataDIR(),
        '--includedir=/usr/include',
        '--infodir=/%s' % get.infoDIR(),
        '--libdir=/%s' %
        ('usr/lib32' if get.buildTYPE() == 'emul32' else 'usr/lib'),
        '--libexecdir=/%s' % get.libexecDIR(),
        '--localedir=/usr/share/locale',
        '--localstatedir=/%s' % get.localstateDIR(),
        '--mandir=/%s' % get.manDIR(),
        '--sbindir=/%s' % get.sbinDIR(),
        '--sharedstatedir=com',
        '--sysconfdir=/etc',
        '--default-library=shared',
    ])
    if system('meson setup %s %s %s' %
              (default_parameters, parameters, build_dir)):
        raise ConfigureError(_('Configuration failed.'))
Example #12
0
def setup():
    autotools.rawConfigure("--with-ssl \
                         --with-nsl \
                         --enable-LFS \
                         --sysconfdir=/etc/wget \
                         --enable-ipv6 \
                         --enable-nls \
                         --prefix=/%s \
                         --host=%s \
                         --mandir=/%s \
                         --infodir=/%s \
                         --datadir=/%s \
                         --localstatedir=/%s \
                        " % (get.defaultprefixDIR(), \
                         get.HOST(), get.manDIR(), \
                         get.infoDIR(), get.dataDIR(), \
                         get.localstateDIR()))
Example #13
0
def setup():
    autotools.rawConfigure("--with-ssl \
                         --with-nsl \
                         --enable-LFS \
                         --sysconfdir=/etc/wget \
                         --enable-ipv6 \
                         --enable-nls \
                         --prefix=/%s \
                         --host=%s \
                         --mandir=/%s \
                         --infodir=/%s \
                         --datadir=/%s \
                         --localstatedir=/%s \
                        "                          % (get.defaultprefixDIR(), \
                         get.HOST(), get.manDIR(), \
                         get.infoDIR(), get.dataDIR(), \
                         get.localstateDIR()))
Example #14
0
def configure(parameters='',
              configure_cmd='./configure',
              no_default_vars=False,
              no_sb2=False):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file(configure_cmd):
        gnuconfig_update()

        cmd = '%s \
               --prefix=/%s \
               --mandir=/%s \
               --infodir=/%s \
               --datadir=/%s \
               --sysconfdir=/%s \
               --localstatedir=/%s \
               --libexecdir=/%s \
               %s'                   % (configure_cmd,
                      get.defaultprefixDIR(), \
                      get.manDIR(), get.infoDIR(), get.dataDIR(), \
                      get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if crosscompiling:
            if no_sb2 and not no_default_vars:
                cmd += " --build=%s \
                         --host=%s" % (get.BUILD(), get.HOST())
            elif not no_sb2 and no_default_vars:
                cmd += "sb2 %s \
                          --build=%s \
                          --host=%s" % (cmd, get.BUILD(), get.HOST())
            elif not no_sb2 and not no_default_vars:
                cmd = "sb2 %s \
                         --build=%s \
                         --host=%s" % (cmd, get.HOST(), get.HOST())
        else:
            if not no_default_vars:
                cmd += " --build=%s" % get.BUILD()

        if system(cmd):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Example #15
0
def configure(parameters=''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file('configure'):
        gnuconfig_update()

        args = './configure \
                --prefix=/%s \
                --host=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s'                    % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), parameters)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Example #16
0
def configure(parameters = '', configure_cmd='./configure', no_default_vars=False, no_sb2=False):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''

    if can_access_file(configure_cmd):
        gnuconfig_update()

        cmd = '%s \
               --prefix=/%s \
               --mandir=/%s \
               --infodir=/%s \
               --datadir=/%s \
               --sysconfdir=/%s \
               --localstatedir=/%s \
               --libexecdir=/%s \
               %s' % (configure_cmd,
                      get.defaultprefixDIR(), \
                      get.manDIR(), get.infoDIR(), get.dataDIR(), \
                      get.confDIR(), get.localstateDIR(), get.libexecDIR(), parameters)

        if crosscompiling:
            if no_sb2 and not no_default_vars:
                cmd += " --build=%s \
                         --host=%s" % (get.BUILD(), get.HOST())
            elif not no_sb2 and no_default_vars:
                cmd += "sb2 %s \
                          --build=%s \
                          --host=%s" % (cmd, get.BUILD(), get.HOST())
            elif not no_sb2 and not no_default_vars:
                cmd = "sb2 %s \
                         --build=%s \
                         --host=%s" % (cmd, get.HOST(), get.HOST())
        else:
            if not no_default_vars:
                cmd += " --build=%s" % get.BUILD()

        if system(cmd):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Example #17
0
def configure(parameters = ''):
    '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"'''
    if can_access_file('configure'):
        gnuconfig_update()
        
        args = './configure \
                --prefix=/%s \
                --host=%s \
                --mandir=/%s \
                --infodir=/%s \
                --datadir=/%s \
                --sysconfdir=/%s \
                --localstatedir=/%s \
                %s' % (get.defaultprefixDIR(), \
                       get.HOST(), get.manDIR(), \
                       get.infoDIR(), get.dataDIR(), \
                       get.confDIR(), get.localstateDIR(), parameters)
    
        if system(args):
            raise ConfigureError('!!! Configure failed...\n')
    else:
        raise ConfigureError('!!! No configure script found...\n')
Example #18
0
def doinfo(*sourceFiles):
    '''inserts the into files in the list of files into /usr/share/info'''
    readable_insinto(join_path(get.installDIR(), get.infoDIR()), *sourceFiles)
Example #19
0
def doinfo(*sourceFiles):
    '''inserts the into files in the list of files into /usr/share/info'''
    readable_insinto(join_path(get.installDIR(), get.infoDIR()), *sourceFiles)