Пример #1
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.'))
Пример #2
0
def rawInstall(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters = PREFIX=%s % get.installDIR()'''
    if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
        if system('make %s %s' % (parameters, argument)):
            raise InstallError('!!! Install failed...\n')
    else:
        raise InstallError('!!! No Makefile found...\n')
Пример #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.'))
Пример #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."))
Пример #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()
Пример #6
0
def rawInstall(parameters="", argument="install"):
    """install source into install directory with given parameters = PREFIX=%s % get.installDIR()"""
    if can_access_file("makefile") or can_access_file("Makefile") or can_access_file("GNUmakefile"):
        if system("make %s %s" % (parameters, argument)):
            raise InstallError(_("Install failed."))
        else:
            fixInfoDir()
    else:
        raise InstallError(_("No Makefile found."))
Пример #7
0
def rawInstall(parameters = '', argument = 'install'):
    '''install source into install directory with given parameters = PREFIX=%s % get.installDIR()'''
    if can_access_file('makefile') or can_access_file('Makefile') or can_access_file('GNUmakefile'):
        if system('make %s %s' % (parameters, argument)):
            raise InstallError(_('Install failed.'))
        else:
            fixInfoDir()
    else:
        raise InstallError(_('No Makefile found.'))
Пример #8
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/lib/static")
    for i in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        pisitools.domove("/usr/lib/%s" % shelltools.baseName(i),
                         "/usr/lib/static/")

    linknonwide("/usr/lib/static")
    linknonwide("/usr/lib")

    if multilib:
        pisitools.dodir("/usr/lib32/static")
        for i in shelltools.ls("build32/lib/*.a"):
            pisitools.insinto("/usr/lib32/static/",
                              "build32/lib/%s" % shelltools.baseName(i))

        linknonwide("/usr/lib32/static")

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile,
                             "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f),
                            "/usr/share/terminfo/%s/%s" % (f[0], f))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #9
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

	
    libbasedir = "lib"
    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/%s/static" % libbasedir)
    for i in shelltools.ls("%s/usr/%s/*.a" % (get.installDIR(), libbasedir)):
        pisitools.domove("/usr/%s/%s" % (libbasedir, shelltools.baseName(i)), "/usr/%s/static/" % libbasedir)

    linknonwide("/usr/%s/static" % libbasedir)
    linknonwide("/usr/%s" % libbasedir)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    # http://liste.pardus.org.tr/gelistirici/2011-October/057009.html
    for d in ("ncurses", "ncursesw"):
        pisitools.dodir("/usr/include/%s" % d)
        for h in shelltools.ls("%s/usr/include/*.h" % get.installDIR()):
            pisitools.dosym("../%s" % os.path.basename(h), "/usr/include/%s/%s" % (d, os.path.basename(h)))

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    # Maintain proper linking, whack ncurses into /lib/
    pisitools.domove ("/usr/lib/libncurses*.so*", "/lib/")
    pisitools.dosym("/lib/libncurses.so", "/lib/libcurses.so")
    pisitools.dosym("/lib/libncursesw.so", "/lib/libcursesw.so")
    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #10
0
def install():
    crosstools.rawInstall("program_transform_name= DESTDIR=%s" %
                          get.installDIR())

    # No static libs
    pisitools.remove("/usr/lib/*.a")

    for file in shelltools.ls(get.installDIR() + "/usr/lib/*w.*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    for file in shelltools.ls(get.installDIR() + "/lib/libncursesw.so*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for file in terminfo:
        termfile = file[0] + "/" + file
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % file[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile,
                             "/etc/terminfo/%s" % file[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (file[0], file),
                            "/usr/share/terminfo/%s/%s" % (file[0], file))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #11
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.'))
Пример #12
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."))
Пример #13
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/lib/static")
    for i in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        pisitools.domove("/usr/lib/%s" % shelltools.baseName(i), "/usr/lib/static/")

    linknonwide("/usr/lib/static")
    linknonwide("/usr/lib")

    if multilib:
        pisitools.dodir("/usr/lib32/static")
        for i in shelltools.ls("build32/lib/*.a"):
            pisitools.insinto("/usr/lib32/static/", "build32/lib/%s" % shelltools.baseName(i))

        linknonwide("/usr/lib32/static")


    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #14
0
def install():
    crosstools.rawInstall("program_transform_name= DESTDIR=%s" % get.installDIR())

    # No static libs
    pisitools.remove("/usr/lib/*.a")

    for file in shelltools.ls(get.installDIR() + "/usr/lib/*w.*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    for file in shelltools.ls(get.installDIR() + "/lib/libncursesw.so*"):
        source = file.replace(get.installDIR(), "")
        destination = source.replace("w.", ".")
        pisitools.dosym(source.replace("/usr/lib/", ""), destination)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for file in terminfo:
        termfile = file[0] + "/" + file
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % file[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % file[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (file[0], file ), "/usr/share/terminfo/%s/%s" % (file[0], file ))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #15
0
def install():

    shelltools.cd(CoreSource)
    autotools.install("bindir=%s/usr/bin texmf=%s/usr/share/texmf run_texlinks=true run_mktexlsr=true" % (get.installDIR() , get.installDIR()))

    # Installing texmf, texmf-dist, tlpkg, texmf-var

    texlivemodules.installTexmfFiles()

    shelltools.cd(get.installDIR())
    shelltools.system("cp -pR usr/texmf usr/share/")
    shelltools.system("cp -pR usr/texmf-dist usr/share/")

    shelltools.system("rm -rf usr/texmf")
    shelltools.system("rm -rf usr/texmf-dist")

    shelltools.cd("%s/%s/%s" % (get.workDIR(), WorkDir, CoreSource))
    # Install documents
    docs = ["ChangeLog", "README", "BUGS", "NEWS", "README.14m", "PROJECTS"]
    dirs = ["kpathsea", "dviljk", "dvipsk", "makeindexk", "ps2pkm", "web2c"]

    pisitools.dodoc("texk/ChangeLog", "texk/README")
    for d in docs:
        for dir in dirs:
            if shelltools.can_access_file("%s/texk/%s/%s" % (get.curDIR(), dir, d)):
                pisitools.insinto("usr/share/doc/%s/texk/%s" % (get.srcNAME(), dir) , "texk/%s/%s" % (dir, d))

    # Remove these directories
    pisitools.removeDir("/usr/share/texmf/doc")

    for d in ["web2c", "updmap.d", "fmtutil.d", "texmf.d", "language.dat.d", "language.def.d"]:
        pisitools.dodir("/etc/texmf/%s" % d)

    pisitools.domove("/usr/share/texmf/web2c/texmf.cnf", "/etc/texmf/texmf.d/")
    pisitools.domove("/usr/share/texmf/web2c/fmtutil.cnf", "/etc/texmf/fmtutil.d/")
    pisitools.domove("/usr/share/texmf/web2c/updmap.cfg","/etc/texmf/updmap.d/", "00updmap.cfg")

    # Remove unnecessary files
    pisitools.remove("/usr/bin/man")

    shelltools.cd("%s/usr/share/texmf/" % get.installDIR())
    texlivemodules.handleConfigFiles()

    pisitools.dodir("/usr/share/texmf-site")

    # Symlinks for regenerated files by texmf-update
    for sym in ["updmap.cfg", "texmf.cnf", "fmtutil.cnf"]:
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/web2c/%s" % sym)
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/texmf/web2c/%s" % sym)
    pisitools.dosym("/etc/texmf/dvips/config/config.ps", "/usr/share/dvips/config/config.ps")

    pisitools.dosym("tex", "/usr/bin/virtex")
    pisitools.dosym("pdftex", "/usr/bin/pdfvirtex")

    # Rename mpost to leave room for mplib
    pisitools.domove("/usr/bin/mpost", "/usr/bin/", "mpost-%s" % get.srcNAME())
    pisitools.dosym("mpost-%s" % get.srcNAME(), "/usr/bin/mpost")

    # Keep it as that's where the formats will go
    pisitools.dodir("/var/lib/texmf")
Пример #16
0
def fixCompiledPy():
    ''' cleans *.py[co] from packages '''
    for root, dirs, files in os.walk("%s/usr/lib/%s/" % (get.installDIR(), get.curPYTHON())):
        for compiledFile in files:
            if compiledFile.endswith(".pyc") or compiledFile.endswith(".pyo"):
                if can_access_file("%s/%s" % (root,compiledFile)):
                    unlink("%s/%s" % (root,compiledFile))
Пример #17
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    if get.buildTYPE() == "emul32":
        libbasedir = "lib32"
    else:
        libbasedir = "lib"

    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/%s/static" % libbasedir)
    for i in shelltools.ls("%s/usr/%s/*.a" % (get.installDIR(), libbasedir)):
        pisitools.domove("/usr/%s/%s" % (libbasedir, shelltools.baseName(i)), "/usr/%s/static/" % libbasedir)

    linknonwide("/usr/%s/static" % libbasedir)
    linknonwide("/usr/%s" % libbasedir)

    if get.buildTYPE() == "emul32":
        pisitools.removeDir("/emul32")
        return

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #18
0
def make(parameters = ''):
    '''build source with given parameters'''
    if can_access_file('Makefile'):
        if system('make %s %s' % (get.makeJOBS(), parameters)):
            raise MakeError(_('Make failed.'))
    else:
        raise InstallError(_('No Makefile found.'))
Пример #19
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    if get.buildTYPE() == "emul32":
        libbasedir = "lib32"
    else:
        libbasedir = "lib"

    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/%s/static" % libbasedir)
    for i in shelltools.ls("%s/usr/%s/*.a" % (get.installDIR(), libbasedir)):
        pisitools.domove("/usr/%s/%s" % (libbasedir, shelltools.baseName(i)),
                         "/usr/%s/static/" % libbasedir)

    linknonwide("/usr/%s/static" % libbasedir)
    linknonwide("/usr/%s" % libbasedir)

    if get.buildTYPE() == "emul32":
        pisitools.removeDir("/emul32")
        return

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile,
                             "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f),
                            "/usr/share/terminfo/%s/%s" % (f[0], f))

    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #20
0
def make(parameters = ''):
    '''build source with given parameters'''
    if can_access_file('Makefile'):
        if system('make %s %s' % (get.makeJOBS(), parameters)):
            raise MakeError(_('Make failed.'))
    else:
        raise InstallError(_('No Makefile found.'))
Пример #21
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())


    libbasedir = "lib"
    # Handle static libs in /usr/%libdir/static
    pisitools.dodir("/usr/%s/static" % libbasedir)
    for i in shelltools.ls("%s/usr/%s/*.a" % (get.installDIR(), libbasedir)):
        pisitools.domove("/usr/%s/%s" % (libbasedir, shelltools.baseName(i)), "/usr/%s/static/" % libbasedir)

    linknonwide("/usr/%s/static" % libbasedir)
    linknonwide("/usr/%s" % libbasedir)

    # We need the basic terminfo files in /etc
    terminfo = ["ansi", "console", "dumb", "linux", "rxvt", "screen", "sun", \
                "vt52", "vt100", "vt102", "vt200", "vt220", "xterm", "xterm-color", "xterm-xfree86"]

    # http://liste.pardus.org.tr/gelistirici/2011-October/057009.html
    for d in ("ncurses", "ncursesw"):
        pisitools.dodir("/usr/include/%s" % d)
        for h in shelltools.ls("%s/usr/include/*.h" % get.installDIR()):
            pisitools.dosym("../%s" % os.path.basename(h), "/usr/include/%s/%s" % (d, os.path.basename(h)))

    for f in terminfo:
        termfile = f[0] + "/" + f
        if shelltools.can_access_file("/usr/share/terminfo/%s" % termfile):
            pisitools.dodir("/etc/terminfo/%s" % f[0])
            pisitools.domove("/usr/share/terminfo/%s" % termfile, "/etc/terminfo/%s" % f[0])
            pisitools.dosym("../../../../etc/terminfo/%s/%s" % (f[0], f), "/usr/share/terminfo/%s/%s" % (f[0], f))

    # Maintain proper linking, whack ncurses into /lib/
    pisitools.domove ("/usr/lib/libncurses*.so*", "/lib/")
    pisitools.dosym("/lib/libncurses.so", "/lib/libcurses.so")
    pisitools.dosym("/lib/libncursesw.so", "/lib/libcursesw.so")
    pisitools.dodoc("ANNOUNCE", "NEWS", "README*", "TO-DO")
Пример #22
0
def install():
    presetup()
    autotools.rawInstall("distro-pack-install DESTDIR=%s" % get.installDIR())

    # Sometimes we have a missing ure-link. LibreOffice kinda gets annoyed.
    if not shelltools.can_access_file("%s/usr/lib/libreoffice/ure-link" % get.installDIR()):
        pisitools.dosym("/usr/lib/libreoffice/ure", "/usr/lib/libreoffice/ure-link")
Пример #23
0
def fixCompiledPy(lookInto = '/usr/lib/%s/' % get.curPYTHON()):
    ''' cleans *.py[co] from packages '''
    for root, dirs, files in os.walk('%s/%s' % (get.installDIR(),lookInto)):
        for compiledFile in files:
            if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'):
                if can_access_file('%s/%s' % (root,compiledFile)):
                    unlink('%s/%s' % (root,compiledFile))
Пример #24
0
def fixCompiledPy(lookInto='/usr/lib/%s/' % get.curPYTHON()):
    ''' cleans *.py[co] from packages '''
    for root, dirs, files in os.walk('%s/%s' % (get.installDIR(), lookInto)):
        for compiledFile in files:
            if compiledFile.endswith('.pyc') or compiledFile.endswith('.pyo'):
                if can_access_file('%s/%s' % (root, compiledFile)):
                    unlink('%s/%s' % (root, compiledFile))
Пример #25
0
def install(parameters = 'install'):
    '''install source with given parameters.'''
    if can_access_file('Makefile'):
        if system('make %s' % parameters):                  
            raise InstallError, _('Make failed.')
    else:
        if system('perl Build install'):
            raise MakeError, _('perl install failed.')
Пример #26
0
def removePacklist():
    ''' cleans .packlist file from perl packages '''
    path = '%s/%s' % (get.installDIR(), "/usr/lib/perl5/vendor_perl/%s/%s-linux-thread-multi/auto/" % (get.curPERL(), get.HOST().split("-")[0]))
    for root, dirs, files in os.walk(path):
        for packFile in files:
            if packFile == ".packlist":
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
Пример #27
0
def install(parameters = 'install'):
    if can_access_file('Makefile'):
        args = 'make DESTDIR=%s destdir=%s %s' % (get.installDIR(), get.installDIR(), parameters)

        if system(args):
            raise InstallError(_('Install failed.'))
    else:
        raise InstallError(_('No Makefile found.'))
Пример #28
0
def make(parameters=''):
    '''make source with given parameters.'''
    if can_access_file('Makefile'):
        if system('%s %s' % (make_cmd, parameters)):
            raise MakeError, _('Make failed.')
    else:
        if system('%s Build %s' % (make_cmd, parameters)):
            raise MakeError, _('perl build failed.')
Пример #29
0
def install(parameters = 'install'):
    if can_access_file('Makefile'):
        args = 'make DESTDIR=%s destdir=%s %s' % (get.installDIR(), get.installDIR(), parameters)
        
        if system(args):
            raise InstallError(_('Install failed.'))
    else:
        raise InstallError(_('No Makefile found.'))
Пример #30
0
def fixLocalPod():
    podFiles = [ "%s/usr/lib/perl5/vendor_perl/%s/i686-linux/perllocal.pod" % (get.installDIR(), get.curPERL()),
                "%s/usr/lib/perl5/%s/i686-linux/perllocal.pod" % (get.installDIR(), get.curPERL()),
                "%s/usr/lib/perl5/site_perl/%s/perllocal.pod" % (get.installDIR(), get.curPERL())]

    for podFile in podFiles:
        if can_access_file(podFile):
            unlink(podFile)
Пример #31
0
def make(parameters = ''):
    '''make source with given parameters.'''
    if can_access_file('Makefile'):
        if system('make %s' % parameters):
            raise MakeError, _('Make failed.')
    else:
        if system('perl Build %s' % parameters):
            raise MakeError, _('perl build failed.')
Пример #32
0
def make(parameters=''):
    '''make source with given parameters.'''
    if can_access_file('Makefile'):
        if system('make %s' % parameters):
            raise MakeError(_('Make failed.'))
    else:
        if system('perl Build %s' % parameters):
            raise MakeError(_('perl build failed.'))
Пример #33
0
 def __init__(self, value=''):
     pisi.actionsapi.Error.__init__(self, value)
     self.value = value
     ctx.ui.error(value)
     if can_access_file('config.log'):
         ctx.ui.error(
             _('Please attach the config.log to your bug report:\n%s/config.log'
               ) % os.getcwd())
Пример #34
0
def install():

    # Installing texmf, texmf-dist, tlpkg
    for texmf in ["texmf", "texmf-dist"]:
        shelltools.copytree("%s/%s" % (CoreSource, texmf), "%s/usr/share/%s" % (get.installDIR(), texmf))
    shelltools.copytree("tlpkg", "%s/usr/share/tlpkg" % get.installDIR())

    shelltools.cd(CoreSource)

    autotools.install("bindir=%s/usr/bin texmf=%s/usr/share/texmf/ run_texlinks=true run_mktexlsr=true" % (get.installDIR(), get.installDIR()))

    # Install documents
    docs = ["ChangeLog", "README", "BUGS", "NEWS", "README.14m", "PROJECTS"]
    dirs = ["kpathsea", "dviljk", "dvipsk", "makeindexk", "ps2pkm", "web2c"]

    pisitools.dodoc("texk/ChangeLog", "texk/README")
    for d in docs:
        for dir in dirs:
            if shelltools.can_access_file("%s/texk/%s/%s" % (get.curDIR(), dir, d)):
                pisitools.insinto("usr/share/doc/%s/texk/%s" % (get.srcNAME(), dir) , "texk/%s/%s" % (dir, d))

    # Remove these directories
    pisitools.removeDir("/usr/share/texmf/doc")
    pisitools.removeDir("/usr/share/texmf-dist/doc")

    for d in ["web2c", "updmap.d", "fmtutil.d", "texmf.d", "language.dat.d", "language.def.d"]:
        pisitools.dodir("/etc/texmf/%s" % d)

    # Remove those as they will be regenerated by texmf-update
    pisitools.remove("/usr/share/texmf/web2c/fmtutil.cnf")
    pisitools.remove("/usr/share/texmf/web2c/texmf.cnf")

    pisitools.domove("/usr/share/texmf/web2c/updmap.cfg","/etc/texmf/updmap.d/", "00updmap.cfg")
    pisitools.dodir("/etc/texmf/dvips.d")
    pisitools.dodir("/etc/texmf/dvips/config")
    pisitools.domove("/usr/share/texmf/dvips/config/config.ps", "/etc/texmf/dvips.d/", "00%s-config.ps" % get.srcNAME())

    # Create symlinks from format to engines
    texlivemodules.createSymlinksFormat2Engines()

    # Handle config files
    shelltools.cd("%s/usr/share/texmf" % get.installDIR())
    texlivemodules.handleConfigFiles(".", "cfg", "cnf")

    pisitools.dodir("/usr/share/texmf-site")

    # Symlinks for regenerated files by texmf-update
    for sym in ["fmtutil.cnf", "texmf.cnf", "updmap.cfg"]:
        pisitools.dosym("/etc/texmf/web2c/%s" % sym, "/usr/share/texmf/web2c/%s" % sym)
    pisitools.dosym("/etc/texmf/dvips/config/config.ps", "/usr/share/dvips/config/config.ps")
    pisitools.dosym("tex", "/usr/bin/virtex")
    pisitools.dosym("pdftex", "/usr/bin/pdfvirtex")

    pisitools.dodir("/var/lib/texmf")

    # Rename mpost to leave room for mplib
    pisitools.domove("/usr/bin/mpost", "/usr/bin/", "mpost-%s" % get.srcNAME())
    pisitools.dosym("mpost-%s" % get.srcNAME(), "/usr/bin/mpost")
Пример #35
0
def rawConfigure(parameters=""):
    '''configure source with given parameters = "--prefix=/usr --libdir=/usr/lib --with-nls"'''
    if can_access_file("configure"):
        gnuconfig_update()

        if system("./configure %s" % parameters):
            raise ConfigureError(_("Configure failed."))
    else:
        raise ConfigureError(_("No configure script found."))
Пример #36
0
def configure(parameters = '', installPrefix = '/%s' % get.defaultprefixDIR(), sourceDir = '.'):
    '''configure source with given cmake parameters = "-DCMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS ... "'''
    if can_access_file(join_path(sourceDir, 'CMakeLists.txt')):
        args = 'cmake -DCMAKE_INSTALL_PREFIX=%s %s %s' % (installPrefix, parameters, sourceDir)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found for cmake.'))
Пример #37
0
def install():
    #evil e2fsprogs makefile -- I'll get you!
    autotools.rawInstall("DESTDIR=%s libdir=/zapme" % get.installDIR())
    pisitools.removeDir("/zapme")

    autotools.rawInstall("DESTDIR=%s" % get.installDIR(), "install-libs")

    pisitools.dodoc("ChangeLog", "README", "RELEASE-NOTES", "SHLIBS",
                    "e2fsck/ChangeLog", "e2fsck/CHANGES")

    pisitools.domove("/usr/lib/", "/lib")
    pisitools.domove("/lib/*.a", "/usr/lib")

    for file in shelltools.ls("%s/usr/lib/*.a" % get.installDIR()):
        destination = file.replace(get.installDIR(), "")
        destination = destination.split("/")[3]
        # create new ldscript
        libtools.gen_usr_ldscript(destination.replace(".a", ".so"))

    # normalize evil symlinks
    for link in shelltools.ls("%s/lib/*" % get.installDIR()):
        if shelltools.isLink(link) and not shelltools.can_access_file(
                shelltools.realPath(link)):
            source = shelltools.baseName(shelltools.realPath(link))
            link = link.replace(get.installDIR(), "")
            # remove old link
            pisitools.remove(link)
            # create new link
            pisitools.dosym(source, link)

    pisitools.domove("/usr/sbin/", "/sbin")

    pisitools.domove("/usr/bin/lsattr", "/bin")
    pisitools.domove("/usr/bin/chattr", "/bin")
    pisitools.domove("/usr/bin/uuidgen", "/bin")

    pisitools.domove("/sbin/mklost+found", "/usr/sbin")

    # time to convert hard links/duplicates to symbolic links
    pisitools.remove("/sbin/fsck.ext2")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext2")
    pisitools.remove("/sbin/fsck.ext3")
    pisitools.dosym("/sbin/e2fsck", "/sbin/fsck.ext3")

    pisitools.remove("/sbin/mkfs.ext2")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext2")
    pisitools.remove("/sbin/mkfs.ext3")
    pisitools.dosym("/sbin/mke2fs", "/sbin/mkfs.ext3")

    # copy compile_et & mk_cmds
    shelltools.copy("%s/lib/et/compile_et" % get.curDIR(),
                    "%s/bin/" % get.installDIR())
    shelltools.copy("%s/lib/ss/mk_cmds" % get.curDIR(),
                    "%s/bin/" % get.installDIR())

    # Symlink com_err.h
    pisitools.dosym("/usr/include/et/com_err.h", "/usr/include/com_err.h")
Пример #38
0
def configure(projectfile='', parameters='', installPrefix=prefix):
    if projectfile != '' and not shelltools.can_access_file(projectfile):
        raise ConfigureError(_("Project file '%s' not found.") % projectfile)

    profiles = glob.glob("*.pro")
    if len(profiles) > 1 and projectfile == '':
        raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: %s)") % ", ".join(profiles))

    shelltools.system("%s -makefile %s PREFIX='%s' QMAKE_CFLAGS+='%s' QMAKE_CXXFLAGS+='%s' %s" % (qmake, projectfile, installPrefix, get.CFLAGS(), get.CXXFLAGS(), parameters))
Пример #39
0
def configure(projectfile='', parameters='', installPrefix=prefix):
    if projectfile != '' and not shelltools.can_access_file(projectfile):
        raise ConfigureError(_("Project file '%s' not found.") % projectfile)

    profiles = glob.glob("*.pro")
    if len(profiles) > 1 and projectfile == '':
        raise ConfigureError(_("It seems there are more than one .pro file, you must specify one. (Possible .pro files: %s)") % ", ".join(profiles))

    shelltools.system("%s -makefile %s PREFIX='%s' QMAKE_CFLAGS+='%s' QMAKE_CXXFLAGS+='%s' %s" % (qmake, projectfile, installPrefix, get.CFLAGS(), get.CXXFLAGS(), parameters))
Пример #40
0
def rawConfigure(parameters=''):
    '''configure source with given parameters = "--prefix=/usr --libdir=/usr/lib --with-nls"'''
    if can_access_file('configure'):
        gnuconfig_update()

        if system('./configure %s' % parameters):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Пример #41
0
def removePodfiles():
    ''' cleans *.pod files from perl packages '''
    path = '%s/%s' % (get.installDIR(), "usr/lib/perl5/")
    for root, dirs, files in os.walk(path):
        for packFile in files:
            if packFile.endswith(".pod"):
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
                    removeEmptydirs(root)
Пример #42
0
def removePodfiles(path='usr/lib/perl5/'):
    ''' cleans *.pod files from perl packages '''
    full_path = '%s/%s' % (get.installDIR(), path)
    for root, dirs, files in os.walk(full_path):
        for packFile in files:
            if packFile.endswith(".pod"):
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
                    removeEmptydirs(root)
Пример #43
0
def configure(parameters = ''):
    '''configure source with given parameters.'''
    export('PERL_MM_USE_DEFAULT', '1')
    if can_access_file('Build.PL'):
        if system('perl Build.PL installdirs=vendor destdir=%s' % get.installDIR()):
            raise ConfigureError, _('Configure failed.')
    else:
        if system('perl Makefile.PL %s PREFIX=/usr INSTALLDIRS=vendor DESTDIR=%s' % (parameters, get.installDIR())):
            raise ConfigureError, _('Configure failed.')
Пример #44
0
def removePacklist(path='usr/lib/perl5/'):
    ''' cleans .packlist file from perl packages '''
    full_path = '%s/%s' % (get.installDIR(), path)
    for root, dirs, files in os.walk(full_path):
        for packFile in files:
            if packFile == ".packlist":
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
                    removeEmptydirs(root)
Пример #45
0
def rawConfigure(parameters = ''):
    '''configure source with given parameters = "--prefix=/usr --libdir=/usr/lib --with-nls"'''
    if can_access_file('configure'):
        gnuconfig_update()

        if system('./configure %s' % parameters):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Пример #46
0
def configure(parameters = ''):
    '''configure source with given parameters.'''
    export('PERL_MM_USE_DEFAULT', '1')
    if can_access_file('Build.PL'):
        if system('perl Build.PL installdirs=vendor destdir=%s' % get.installDIR()):
            raise ConfigureError, _('Configure failed.')
    else:
        if system('perl Makefile.PL %s PREFIX=/usr INSTALLDIRS=vendor DESTDIR=%s' % (parameters, get.installDIR())):
            raise ConfigureError, _('Configure failed.')
Пример #47
0
def removePacklist(path = 'usr/lib/perl5/'):
    ''' cleans .packlist file from perl packages '''
    full_path = '%s/%s' % (get.installDIR(), path)
    for root, dirs, files in os.walk(full_path):
        for packFile in files:
            if packFile == ".packlist":
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
                    removeEmptydirs(root)
Пример #48
0
def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())
    shelltools.cd(get.workDIR() + "/" + get.srcDIR() + "/filefuncs")
    autotools.rawInstall(
        "DESTDIR=%s AWKINCDIR=%s LIBDIR=/lib" %
        (get.installDIR(), get.workDIR() + "/" + get.srcDIR()))
    shelltools.cd(get.workDIR() + "/" + get.srcDIR())

    pisitools.dodir("/usr/bin")

    binpath, d, ver = "", get.installDIR() + "/", get.srcVERSION()

    for i in ["gawk", "pgawk", "igawk"]:
        if i == "gawk":
            binpath = "/bin/"
        else:
            binpath = "/usr/bin/"

        if shelltools.can_access_file(d + "bin/" +
                                      i) and not shelltools.can_access_file(
                                          d + "bin/" + i + "-" + ver):
            pisitools.domove("/bin/" + i, binpath, i + "-" + ver)
        elif shelltools.can_access_file(
                d + "bin/" + i +
                "-") and not shelltools.can_access_file(d + "bin/" + i + "-" +
                                                        ver):
            pisitools.domove("/bin/" + i + "-", binpath, i + "-" + ver)
        elif binpath is "/usr/bin/" and shelltools.can_access_file(d + "bin/" +
                                                                   i + "-" +
                                                                   ver):
            pisitools.domove("/bin/" + i + "-" + ver, binpath, i + "-" + ver)

        if shelltools.can_access_file(d + "bin/" + i):
            pisitools.remove("/bin/" + i)
            pisitools.dosym(i + "-" + ver, binpath + i)
        if binpath is "/usr/bin/":
            pisitools.dosym("/usr/bin/" + i + "-" + ver, "/bin/" + i)

    pisitools.dosym("igawk-" + ver, "/usr/bin/igawk")
    pisitools.dosym("/bin/gawk-" + ver, "/usr/bin/awk")
    pisitools.dosym("/bin/gawk-" + ver, "/usr/bin/gawk")

    pisitools.dodir("/usr/include/awk")

    for h in shelltools.ls(get.workDIR() + "/" + get.srcDIR() + "/*.h"):
        pisitools.insinto("/usr/include/awk/", h)

    if shelltools.can_access_file(d + "/usr/include/awk/acconfig.h"):
        pisitools.remove("/usr/include/awk/acconfig.h")

    pisitools.dosym("gawk.1", "/usr/share/man/man1/awk.1")
    pisitools.dodoc("AUTHORS", "ChangeLog", "FUTURES", "LIMITATIONS", "NEWS",
                    "PROBLEMS", "POSIX.STD", "README")

    for f in shelltools.ls("README_d/"):
        pisitools.newdoc("README_d/%s" % f, "README_d/%s" % f)
    pisitools.newdoc("awklib/ChangeLog", "awklib/ChangeLog")
    pisitools.newdoc("pc/ChangeLog", "pc/ChangeLog")
    pisitools.newdoc("posix/ChangeLog", "posix/ChangeLog")
Пример #49
0
def install(parameters='install'):
    '''install source with given parameters.'''
    if can_access_file('Makefile'):
        if system('make %s' % parameters):
            raise InstallError, _('Make failed.')
    else:
        if system('perl Build install'):
            raise MakeError, _('perl install failed.')

    fixLocalPod()
Пример #50
0
def removePacklist():
    ''' cleans .packlist file from perl packages '''
    path = '%s/%s' % (get.installDIR(
    ), "/usr/lib/perl5/vendor_perl/%s/%s-linux-thread-multi/auto/" %
                      (get.curPERL(), get.HOST().split("-")[0]))
    for root, dirs, files in os.walk(path):
        for packFile in files:
            if packFile == ".packlist":
                if can_access_file('%s/%s' % (root, packFile)):
                    unlink('%s/%s' % (root, packFile))
Пример #51
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'):
        # You can't squeeze unix paths with things like 'bindir', 'datadir', etc with CMake
        # http://public.kitware.com/pipermail/cmake/2006-August/010748.html
        args = 'make DESTDIR="%(destdir)s" \
                     %(parameters)s \
                     %(argument)s' % {
                                         'destdir'      : get.installDIR(),
                                         'parameters'   : parameters,
                                         'argument'     : argument,
                                     }

        if system(args):
            raise InstallError(_('Install failed.'))
        else:
            fixInfoDir()
    else:
        raise InstallError(_('No Makefile found.'))
Пример #52
0
def configure(parameters = ''):
    '''configure source with given parameters "'''
    _presetup ()
    cmd = "./waf configure --prefix=/usr %s" % parameters

    if can_access_file('waf'):
        if system(cmd):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found.'))
Пример #53
0
def install(parameters='install'):
    '''install source with given parameters.'''
    if can_access_file('Makefile'):
        if system('make %s' % parameters):
            raise InstallError(_('Make failed.'))
    else:
        if system('perl Build install'):
            raise MakeError(_('perl install failed.'))

    removePacklist()
    removePodfiles()
Пример #54
0
def make(parameters=''):
    '''build source with given parameters'''
    if can_access_file('Makefile'):
        if ctx.config.get_option("verbose") and ctx.config.get_option("debug"):
            command = 'make VERBOSE=1 %s %s' % (get.makeJOBS(), parameters)
        else:
            command = 'make %s %s' % (get.makeJOBS(), parameters)

        if system(command):
            raise MakeError(_('Make failed.'))
    else:
        raise InstallError(_('No Makefile found.'))
Пример #55
0
def configure(parameters = '', installPrefix = '/%s' % get.defaultprefixDIR(), sourceDir = '.'):
    '''configure source with given cmake parameters = "-DCMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS ... "'''
    if can_access_file(join_path(sourceDir, 'CMakeLists.txt')):
        args = 'cmake -DCMAKE_INSTALL_PREFIX=%s \
                      -DCMAKE_C_FLAGS="%s" \
                      -DCMAKE_CXX_FLAGS="%s" \
                      -DCMAKE_LD_FLAGS="%s" %s %s' % (installPrefix, get.CFLAGS(), get.CXXFLAGS(), get.LDFLAGS(), parameters, sourceDir)

        if system(args):
            raise ConfigureError(_('Configure failed.'))
    else:
        raise ConfigureError(_('No configure script found for cmake.'))
Пример #56
0
def install(parameters=''):
    '''does python setup.py install'''
    if system('python setup.py install --root=%s --no-compile %s' %
              (get.installDIR(), parameters)):
        raise InstallError, _('Install failed.')

    DDOCS = 'CHANGELOG COPYRIGHT KNOWN_BUGS MAINTAINERS PKG-INFO \
             CONTRIBUTORS LICENSE COPYING* Change* MANIFEST* README*'

    for doc in DDOCS:
        if can_access_file(doc):
            pisitools.dodoc(doc)
Пример #57
0
def install():
    autotools.rawInstall("INSTALL_ROOT=%s" % get.installDIR())

    autotools.rawInstall(
        "includedir=/usr/include/gdbm INSTALL_ROOT=%s" % get.installDIR(),
        "install-compat")
    pisitools.dodoc("ChangeLog", "NEWS", "README")

    #temp backwards support
    if shelltools.can_access_file("/usr/lib/libgdbm.so.2"):
        shelltools.copy("/usr/lib/libgdbm.so.2",
                        "%s/usr/lib/" % get.installDIR())
        shelltools.touch("%s/usr/lib/libgdbm.so.2" % get.installDIR())