def configure(parameters = ''): '''configure source with given parameters = "--with-nls --with-libusb --with-something-usefull"''' 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%s' % (prefix, \ get.HOST(), get.manDIR(), \ get.infoDIR(), get.dataDIR(), \ get.confDIR(), get.localstateDIR(), get.libexecDIR(), "--libdir=/usr/lib32 " if get.buildTYPE() == "emul32" else "", parameters) if system(args): raise ConfigureError(_('Configure failed.')) else: raise ConfigureError(_('No configure script found.'))
def install(parameters = '', argument = 'install'): '''install source into install directory with given parameters''' 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")